News for hackers. Stuff that matters.
Re:Random(Random(Random(Random()))) by em-bee on Monday May 15, 2023 @05:34PM (#35954785)
right, if the points are distributed in a square then the distribution looks more like what one would expect:

(i am to lazy to register to make a fork, here is the code change):

replace:

  let a = random(Math.PI*2);
  let r = d * (1 - random());
  point(cos(a)*r, sin(a)*r);
with:

  let a = random(d);
  let r = d \* (1 - random());
  point(a, r);
in every block
Re:Random(Random(Random(Random()))) by SamBam on Monday May 15, 2023 @09:54PM (#35956956)
Yup, that's way more intuitive, and removes the artifact of the first circle looking like the points are clustered around the middle:

I forked it: https://openprocessing.org/sketch/1929579

Re:Random(Random(Random(Random()))) by msuvakov on Tuesday May 16, 2023 @12:49AM (#35957844)
I forked it with similar idea: https://openprocessing.org/sketch/1929687
Re:Random(Random(Random(Random()))) by em-bee on Tuesday May 16, 2023 @01:09AM (#35957931)
heh, neat. next up a 7x7 grid with the even distribution at the center :-)