Follow

RT @incre_ment@twitter.com

Probably trivial to the math folks, but recently learned that the correct way to uniformly distribute points in a circle is by generating coordinates in the following manner:

r = R*sqrt(random(1));

and

theta = random(TAU);

π¦π: https://twitter.com/incre_ment/status/1453728837829681155

Btw, you're approach seems efficient! Congrats

@frankiezafe

Oh not my idea. Found this by incre_ment over at the bird site :)

@bleeptrack I'm a trained mathematician and it would take me quite some time to derive that π³

@bleeptrack I like the use of tau and not 2*pi. How about a sphere? And when I think of spheres clouds come to mind.

I see that the sphere was already mentioned in the twitter thread. Thanks for bringing some interesting stuff from the birdsite to the fediverse.

I came across this great video on the same topic recently:

https://m.youtube.com/watch?v=4y_nmpv-9lI

@nepoh

Ooh! Thanks for sharing!

frankiezafe@frankiezafe@mastodon.xyz@bleeptrack did you compared to a poisson distribution? I know it's a good way to evenly distribute values in an surface, but i never implemented a function myself... After a quick research, i found a simple implementation here: https://math.stackexchange.com/questions/785188/simple-algorithm-for-generating-poisson-distribution

When i have to generate a fixed & non repetitive random sequence, i'm using this approach: https://m.youtube.com/watch?v=SxP30euw3-0

It involves primes and it's really good.