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.
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.