Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/maxencebonamy/fractal-explorer

A fractal is a particularly aesthetic mathematical object in which one can, among other things, zoom to infinity and find the basic pattern, which can be experienced here.
https://github.com/maxencebonamy/fractal-explorer

burning-ship cmake cpp fractal mandelbrot mathematics sfml simulation

Last synced: 6 days ago
JSON representation

A fractal is a particularly aesthetic mathematical object in which one can, among other things, zoom to infinity and find the basic pattern, which can be experienced here.

Awesome Lists containing this project

README

        


Sand Box

https://github.com/maxencebonamy/Fractal-Explorer/assets/66129931/240efd8b-7220-4e44-9d6f-b02e0c0b533f



Description

This software is a mathematical simulation that represents a fractal.
A fractal is a mathematical object with a similar structure at all scales.
In particular, you can zoom in to infinity and see the same patterns.
This software lets you visualize two very specific fractals and move inside to observe them.

### Mandelbrot:
The Mandelbrot Set is a fractal defined as the set of points $c$ of the complex plane for which the sequence of complex numbers, defined by recurrence by $z_0=0$ and $z_{n+1}=z_n^2+c$, is bounded.
![Capture d'écran 2023-09-28 124002](https://github.com/maxencebonamy/Fractal-Explorer/assets/66129931/df3d815c-acde-4655-aedc-6a2c64e8cf64)

### Burning Ship:
The Burning Ship Fractal is generated in the complex plane by the iterated function, defined by $z_0=0$ and $z_{n+1}=(|\text{Re}(z_n)|+i|\text{Im}(z_n)|)^2+c$. The fractal is defined by the set of points that do not diverge to infinity. Very similar to the Mandelbrot set, it differs in that we consider the absolute value of the real and imaginary components of $z_n$, before squaring.
![Capture d'écran 2023-09-28 132214](https://github.com/maxencebonamy/Fractal-Explorer/assets/66129931/8bc4f33f-6366-43ef-8164-b60b0ec89447)



Get Started

### Launch the software:

1. Click on the Releases button on the right and select the **latest version**.
2. Download the **.zip** archive and extract the files.
3. Open a terminal from the folder **Fractal-Explorer** and run one of the folowwing commands:
```
./Fractal-Explorer.exe --fractal mandelbrot
```
```
./Fractal-Explorer.exe --fractal burning-ship
```

### Compile:

> [!NOTE]
> *Prerequisites:*
> - [x] *Git must be installed on your computer. If not, click here.*
> - [x] *Xmake must be installed on your computer, if not, click here.*

1. **Clone** the repository on your computer. To do this, open a terminal in the folder of your choice and run the following command:
```
git clone https://github.com/maxencebonamy/Fractal-Explorer
```

2. **Navigate** inside the folder you've just cloned with the following command:
```
cd Fractal-Explorer
```

3. **Compile** the project with the following command:
```
xmake
```

4. **Run** the executable with one of these commands:
```
xmake run main --fractal mandelbrot
```
```
xmake run main --fractal burning-ship
```



Features

### Actions you can perform in the software:
- Zoom in by scrolling mouse wheel upwards.
- Zoom out by scrolling mouse wheel downwards.
- Exit the software by pressing the ESC key.

### Parameters that can be passed on the command line:
- **--fractal** or **-f**: specify fractal name ("mandelbrot" or "burning-ship")
- **--fullscreen**: launch software in full screen mode
- **--cel-size** or **-c**: specify cell size in pixels (default 1). This is used to reduce image quality and therefore loading time between images.

**Example:** the following command will launch the software in full screen mode, and display the "Mandelbrot" fractal with a resolution of 5 pixels per cell.
```
Fractal-Explorer.exe -f mandelbrot -c 5 --fullscreen
```
![Capture d'écran 2023-09-28 124019](https://github.com/maxencebonamy/Fractal-Explorer/assets/66129931/7771e82c-3025-428b-a188-deda0789f698)