Remix.run Logo
pavel_lishin 2 days ago

I had some time!

It looks reasonably random to my eye: https://editor.p5js.org/fancybone/sketches/DUFhlJvOZ

guccihat 2 days ago | parent [-]

Cool 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 2 days ago | parent | next [-]

The chance of this happening is less than 1 in 2^128. This will never happen.

pavel_lishin a day ago | parent [-]

Unless you're demoing it to someone very important, in which case it'll happen twice in a row.

pavel_lishin a day ago | parent | prev [-]

That nitpick is both minor, and absolutely correct!