- Actual Status : finished.
- Result : Approved with 120 points ✅
One of the first graphical projects at 42 School, fract-ol generates beautiful fractals from the complex numbers of
an iterative mathematical construct. A fractal is a fragmented geometrical figure that infinitely repeats itself at
smaller scales. This project uses the school's graphical library, MiniLibX.
For detailed information, refer to the subject of this project.
🚀 TLDR: The fract-ol project is one of the three "beginner" graphical projects of the
cursus. It teaches you about using graphic library, advanced math, and more.
The program supports these fractal sets:
Name | Formula |
---|---|
Mandelbrot | |
Julia |
The program supports the following controls:
Key | Description |
---|---|
ESC | Close the program window |
Mouse Scroll | Zoom in and out of the fractal |
⬆️ ⬇️ ⬅️ ➡️ | Change the viewpoint |
The program is written in C language and thus needs the gcc compiler and some standard C libraries to run.
1. Compiling the program
To compile the program, run:
$ git clone https://github.com/RogerioLS/Fractol-42sp/tree/main && cd Fractol-42sp && make
2. How to run the program
Run the executable too see the help message:
./fractol
Please enter:
"./fractol mandelbrot" or
"./fractol tricorn" or
"./fractol julia 0.285 +0"
"./fractol julia 0.285 +0.01"
"./fractol julia 0.45 +0.1428"
"./fractol julia -0.835 -0.232"
"./fractol julia −0.7269 +0.1889"
"./fractol julia 0.35 +0.35"
"./fractol julia 0.4 +0.4"
Note
Because of 42 School norm requirements:
- Each function can't have more than 25 lines of code.
- All variables are declared and aligned at the top of each function.
- Project should be created just with allowed functions otherwise it's cheating.