News for hackers. Stuff that matters.
Re:How to generate uniformly random points on n-spheres and ... by porphyra on Tuesday March 05, 2024 @10:09PM (#39611848)
Another way to generate uniformly random points on a 2D disk that the author forgot to mention: let A be an n x n complex matrix whose elements are iid copies of a fixed random variable with unit variance. Let lambda_i be its ith eigenvalue, and let x_i = 1/sqrt(n) real(lambda_i) and y_i = 1/sqrt(n) imag(lambda_i). As n approaches infinity, the distribution of x, y approaches almost certainly to the uniform distribution over the unit disk.

Tao, T., Vu, V., and Krishnapur, M. (2010) Random matrices: universality of ESDs and the circular law. The Annals of Probability. 38(5) 2023-2065.

Re:How to generate uniformly random points on n-spheres and ... by kurlberg on Wednesday March 06, 2024 @02:16AM (#39613209)
It's very inefficient, both on terms of runtime and in terms wasted entropy.
Re:How to generate uniformly random points on n-spheres and ... by porphyra on Wednesday March 06, 2024 @01:17PM (#39619057)
Indeed, haha.