# Rotate Existing Vectors

1. Jun 8, 2014

### Murtuza Tipu

Hello and apologies if the title of the question is not very precise.

Question: I am reading the document talking about the simulation of photons in tissues using a Monte Carlo simulation. The exact title is "MCNP - A general Monte Carlo N-Partcle Transport Code".

Link to MCNP - A general Monte Carlo N-Partcle Transport Code

When photons are scattered, a new direction for the photon is sampled. When the medium is isotropic the direction is random so the math for this case are not hard, but when the medium is not isotropic, the angle of deflection needs to be computed from a function such as the Heney-Greenstein function.

Anyway to be short, this function returns a cos(θ) which is the angle of deflection between the existing photon direction and the new desired direction. In the paper, this term is called μlab. In the document I am referring to, they also compute a ϕ angle by sampling two random uniformly distributed variables, which are inscribed in the unit disk. These are called ϵ1 and ϵ2 in the paper.

So the formula they use in this paper (see reference below page 2-38) to compute the new photon direction (using the three aforementioned variables) is:

Formula for rotating photon direction

And where u0v0w0 are the coordinates of the "old photon direction" and uvw the new photon direction after scattering. My problem, is that I have no idea how they derived this formula.

So the way I understand how this can be done is by "reconstructing" a coordinate system in which the old direction is the z unit vector, and express the coordinates of the new direction within this frame? Is that correct. But could someone put me on the right track so that I can derive this formula (understand how they get there)? I don't need a full answer, I am happy to make an effort, I just need someone to put me not the right track (and I will publish the answer when I have one).

2. Jun 8, 2014