How does the VEX function "sample_sphere_uniform" work?

   785   1   0
User Avatar
Member
20 posts
Joined: June 2019
Offline
When I explore the function "sample_sphere_uniform", I don't understand how it works behind its parameter "vector u". It doesn't seem to correspond to x, y, z in normal situations. Could anyone explain what the three components of vector u here mean? I have seen people in some cases control the rotation of a point on the sphere by controlling this vector type parameter. I want to know the logic behind it.

Thanks
User Avatar
Member
7770 posts
Joined: Sept. 2011
Offline
x, y, z components of v are theta phi and radius of polar coordinates, distributed such that a uniformly distributed cartesian coordinate system in the range of 0-1 will be uniformly distributed in a sphere interior.
  • Quick Links