News for hackers. Stuff that matters.
Re:Uniformly Sample Points in a Disk by toxicFork on Thursday May 26, 2022 @09:48AM (#31518286)
Re:Uniformly Sample Points in a Disk by keefe8 on Saturday May 28, 2022 @04:08AM (#31538520)
I meant to show the output of my code, but Pasteboard was down at the time: https://gcdnb.pbrd.co/images/f8bgGZMW3deq.png?o=1
Re:Uniformly Sample Points in a Disk by Malipeddi on Thursday May 26, 2022 @10:35AM (#31518817)
Normal distribution is not the same as uniform distribution. I edited in a normal distribution sampler in your codepen example.

https://pastebin.com/raw/CP4yNRE9

Re:Uniformly Sample Points in a Disk by toxicFork on Thursday May 26, 2022 @11:09AM (#31519278)
I see, thanks!
Re:Uniformly Sample Points in a Disk by eru on Thursday May 26, 2022 @11:41PM (#31525805)
Btw, the following two are equivalent (in JavaScript syntax):

    var a = Math.max(Math.random(), Math.random());
    var b = Math.sqrt(Math.random());
Re:Uniformly Sample Points in a Disk by toxicFork on Friday May 27, 2022 @01:12AM (#31526207)
Curious, how come? Does it become a statistical thing?
Re:Uniformly Sample Points in a Disk by eru on Monday May 30, 2022 @04:11AM (#31556619)
Well, not sure whether you'd call it statistics. It's a mathematical fact from probability theory. And it doesn't matter how often you sample: the distributions themselves are the same.

I came across that one in the other direction, when trying to work out how to make weighted rendezvous hashing work. See https://en.wikipedia.org/wiki/Rendezvous_hashing