This project has been developed as a part of the 42 Madrid Fundación Telefónica Programming Campus. It contains a Mandolbrot set / Julia sets generator. It can also generate 3D point clouds stacking images of the sets.
The aforementionned fractal sets are generated by iterating the function: Z(n+1) = [Z(n)]^2 + C, where Z and C are both complex numbers.
Mandelbrot is generated by setting Z0 = 0+0i and each pixel corresponds to a different value of C. On the other hand, the Julia sets are generated by setting a different C for each set and a different Z0 for each pixel.
./fractol m|j [re] [im]
If re and im are included, they will set the value of C for the Julia set. Each set will open in a different window, one will be occulting the other at startup. Drag the sets to explore them, use the mouse wheel to zoom in and out. Hold ctrl key and hover over a set to change the other set's parameter.
Right click and drag to blow your mind into an interactive 3D cloud of points. Drag 3D view to rotate it, use the mouse wheel to zoom in and out.
Instead of the usual complex numbers, quaternions have been used to handle the math part of the project.
They can represent a 4D point and they are a perfect tool for 3D rotations.
The Mandelbrot set and the Julia sets can be considered as different 2D sections of a 4D object. The Julia sets are parallel to each other and perpendicular to the Mandelbrot set. Unlike 3D space, 4D allows for two perpendicular planes to intersect at a single point. And such is the case of the Julia sets intersecting the Mandelbrot set: the central point of each Julia set is a point in the Mandelbrot set plane.
Press 4 to swap axis. You will access different views of the 4D Mandelpatate.