random-position-on-the-surface-of-a-sphere icon indicating copy to clipboard operation
random-position-on-the-surface-of-a-sphere copied to clipboard

Sometimes you just need to postion things on the surface of a sphere. Here are a few methods I've used over the years.

Random Position On The Surface Of A Sphere

Sometimes you just need to postion things on the surface of a sphere. Here are a few methods I've used over the years.

Blog post coming soon.

getCartesianPositions(100000, 50) Note the vertical clustering. 😬 getCartesianPositions(100000, 50) getSphericalPositions(100000, 50) Note the clustering at the poles. 😠 getSphericalPositions(100000, 50) getSphericalPositionsWithBias(100000, 50, 1) Clustering at the equator! 😢 getSphericalPositionsWithBias(100000, 50, 1) getSphericalPositionsWithBias(100000, 50, 0.5) 🙂 getSphericalPositionsWithBias(100000, 50, 0.5) getUniformPositions(10000, 50) getUniformPositions(10000, 50)