I really like the way that electrons move. Photons are limited in initial direction of movement. Neutrons have not only initial random direction selection, but also initial speed selection, and even worse they have slight random direction variations as they move.
Electrons have random initial direction but always have the same speed (sqrt(vx^2+vy^2)=constant), and don't have any random variations in direction of movement as they travel. So I went to elec.c and looked to see if I could find the code for this, and I can't. There are some references to vx and vy but only in a portion of the code that generates BOMB.
I need to know how the electron's initial velocity (speed and direction) is determined. Please help me.
powder.c line 999, right after photons, and neutron speeds are just before that as well. if (t==PT_ELEC) { float a = (rand()%360)*3.14159f/180.0f; parts[i].life = 680; parts[i].vx = 2.0f*cosf(a); parts[i].vy = 2.0f*sinf(a); }