https://github.com/inesalves44/fract-ol
fract-ol project
https://github.com/inesalves44/fract-ol
Last synced: 21 days ago
JSON representation
fract-ol project
- Host: GitHub
- URL: https://github.com/inesalves44/fract-ol
- Owner: inesalves44
- Created: 2023-01-15T12:05:52.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-19T16:36:05.000Z (about 2 years ago)
- Last Synced: 2024-10-29T06:33:22.285Z (6 months ago)
- Language: C
- Size: 241 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- 42-resources - fract-ol
README
# Fract-ol (42 lvl - 2)
## OverviewThis is a repository for the 42 school project of fract-ol.
The point for this project is to create a program that renders different fractals.### What is a fractal?
According to Wikipedia a fractal is: "In mathematics, a fractal is a geometric shape containing detailed structure at arbitrarily small scales, usually having a fractal dimension strictly exceeding the topological dimension".
Basically a fractal is a geometric figure with a never ending pattern.
## Mandatory Part
For the mandatory part, the objective was to use mlx library to create, in a window the Mandelbrot set and the Julia set.
To run the mandatory part in the project directory write: make all.
The project runs like this:
```
./fractol FRACTAL
```
For the mandatory part for both fractals here are the options:1) To change the window size run the program with iwNUMBER and ihNUMBER (in what order you want);
```
For example: ./fractol mandelbrot iw300 ih500
```
2) The mousewheel zooms in and out in the center;
3) ESC and the cross of the window closes the window.### Mandelbrot Set
Mathematical formula: f(z) = z² + C (iterating different values of C, which is a complex number)
### Julia Set
Mathematical formula: f(z) = z² + C -> Here the C is constant.
For the Julia set you can also change the image by runing the program like this:
```
./fractol Julia cxNUMBER cyNUMBER -> the cx nuber should be between -2 and 1 and the cy should be between -1,5 and 1,5!
```## Bonus
To compile the bonus: make bonus.
For the Bonus you can run the program only by:
```
./fractol
```Then this window will be displayed and you should input in the terminal one of the options (numbers or fractals).

After reading the input from the terminal we have this prompt:

This window shows you the rendering options!
### Mandelbrot

zoom
### Julia

zoom + changing inputs and colors!
### Burning Ship

The Burning Ship is a fractal that works with the module of mandelbrot!
### Make Commands
```
make all - creates executable
make bonus - creates executable for bonus
make clean - clean the objects
make fclean - clean executable and any library, also runs clean
make re - runs clean and fclean and then runs all to create the executable
make rebonus - runs clean and fclean and then runs all to create the executable for bonus
```
## Links
[Mandelbrot example](http://warp.povusers.org/Mandelbrot/)
[Julia example](https://lodev.org/cgtutor/juliamandelbrot.html)
[Minilibx](https://harm-smits.github.io/42docs/libs/minilibx)Thanks for reading!!
you can slack me: [idias-al](https://profile.intra.42.fr/users/idias-al)