mercredi 19 mai 2021

Generate random points that uniformly cover a circle, using polar coordinates (Theta, R) with Theta uniformly sampled

Extending this beautifully answered question: "Generate a random point within a circle uniformly" ,

I need to generate points uniformly covering the area of a circle as well, but I also need to keep Theta uniformly-random generated. So, my question is, from what distribution should I sample the R to "counter" the effect of uniformly sampling the Theta, to still produce uniformly distributed points inside the circle and not gathered towards the centre.

Intuitively, I guess that I need some distribution that favors high R, but which may be this distribution and with what exact parameters to exact-counter the outwards diminishing points density.




Aucun commentaire:

Enregistrer un commentaire