Skip to content
/ fractoid Public

Software to generate beautiful fractal images.

License

Notifications You must be signed in to change notification settings

tjira/fractoid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fractoid


Fractoid is a simple software to generate beautiful and customizable fractal images. The program has a GUI that uses the GPU or CLI with input in JSON format that runs on CPU.

✨ Features

Below are all the fractals and algorithms that are implemented in fractoid.

Fractal Algorithms

  • Buffalo Fractal
  • Burning Ship
  • Julia Set
  • Mandelbrot Set
  • Manowar Fractal
  • Phoenix Fractal

Generation Algorithm

  • Escape Time Based Algorithm
  • Orbitrap Algorithm

Coloring Algorithms

  • Linear Coloring
  • Solid Coloring
  • Periodic Coloring

🛠️ Compilation

The compilation is as simple as running the following command.

cmake -B build -DCMAKE_BUILD_TYPE=Release . && cmake --build build

The binary will be compiled in the bin folder.

🖥️ Examples

If you simply execute the binary you will launch the GUI. The navigation there is intuitively done by mouse. Options are available after pressing the F1 key. To use the CLI, you need to create an input file. Let's create an input file called input.json with the following contents.

{
    "fractal" : {
        "name" : "mandelbrot"
    },
    "algorithm" : {
        "name" : "escape"
    },
    "color" : {
        "name" : "periodic"
    },
    "center" : [-0.75, 0],
    "zoom" : 1.1
}

This example generates Mandelbrot set with escape time based generation algorithm and periodic coloring. To generate a png image simply run

fractoid -f input.json

File fractal.png will be created in the current directory.

⭐ Credits

  • argparse - Argument Parser for Modern C++.
  • json - JSON for Modern C++.
  • stb - Single-file public domain libraries for C/C++.