Fractals are intricate structures that exhibit self-similarity across different scales. The term "fractal" was first introduced by mathematician Benoit Mandelbrot in 1974, derived from the Latin word fractus, meaning "broken" or "fractured". Fractals can be seen as abstract mathematical objects that manifest in various natural phenomena, such as the mesmerizing patterns of a romanesco cabbage.
In this project, we explore the beauty of fractals through computer graphics, using the MLX42 library to render these captivating forms.
This project involves creating graphically beautiful fractals, focusing on the Julia set and the Mandelbrot set. Through this endeavor, we'll become familiar with MLX42 library and gain insights into complex numbers and computer graphics optimization.
- This program offer:
- The Julia set and the Mandelbrot set.
- Features include:
- The mouse wheel zooms in and out, almost infinitely (within the limits of the computer), embodying the essence of fractals.
- Different Julia sets can be created by passing varying parameters to the program.
- Parameters can be passed on the command line to define which fractal will be displayed. If no or invalid parameters are provided, the program will display a list of available parameters and exit properly. -I Used a variety of colors to illustrate the depth of each fractal, enhancing the visual experience with psychedelic effects.
- This program can:
- Display the image in a window using MLX42.
- Maintain smooth management of the window (including switching to another window, minimizing, etc.).
- Allow the user to close the window cleanly by pressing ESC or clicking the close button on the window's frame.
- Additional features were implemented:
- The zoom follows the actual mouse position.
- Enable movement of the view using the arrow keys.
- Shift the color range by pressing the space key.
Clone the repository:
git clone https://github.com/roma-sh/fract-ol.git
cd fractalmake
./fractol <parameters>- mandelbrot: Displays the Mandelbrot set.
- julia [real] [imaginary]: Displays the Julia set with the given real and imaginary parts.
- If no parameters are provided, the program will display a list of available parameters.
./fractol mandelbrot./fraactol julia -0.8 0.156- Mouse Wheel: Zoom in and out of the fractal.
- Arrow Keys: Move the view left, right, up, or down.
- Space: Shift the color range for visual effects.
- ESC: Close the window and exit the program.
- Close Button: Click the close button on the window's frame to exit cleanly.




