In this repo you will find all the codes developed during the fract'ol project, both mandatory's part and bonus.
Note that this project was tested on MacOS only. It may run on Linux with small adjustments to the Makefile, as described in hsmits and jvan-sni's 42 Docs.
Clone the repository, including the embedded MiniLibX repository:
git clone https://github.com/pix3l-p33p3r/fract-ol.git && cd fract-ol
You will now be in the correct directory for compilation. Compile with make
. Fract-ol should now be ready!
At execution time, you must specify a fractal to display. You may also provide other optional parameters:
./fractol <number>
Types are :
1
: Mandelbrot fractal2
: Julia fractal
- Requires additional parameters for imaginary and real constants:
<imaginary_constant>
: Imaginary part of the Julia set constant<real_constant>
: Real part of the Julia set constant
3
: 4th Mandelbrot (Burning Ship) fractal
For the Julia fractal set (and only this set), two additional parameters can be specified as calculation values. These represent a complex number that will change the shape of the Julia fractal. They must be fractional numbers between 2.0 and -2.0. For example:
./fractol 2 0.285 -0.01
While Fractol is running, the following set of controls are available:
Controls | Action |
▲ ◄ ▼ ► | Move |
scroll wheel | Zoom in and out (zoom follows the actual mouse position) |
r , g , b | Change color scheme (r for red, g for green, b for blue) |
esc or close window | Quit fract-ol |