Skip to content

Comment on How to generate uniformly random points on n-spheres and in n-balls

Comments

I encountered the need for uniform random points on hyperspheres, and found this solution (with Python code) very helpful: https://stackoverflow.com/a/59279721.

Currently, I am porting my codebase to Rust and did that part over the weekend, so if anyone is interested in this exact implementation, I'd willing to share it (as a crate if necessary).

The linked SO question is not about uniform random points. The poster explicitly excludes answers involving uniform random distribution on a hypersphere.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.