This is a toy program to render Iterated Function System fractals with Rust and OpenGL. Glium is used for OpenGL and the GUI is provided by imgui-rs.
An IFS consists of several functions f(x_0, y_0) -> (x, y)
, each with a given probability. To construct the fractal, start at the origin and do the following:
f
at random from the IFSf
to itThis program implements a linear transform with 6 parameters a
through f
: x = a * x_0 + b * y_0 + e
, y = c * x_0 + d * y_0 + f
.
Just use Cargo: $ cargo run --release
The default IFS is a Barnsley's Fern. Here's a GIF of the visualizer: