Skip to content

Fraddosse1/Fractal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fractal

Simple fractal generator built with C and SDL2 library.

Results

Mandelbrot

Iterative formula of the Mandelbrot set $$z_{n+1} = z_n^2 + c$$

Generation with 10 000 iterations Mandelbrot set 800 iterations

Tech Stack

Language

C

Libraries

SDL2

Graphics API

OpenGL

Build System/Tools

  • CMake
  • GCC compiler
  • VsCode IDE

Operating Systems

  • Linux
  • Windows

Project structure

.
├── CMakeLists.txt
├── include
│   └── Functions.h
├── README.md
├── results
│   └── Fractale_generation.png
└── src
    ├── Functions.c
    └── main.c

How to use ?

The CMakeLists file already includes a fetching functionnality in case SDL2 isn't already installed in your computer. You can directly use the following commands after cloning the project :

cmake -B build          # generates build files
cmake --build build     # compile

Before running, you may need to pay attention to the number of iterations defined in the include/Functions.h directory. The default number of iterations has been set to 2000 but you can set it to whichever value you want (200 iterations is a good starting point). You can also change the default monitor to display the generation on by changing the defined value of MONITOR_INDEX in the Functions.h file. After fixing the number of iterations, you can run the generation using this command :

./build/Fractale        # run

v

Dependencies

SDL2 >= 2.30.0     # Used as graphic library
lim                # For complex math functions (csqrt, etc)

About

Simple fractal generator built with C and SDL2 library.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors