Skip to content

keyan/mandelbrot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mandelbrot

Interactive Mandelbrot set visualizer.

Uses the ebiten game library to run an interactive window. To allow rendering in realtime with user input, some approximation is used to skip computations for some pixels, leading to frames improving in appearance as user input stops and re-rendering happens.

A still frame from the visualizer: still

Here is what the program looks like when used interactively, keep in mind the quality here is poor due to the low gif framerate and additional compression: live

Usage

A live demo is available, but the performance in a browser is ~10X worse than running directly on a computer, also give it a few seconds to load: https://keyanp.com/mandelbrot/index.html

To build and run from source:

make

If you are on MacOSX there is a precompiled binary on GitHub you can run:

./mandelbrot

Controls are explained when the window first loads, but for completeness:

Arrow keys to move
I to zoom In
O to zoom Out
R to reset view
Escape to exit

Resources

I found the youtube channel fractalmath to be helpful for better understanding complex plane dynamics. Lode Vandevenne also has a useful tutorial as well, but as with most of his articles it can be tough to follow. The ebiten examples page was invaluable in quickly using that library for the graphical/interactive portions.