Chaos Game Fractal Generator
A simple command-line application written in Rust for generating fractals using the 'Chaos Game' algorithm.
Table of Contents
Algorithm Description
This application generates fractals using the following simple, iterative algorithm:
Define the $n$ vertices of a regular polygon Choose a random initial point within the polygon Select one of the polygon's vertices at random Move the current point a specific ratio, $r$ , of the distance towards the chosen vertex Repeat steps 3 and 4 for some large number of iterations, plotting each new point
By adjusting the number of vertices, the distance ratio, and optionally adding additional restrictions to the choice of vertices, a huge variety of intricate fractal patterns can be generated. More details on the algorithm can be found here.
Gallery
Below are some example fractals generated with this application.
Fractal Parameters Image Sierpiński Triangle $n=3$ , $r=0.5$ Rainbow Hex Fractal $n=6$ , $r=0.5$ Spirals Fractal $n=5$ , $r=0.5$ , Rule: Cannot pick the same vertex twice in a row. Star Fractal $n=5$ , $r=0.5$ , Rule: If a vertex is picked twice in a row, the next pick cannot be a direct neighbour of it.
... continue reading