Comment

Comment by torrance

The simplest way to do this is described here: https://mathworld.wolfram.com/SpherePointPicking.html

Essentially:

1. Generate uniformly random values u,v between 0 and 1.

2. Then find their spherical coordinates as:

theta = 2 pi u; phi = acos(2 v -1)

Honestly I’m unsure why you’d choose a method any more complicated.

parent torrance 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton