Skip to content
/ fract-ol Public

This project is meant to create graphically beautiful fractals.

License

Notifications You must be signed in to change notification settings

dpiza/fract-ol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fract-ol

42-BadgeC-Badge42Unlicense

Description

The term fractal was first used by mathematician Benoit Mandelbrot in 1974, he based it on the Latin word fractus, meaning "broken" or "fractured". A fractal is an abstract mathematical object, like a curve or a surface, which has a similar pattern whatever the scale.

Fract-ol however, is just a fractal browser.

Goals

This is the first project in which we use the graphical library miniLibX. This project also gives the opportunity to make use of the mathematical notion of complex numbers and to take a peek at the concept of optimization in computer graphics.

Mandatory

• The software should offer the Julia set and the Mandelbrot set.

• Mouse wheel zooms in and out.

• Use at least a few colors to show the depth of each fractal.

• A parameter is passed on the command line to define what type of fractal will be viewed. If no parameter is provided, or if the parameter is invalid, the program displays a list of available parameters and exits properly.

Bonus

• One more different fractal.

• The zoom follows the actual mouse position.

• In addition to the zoom: moving with the arrows.

• Make the color range shift.

Requirements

Minilibx

Install its dependencies:

sudo apt-get install gcc make xorg libxext-dev libbsd-dev

Clone minilibx repo:

$ git clone https://github.com/42Paris/minilibx-linux.git

Run the config tool:

./configure

For more details, check miniLibx repository Readme.

Usage

To compile the program, run:

$ make

Execute the software, providing the name of the fractal set and the seed, when necessary:

$ ./fractol Julia -0.73 0.14

Avaliable sets:

Mandelbrot
Julia
Celtic
Burning-Ship

Controls:

[W][A][S][D]: 		move screen
[E][Q]|[SCROLL]:	zoom in and out
[+][-]:			control iteration
[C][V]:			control seed (for Julia sets)
[SPACE]:		psychedelite
[R]:			reset fractal
[H]:			show menu

License

This work is published under the terms of 42 Unlicense