$ OCaml Mandelbrot Set
An interactive Mandelbrot set explorer written in OCaml using the Graphics library. The Mandelbrot set is the set of complex numbers c for which the iterationz = z² + c (starting from z = 0) remains bounded.
Points inside the set are colored black; points outside are colored based on how many iterations it takes to escape, producing the characteristic fractal boundary with infinite complexity at every scale.
### features
- -Interactive Zoom - Click to zoom in 2x centered on cursor, or use +/- keys
- -Pan Navigation - Use arrow keys or vim-style (h/j/k/l) to pan around
- -Smooth Rendering - Real-time rendering with escape-time algorithm
- -Color Gradients - Points outside the set colored by iteration count
- -Reset View - Return to the original coordinates with 'r' key
### controls
Click- Zoom in 2x at cursor position+ / =- Zoom in 2x at cursor position-- Zoom out 2x at cursor positionh / a / ←- Pan leftl / d / →- Pan rightj / s / ↓- Pan downk / w / ↑- Pan upr- Reset to original viewq / Esc- Quit### build & run
prerequisites
opam install . --deps-onlybuild
dune buildrun
dune exec mandelbrot### learn more
Explore the mathematics behind the Mandelbrot set and browse the source code.