Spirograph

Posted November 7, 2014. 141 words.

Spirograph

Despite the simplicity of their creation, a Spirograph can create complex and visually appealing shapes. Originally designed to help prevent banknote forgeries, the Spirograph is now a children’s toy sold worldwide.

Using commonly available mathematical equations I’ve created a simple simulation that creates many random Spirographs. Behind the scenes each Spirograph is rendered to a canvas buffer which is then drawn to the main canvas for performance.

Why not have a play, the code is available on GitHub.

Controls

  • Click or use +/-/C to create or remove spirographs.
  • Use the scroll wheel to speed up or slow down time.
  • Press space to play or pause the simulation.
  • Press T to toggle trails and I to invert.

Click here or the image above to start!

StatCounter Pixel