Skip to content

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

License

Notifications You must be signed in to change notification settings

defmech/random-position-on-the-surface-of-a-sphere

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published