---
title: 'Chaos Game'
url: 'https://blog.recursiveprocess.com/2013/07/03/chaos-game'
markdown: 'https://blog.recursiveprocess.com/2013/07/03/chaos-game.md'
date: '2013-07-03'
description: "The chaos game, previously seen on Frank Noschese’s 180 blog and Jonathan Clayton’s blog Infinite Sums. I had to make this myself (deja vu?). Here’s what I made (processing 2.0): Check it out live. All these live links will probably work great on your smartphone too.\_Source code.…"
taxonomy:
  category:
    - blog
---

# Chaos Game

### [Chaos Game](https://blog.recursiveprocess.com/2013/07/03/chaos-game)

   July 3, 2013, 12:00 am  

[The chaos game](http://www.jcu.edu/math/vignettes/chaosgame.htm), previously seen on [Frank Noschese’s 180 blog](http://noschese180.wordpress.com/2012/05/29/day-167-the-chaos-game/) and [Jonathan Clayton’s blog](http://infinitesums.com/commentary/2013/6/15/the-chaos-game.html) [Infinite Sums](http://infinitesums.com/).

I had to make this myself ([deja vu?](https://blog.recursiveprocess.com/2013/06/06/fractal-brownian-tree/)). Here’s what I made (processing 2.0):

![2013-07-03_13h12_06](https://blog.recursiveprocess.com/wp-content/uploads/2013/07/2013-07-03_13h12_061.png)

[Check it out live](http://recursiveprocess.com/chaos/). All these live links will probably work great on your smartphone too. [Source code](http://recursiveprocess.com/chaos/chaos.pde).

## Variations

- [Random Triangle Chaos game](http://recursiveprocess.com/chaosrandom/). Click to set a new random triangle. [Source code](http://recursiveprocess.com/chaosrandom/chaosrandom.pde).
- [Square Chaos game](http://recursiveprocess.com/chaossquare/). Any key to refresh. Left click to “zoom out”. Right click to “zoom in”. [Source code](http://recursiveprocess.com/chaossquare/chaossquare.pde).
- [Square Chaos game version 2](http://recursiveprocess.com/chaossquarev2/). Any key to refresh. Left click to “zoom out”. Right click to “zoom in”. [Source code](http://recursiveprocess.com/chaossquarev2/chaossquarev2.pde).
- [Pentagon Chaos game](http://recursiveprocess.com/chaospentagon/). Any key to refresh. Left click to “zoom out”. Right click to “zoom in”. [Source code](http://recursiveprocess.com/chaospentagon/chaospentagon.pde).
- [Hexagon Chaos game](http://recursiveprocess.com/chaoshexagon/). Any key to refresh. Left click to “zoom out”. Right click to “zoom in”. [Source code](http://recursiveprocess.com/chaoshexagon/chaoshexagon.pde). (Do you notice anything in the negative space?)

## Homework

Can you create any modifications from this source code? Getting started is relatively easy: download processing 2.0.1, paste the source code in and press run.

Note: Thanks to the [Math open reference for an applet](http://www.mathopenref.com/coordpolycalc.html) to calculate the vertex coordinates for the hexagon and pentagon and saving me a little time.

 [ Next Post](https://blog.recursiveprocess.com/2013/07/04/bouncing-balls-python-simulation) [Previous Post ](https://blog.recursiveprocess.com/2013/06/06/fractal-brownian-tree)

#### SimpleSearch

Bootstrap Theme for [Grav](http://getgrav.org)

---

## Navigation

- Parent: [A Recursive Process](https://blog.recursiveprocess.com/index.md)
- Previous: [Bouncing balls python simulation](https://blog.recursiveprocess.com/2013/07/04/bouncing-balls-python-simulation.md)
- Next: [Fractal Brownian Tree](https://blog.recursiveprocess.com/2013/06/06/fractal-brownian-tree.md)
