Chaos game
EBB only. DrawCore does not support sessions.
Chaos game
The chaos game is a simple maths trick anyone with a little patience and a sharp pencil can try. Start with a point inside a triangle. Choose one of its three corners at random, move halfway towards it and mark a dot. Repeat the same rule, and a Sierpinski triangle gradually appears: a simple rule revealing a beautiful, complex structure.
Here, the sketch calculates one point, plots it and waits before calculating the next. Try the screen demo, or click the drawing to start your plotter. The carriage returns home after the last point.
Thank you to Ben Sparks and Numberphile for their explanation in Chaos Game.
sketch.js
// loading sketch.js …
- Calculated
- —
- Completed
- —
- Paper
- —
- Paper position
- —
Click the drawing to start plotting; click again to stop.
index.html
Loading module...
strategy: "drawn" to preserve the order of the game. Try changing the number of points and watch when the triangle becomes recognisable.