R
Ron Natalie
How so? If the [0, sphere-radius] random number generator is uniform, so wouldStavros might need evenly distributed numbers. A polar coordinate scheme
would bunch numbers up around the center, at least.
the density with respect to the center.
The fix is to bound the sphere with a cube, tangent on all faces, and find
random points in the cube by finding random xyz points, each >= -r and < r,
where r is the radius of the sphere. Then filter out all points laying
outside the sphere, by comparing x^2 + y^2 + z^2 to r^2.
That wouldn't be any better and a lot slower as a lot of samples would have
to be generated, tested, and discarded.