Skip to content

Latest commit

 

History

History
10 lines (8 loc) · 894 Bytes

File metadata and controls

10 lines (8 loc) · 894 Bytes

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)