Uploaded November 2019 | Updated September 2026, 3 weeks ago
The Chaos Game is a simple algorithm that generates some very surprising fractal patterns from a sequence of random moves. This video shows a bare-bones implementation of The Chaos Game using JavaScript drawing to an HTML 5 Canvas; you can try it for yourself at oview.co.uk/the-chaos-game.
Learn more about The Chaos Game and all the variations that are possible by reading the Wiki page:
en.wikipedia.org/wiki/Chaos_game
The code for the web page is available on GitHub here:
github.com/ChrisBLong/TheChaosGame
You can grab the code from GitHub or just save it from your browser. If you're interested in coding, try editing the code to change how it works and see what other patterns you can make - there are some ideas on the Wiki page, or just experiment and see what happens. For example, the point doesn't have to move half-way to the chosen vertex each time - what happens if you move one-third of the way, or two-thirds? Can you find an interesting way to colour-code each point?
The Chaos Game is a simple algorithm that generates some very surprising fractal patterns from a sequence of random moves. This video shows a bare-bones implementation of The Chaos Game using JavaScript drawing to an HTML 5 Canvas; you can try it for yourself at oview.co.uk/the-chaos-game.
Learn more about The Chaos Game and all the variations that are possible by reading the Wiki page:
en.wikipedia.org/wiki/Chaos_game
The code for the web page is available on GitHub here:
github.com/ChrisBLong/TheChaosGame
You can grab the code from GitHub or just save it from your browser. If you're interested in coding, try editing the code to change how it works and see what other patterns you can make - there are some ideas on the Wiki page, or just experiment and see what happens. For example, the point doesn't have to move half-way to the chosen vertex each time - what happens if you move one-third of the way, or two-thirds? Can you find an interesting way to colour-code each point?










