Python code for getting uniformly distributed points on or inside a sphere
from randomSpherePoints import randomPointOnSphere
x,y,z = randomPointOnSphere()
# p = (x,y,z) is uniformly distributed on the surface of the unit sphere
from randomSpherePoints import randomPointInsideSphere
x,y,z = randomPointInsideSphere()
# p = (x,y,z) is uniformly distributed inside the unit sphere