Fract-ol

Cover Image for Fract-ol
Amine Beihaqi
Amine Beihaqi

Fract-ol

Summary: This project is about creating graphically beautiful fractals.

The term fractal was first used by mathematician Benoit Mandelbrot in 1974. He based it on the Latin word fractus which means "broken" or "fractured". A fractal is an abstract mathematical object, like a curve or a surface, which pattern remains the same at every scale.

Equations

The Mandelbrot and Julia set is calculated by iterating the equation

zn+1 = zn2 + c

where i = √-1 and x and y are the horizontal and vertical position of the location within the fractal whose color you wish to calculate.

The calculation is repeated until |zn| > 2, and colors are assigned to each location depending on the number of iterations required until this condition is met.

A maximum number of iterations needs to be specified, because in some parts of the fractal, the iteration sequence above will never end. This is true in the 'lake' area in the center of the fractal.

Mandelbrot Set

The starting conditions are

Z0 = 0

and

c = x + iy

Julia Set

The starting conditions are

Z0 = x + iy

and

c = x0 + iy0

x0 and y0 are two numerical constants which define a two-dimensional set of different Julia sets.

usage

$./fractol
usage: fractol <set> [-c x y] [-z number] [-m number] [-p palette] | [-h | --help]
	<set>: {mandelbrot | mandelbrot1 | mandelbrot3 | julia | burningship}
	-c x y: center point where x and y are float numbers between (-2, 2)
	-z number: zoom where number is a float number > 0
	-m number: max iteration where number is a float number > 0
	-p palette: color palette {redmoon | white | trip | lsd}
	-h or --help: to display this message

mandelbrot

mandelbrot

Julia lsd

julia_lsd

Julia trip

julia_trip

burningship

burningship

burningship julia

burningship_julia

burningship julia trip

burningship_julia_trip