3 ms·
I had some time! It looks reasonably random to my eye: https://editor.p5js.org/fancybone/sketches/DUFhlJvOZ https://editor.p5js.org/fancybone/sketches/DUFhlJvO
by pavel_lishin 1y ago
I had some time!
It looks reasonably random to my eye: https://editor.p5js.org/fancybone/sketches/DUFhlJvOZ https://editor.p5js.org/fancybone/sketches/DUFhlJvOZ
- guccihat 1y agoCool demo. A minor nitpick is that the code (and the article) forgets to handle the special case of a point inside the cube that happens to be exactly (0,0,0). This will result in a divide by zero when the vector is normalized.
- NoahZuniga 1y agoThe chance of this happening is less than 1 in 2^128. This will never happen.
- pavel_lishin 1y agoUnless you're demoing it to someone very important, in which case it'll happen twice in a row.
- rkomorn 1y agoEspecially if you have already had the conversation with anyone and confidently stated that, yes, the possibility exists but it's so remote that it's just not worth addressing.
- cluckindan 1y agoWith long enough timescales, every event with a non-zero probability will eventually happen.
- pavel_lishin 1y agoThat nitpick is both minor, and absolutely correct!
- spyrja 1y agoKind of? If you want the points to be more randomly-distributed, something like this would probably be a better approach: https://editor.p5js.org/spyrja/sketches/eYt7H36Ka https://editor.p5js.org/spyrja/sketches/eYt7H36Ka