02-22-2016 11:45 AM
Yes, you are right ... I confused them.
02-22-2016 12:29 PM
Recall that the task was to generate a random unit vector in 3D. 3D implies 3 degrees of freedom, but "unit vector" constraint reduces the degrees of freedom by one -- it's not the sphere, but the surface of the sphere. Hence two parameters (often called "theta" (0 to 2pi) and "phi" (0 to pi) suffice. Note that phi does not need to go to two pi to get the "southern hemisphere".
Bob Schor
02-22-2016 12:38 PM
In my interpretation (please see the poste above):
Sure, zenith doesn't need to go over pi (if I properly understood your remark)
02-22-2016 12:55 PM
For Extra Credit, generate N points "randomly" distributed over the surface of a sphere. In particular, the points should not "clump" at the equator or poles. Hint -- theta (azimuth) is still uniformly distributed over 0 .. 2pi, and phi (elevation) still ranges from 0 .. pi (or -pi/2 to pi/2), but isn't quite uniform ...
Bob Schor
02-22-2016 12:58 PM
@Pavel_47 wrote:In my interpretation (please see the poste above):
- theta (zenith): 0 ... pi
- phi (azimuth): 0 ... 2pi
Sure, zenith doesn't need to go over pi (if I properly understood your remark)
Pavel -- I agree with you, the comment was meant for an earlier responder who commented on GerdW's post ...
BS
02-22-2016 01:07 PM
@Bob_Schor wrote:For Extra Credit, generate N points "randomly" distributed over the surface of a sphere. In particular, the points should not "clump" at the equator or poles. Hint -- theta (azimuth) is still uniformly distributed over 0 .. 2pi, and phi (elevation) still ranges from 0 .. pi (or -pi/2 to pi/2), but isn't quite uniform ...
Bob Schor
That is an excellent point Bob, and in my opinion it is not extra credit, but part of the original question!