Skip to content

One of the first graphical projects at 42 school, fract-ol introduces us to 2D programming with fractal generation.

License

Notifications You must be signed in to change notification settings

RogerioLS/Fractol-42sp

Repository files navigation

📋 Fractol | 42 SP

Norminette Build Static Badge 42 São Paulo License Code size in bytes Top language Last commit Repo size Languages GitHub repo file count (file type) Discord


  • Actual Status : finished.
  • Result : Approved with 120 points ✅

📜 About Project

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.

📑 Fractals List

The program supports these fractal sets:

Name Formula
Mandelbrot $z_{n+1} = z_n^2 + c, z_0 = 0$
Julia $z_{n+1} = z_n^2 + c, z_0 = c$

🎮 Controls

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

👨‍💻 Usage

Requirements

The program is written in C language and thus needs the gcc compiler and some standard C libraries to run.

Instructions

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.

About

One of the first graphical projects at 42 school, fract-ol introduces us to 2D programming with fractal generation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published