Chaos Game: Three Dimensions

Note: Please adjust width of browser if only one column is visible.
[Click here for another Shiny app on the Chaos Game]

In the 3 dimensional version of the Chaos Game we start with a regular polyhedron and mark selected points which will typically be the vertices. These points will be called endpoints and will be marked with red squares. The game begins by randomly choosing a starting point and one of the endpoints. Mark a new point at a fixed distance ratio from the starting point to the endpoint (e.g., halfway to the endpoint). Select another endpoint at random and, with the most recently created point, repeat the process to generate the next point and continue. By applying the right distance ratio the resulting set of points can converge to a beautiful image known as a fractal. For each polyhedron the required distance ratio to yield a fractal will be provided, but try different settings to see what other patterns may arise!


Chaos Game -- 3 Dimensions

For Tetrahedron default value is 0.50
For Cube default value is 0.67 (2/3)
For Dodecahedron default value is 0.72



Click Randomize to re-randomize outcomes based on current settings.





Shiny app by Jimmy Doi
Base R code by Jimmy Doi
Shiny source files: GitHub Gist
Cal Poly Statistics Dept Shiny Series

NOTE: In the image above all points nearest a particular vertex/endpoint are shown in a common color. Rotate the image by clicking your mouse within the plot and dragging the cursor. Also, use the scroll wheel of the mouse to zoom in/out of the image. Set the sequence percentage to 100% and slightly zoom out to improve image resolution.



For a better understanding of the chaos game, please click here to access the 2 dimensional version of the app. Use the animation in the 'Initial Sequence' plot to see a step-by-step progression of the game.