Real-time Mandelbrot, Julia and Burning Ship fractal renderer built in C using MiniLibX.
Fractol is an interactive visualization tool that renders mathematical fractals in real time.
It allows smooth zooming, panning, live parameter tuning and color exploration to better understand complex numbers and fractal geometry.
- Real-time zoom (mouse wheel, cursor-centered)
- Smooth panning with arrow keys
- Mandelbrot, Julia and Burning Ship fractals
- Live Julia parameter editing (interactive exploration / animation-like effects)
- 6 color palettes (keys 1–6)
- Event-driven rendering loop
- Instant redraw using off-screen image buffer
- Exit with ESC or window close
- C (gcc)
- MiniLibX (42 graphics library)
- X11
- libft (custom standard library)
- Floating-point math & complex numbers
- Event-driven programming
sudo apt install libx11-dev libxext-dev libbsd-devgit clone --recurse-submodules git@github.com:tomjoy75/Fractol.git fractol
cd fractol
make./fractol mandelbrot
./fractol burning_ship
./fractol julia <real> <imaginary>
Example:
./fractol julia -0.8 0.156
| Key | Action |
|---|---|
| Mouse wheel | Zoom in / out (cursor centered) |
| Arrow keys | Move view |
| ESC | Quit |
| Key | Action |
|---|---|
| F1 → F6 | Change palette |
| Key | Action |
|---|---|
| W / S | Modify imaginary component |
| A / D | Modify real component |
| Y U I O P | Preset Julia shapes |
.
├── srcs/
│ ├── rendering.c
│ ├── fractals.c
│ ├── graphics.c
│ ├── colors.c
│ ├── input.c
│ ├── keys.c
│ ├── movement.c
│ ├── zoom.c
│ └── utils.c
│
├── libft/
├── minilibx-linux/
├── fractol.h
├── Makefile
└── README.md
This project was my first real encounter with:
- complex numbers and fractal mathematics
- visualizing mathematical systems through graphics
- building a small real-time rendering pipeline
- drawing into an image buffer before displaying (faster than pixel-by-pixel)
- event-driven programming (keyboard/mouse hooks)
- performance trade-offs between iterations and frame rate
- low-level memory management in C It also showed how small parameter changes in Julia sets can generate organic, almost animated shapes.
## 💡 Improvements / Roadmap
- GIF/animation export tool
- Fullscreen mode
- More palettes / shaders
- Additional fractals
Educational project — 42 School
