This is a small javascript program that simulates a spirograph based on the mathematical formulas described in Mathematische Basteleien The implementation is done with html canvas and javascript
Click to download the image