3d snakes trying to get out of the prison cube.
This may cook your CPU.
The algorithm in bitworms was the basis for this: http://codepen.io/raurir/pen/Cviyl
Just added a dimension.
I call this Random Normal as it effectively generates randomized unit vectors uniformly distributed.
Instead of using x = random(2)-1, y = random(2)-1, z = random(2)-1 then normalized.. which is rather poor in many reasons.
We compute the euler angles for theta and phi. It works on a nice property of arc-cos which is a uniform distribution of the 'y' axis just by using -1 to 1.
as you can see by the rotating sphere.. no polar bias. lovely.
Procedural Animated Gears
See the full Fractal Gears experiment:
http://brm.io/gears/
More of the source at:
https://github.com/liabru/gears-d3-js
Uses the awesome d3.js by @mbostock