Photon Tracking Code

  • Thread starter Uranium
  • Start date
  • #1
24
0
Hello all,

I'm working on coding a program that tracks photons based on Compton Scattering. However, I'm having an issue on how to deal with photons with multiple scatters. So, phi (polar) and theta (azimuthal) range from 0-pi/2 and 0-2pi, respectively, based on a random number generator. How do I calculate the new dx, dy, and dz after the first scatter. I guess I'm just not sure how to represent the incident vector and its effect on the vector after collision.
 

Answers and Replies

  • #2
201
10
If I understand correctly your problem how to determine the position of the new vector in the original coordinate frame?

IE, you have a particle with moving with vector (Vx,Vy,Vz) (or alternatively (V,theta,phi)) in the original frame. This particle then interacts by scattering causing it to change direction. The scattering angle is measured from the incident vector and this needs to be represented in the original frame.

The only way I know how to do this is to use transformation matrices which can get messy pretty quickly. I've done similar problem for my robotics class in the pass, you may find it useful to look at the problem from a similar way.
Try starting with this link:
http://commons.bcit.ca/math/examples/robotics/linear_algebra/index.html
 

Related Threads on Photon Tracking Code

  • Last Post
Replies
5
Views
5K
  • Last Post
Replies
5
Views
4K
  • Last Post
Replies
3
Views
4K
  • Last Post
Replies
14
Views
3K
  • Last Post
Replies
8
Views
5K
  • Last Post
Replies
1
Views
3K
  • Last Post
Replies
1
Views
4K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
1
Views
1K
Top