fract_ol
is a graphical program that allows users to visualize various fractals, such as the Mandelbrot set, Julia set, and other popular fractals. The program leverages the MiniLibX graphics library for rendering and user interaction. This project demonstrates a fundamental understanding of fractal mathematics, computer graphics, and the usage of the MiniLibX library for graphical applications.
- A Unix-based system (Linux, macOS, or similar)
- MiniLibX library installed (Typically provided with 42 projects)
- GCC (GNU Compiler Collection) for compiling C code
-
Clone the repository:
git clone https://github.com/yourusername/fract_ol.git cd fract_ol
-
Compile the project:
make
-
Run the program:
./fract_ol
This will launch the fractal viewer, allowing you to interact with the various fractals.
After running the program, you will see a window with a graphical representation of a fractal. You can interact with the fractal using the following controls:
The following fractals are supported by fract_ol
:
- Mandelbrot Set: A set of complex numbers that produces a famous fractal.
- Julia Set: A family of fractals that are closely related to the Mandelbrot set.
- Burning Ship: A fractal that is similar to the Mandelbrot set but with a different mathematical formulation.
Here are the key mathematical equations used to generate the fractals:
For a complex number C = a + bi
, the Mandelbrot set is defined as the set of complex numbers C
for which the function:
[ f(z) = z^2 + C ]
does not diverge when iterated from z = 0
. The iteration continues until a maximum number of iterations is reached or the absolute value of z
exceeds a threshold.
For a complex number C = a + bi
and a point Z = x + yi
, the Julia set is defined by the equation:
[ f(Z) = Z^2 + C ]
where C
is constant, and Z
is iterated.
Similar to the Mandelbrot set, but the equation for the Burning Ship fractal is:
[ f(Z) = (Re(Z)^2 - Im(Z)^2 + a) + (2 * |Re(Z) * Im(Z)| + b)i ]
This equation creates a fractal that looks similar to the Mandelbrot set, but with a different shape.
Contributions are welcome! If you have ideas for new features, improvements, or bug fixes, please fork the repository and submit a pull request. Make sure to include tests and follow the coding standards.
This project is licensed under the MIT License - see the LICENSE file for details.
this guide is AI generated, i will write a better one with pictures and helpfule resources in the upcoming weeks