Fractal Image Generators in SDL
https://github.com/daelsepara/sdl-fractals
cd repository/src
make
Dependencies: sdl2, sdl2-image
./Fractals.exe /PARAMS={parameters.json} /IMAGE={image.png} /PALETTE={palette.json} /BENCHMARK {other parameters}
Read parameters from {parameters.json} file.
See parameters/ for sample parameter files.
Save fractal to {image.png}
Use {palette.json} colormap. See palettes/ for some colormaps that can be used.
Generate fractal in memory without rendering on the screen or saving image to {image.png}
Without /BENCHMARK and /IMAGE, the fractal is rendered on the screen.
Inverts x-axis. Left to right goes from + to - values.
Inverts y-axis. Top to bottom goes from - to + values.
Inverts color values.
Use log-scale color mapping. Overrides color mapping in parameter file.
Use normalized color mapping. Overrides color mapping in parameter file.
Use moduluo-255 color mapping. Overrides color mapping in parameter file.
Use histogram color mapping. Overrides color mapping in parameter file.
Use default color mapping. Overrides color mapping in parameter file.
Generator | z^exp + C |
exponent | 2 |
max iterations | 255 |
escape value | 4.0 |
parameter files | mandelbrot, mandelbrot2, mandelbrot3 |
palette | default |
source(s) | Mandelbrot.hpp, Mandelbrot2.hpp, Mandelbrot3.hpp |
mandelbrot
Time (mean ± σ): 474.8 ms ± 7.7 ms [User: 450.3 ms, System: 17.9 ms]
Range (min … max): 460.1 ms … 484.7 ms 10 runs
mandelbrot2
Time (mean ± σ): 382.1 ms ± 7.6 ms [User: 359.3 ms, System: 17.4 ms]
Range (min … max): 375.8 ms … 401.5 ms 10 runs
mandelbrot3
Time (mean ± σ): 390.9 ms ± 11.6 ms [User: 365.0 ms, System: 18.2 ms]
Range (min … max): 376.6 ms … 411.8 ms 10 runs
Generator | z - (z^3 - 1)/(3z^2) |
tolerance | 1e-6 |
max iterations | 255 |
parameter file | newton1 |
palette | default |
source | Newton1.hpp |
Time (mean ± σ): 868.1 ms ± 8.0 ms [User: 822.9 ms, System: 35.2 ms]
Range (min … max): 855.1 ms … 882.9 ms 10 runs
Generator | z^exp + C |
max iterations | 255 |
escape value | 4.0 |
source | Julia.hpp |
C | -0.4 + 0.6i |
parameter file | julia1 |
palette | magma |
Time (mean ± σ): 821.6 ms ± 8.3 ms [User: 770.7 ms, System: 38.7 ms]
Range (min … max): 812.3 ms … 836.7 ms 10 runs
C | -0.8 + 0.156i |
parameter file | julia2 |
palette | inferno |
Time (mean ± σ): 936.7 ms ± 10.5 ms [User: 881.0 ms, System: 39.5 ms]
Range (min … max): 925.1 ms … 959.9 ms 10 runs
C | 0.285 + 0.01i |
parameter file | julia3 |
palette | moreland |
Time (mean ± σ): 732.1 ms ± 12.2 ms [User: 678.0 ms, System: 38.8 ms]
Range (min … max): 718.5 ms … 755.8 ms 10 run
C | -0.7269 + 0.1889i |
parameter file | julia4 |
palette | magma |
Time (mean ± σ): 1.224 s ± 0.019 s [User: 1.166 s, System: 0.041 s]
Range (min … max): 1.201 s … 1.263 s 10 runs
C | 0.26294324588 - 0.0024215732998i |
max iterations | 320 |
normalized colormap | true |
parameter file | julia5 |
palette | inverted jet |
Time (mean ± σ): 3.495 s ± 0.027 s [User: 3.428 s, System: 0.039 s]
Range (min … max): 3.454 s … 3.544 s 10 runs
Generator | z^exp + C |
exponent | 4 |
max iterations | 255 |
escape value | 4.0 |
parameter file | mandelbrot4 |
palette | default |
source | Mandelbrot.hpp |
Time (mean ± σ): 3.937 s ± 0.055 s [User: 3.831 s, System: 0.056 s]
Range (min … max): 3.898 s … 4.063 s 10 runs
Generator | (Re(Zn) + iIm(Zn))^2 + C |
inverted x | true |
inverted y | true |
normalized colormap | true |
inside color | 0 |
max iterations | 100 |
escape value | 4.0 |
parameter file | burningship |
palette | hot |
source | Mandelbrot.hpp |
Time (mean ± σ): 559.9 ms ± 4.1 ms [User: 518.1 ms, System: 33.7 ms]
Range (min … max): 552.8 ms … 567.2 ms 10 runs
Generator | (Re(Zn) + iIm(Zn))^2 + C |
inverted x | true |
inverted y | true |
log colormap | true |
inside color | 0 |
max iterations | 100 |
escape value | 4.0 |
parameter file | burningship2 |
palette | plasma |
source | Mandelbrot.hpp |
Time (mean ± σ): 1.469 s ± 0.289 s [User: 0.840 s, System: 0.054 s]
Range (min … max): 1.248 s … 2.128 s 10 runs
Generator | (Re(Zn) + iIm(Zn))^2 + C |
inverted x | true |
inverted y | true |
log colormap | true |
inside color | 0 |
max iterations | 100 |
escape value | 4.0 |
parameter file | burningship3 |
palette | bluered |
source | Mandelbrot.hpp |
Time (mean ± σ): 1.469 s ± 0.289 s [User: 0.840 s, System: 0.054 s]
Range (min … max): 1.248 s … 2.128 s 10 runs
Generator | (z_x^2 + z_y^2) - i(2 * z_x * z_y) + C |
inside color | 0 |
max iterations | 255 |
escape value | 4.0 |
parameter file | tricorn |
palette | parula |
source | Tricorn.hpp |
Time (mean ± σ): 575.8 ms ± 21.6 ms [User: 528.1 ms, System: 36.5 ms]
Range (min … max): 536.0 ms … 602.0 ms 10 runs
Generator | Z_bar^exp + C |
exponent | 4 |
inside color | 0 |
max iterations | 255 |
escape value | 4.0 |
parameter file | multicorn |
palette | viridis |
source | Mandelbrot.hpp |
Time (mean ± σ): 1.316 s ± 0.016 s [User: 1.261 s, System: 0.040 s]
Range (min … max): 1.293 s … 1.346 s 10 runs
Generator (xn) | xn = xx * x + xy * y + xc (see below) |
Generator (yn) | yn = yx * x + yy * y + yc (see below) |
inside color | 128 |
max iterations | 10000000 |
parameter file | barnsleyfern |
palette | green |
source | IteratedFunctionSystem.hpp |
Probability | Transformation [ xx xy yx yy xc yc ] |
---|---|
p < 0.01 | [ 0.000 0.000 0.000 0.160 0.000 0.000 ] |
p < 0.86 | [ 0.850 0.040 -0.040 0.850 0.000 1.600 ] |
p < 0.93 | [ 0.200 -0.260 0.230 0.220 0.000 1.600 ] |
p < 1.00 | [ -0.150 0.280 0.260 0.240 0.000 0.440 ] |
Time (mean ± σ): 664.8 ms ± 9.4 ms [User: 621.5 ms, System: 33.5 ms]
Range (min … max): 648.1 ms … 676.3 ms 10 runs
Generator (xn) | xn = xx * x + xy * y + xc (see below) |
Generator (yn) | yn = yx * x + yy * y + yc (see below) |
inside color | 128 |
max iterations | 10000000 |
parameter file | culcita |
palette | green |
source | IteratedFunctionSystem.hpp |
Probability | Transformation [ xx xy yx yy xc yc ] |
---|---|
p < 0.02 | [ 0.000 0.000 0.000 0.250 0.000 -0.140 ] |
p < 0.86 | [ 0.850 0.020 -0.020 0.830 0.000 1.000 ] |
p < 0.93 | [ 0.090 -0.280 0.300 0.110 0.000 0.600 ] |
p < 1.00 | [ -0.090 0.280 0.300 0.090 0.000 0.700 ] |
Time (mean ± σ): 637.9 ms ± 32.5 ms [User: 583.6 ms, System: 33.9 ms]
Range (min … max): 589.1 ms … 683.9 ms 10 runs
Generator (xn) | xn = xx * x + xy * y + xc (see below) |
Generator (yn) | yn = yx * x + yy * y + yc (see below) |
inside color | 128 |
max iterations | 10000000 |
parameter file | thelypteridaceae |
palette | green |
source | IteratedFunctionSystem.hpp |
Probability | Transformation [ xx xy yx yy xc yc ] |
---|---|
p < 0.02 | [ 0.000 0.000 0.000 0.250 0.000 -0.400 ] |
p < 0.86 | [ 0.950 0.005 -0.005 0.930 -0.002 0.500 ] |
p < 0.93 | [ 0.035 -0.200 0.160 0.040 -0.090 0.020 ] |
p < 1.00 | [ -0.040 0.200 0.160 0.040 0.083 0.120 ] |
Time (mean ± σ): 572.3 ms ± 8.5 ms [User: 533.0 ms, System: 31.7 ms]
Range (min … max): 562.6 ms … 590.9 ms 10 runs
Generator (xn) | xn = xx * x + xy * y + xc (see below) |
Generator (yn) | yn = yx * x + yy * y + yc (see below) |
inside color | 128 |
max iterations | 10000000 |
parameter file | sierpinski-carpet |
palette | sand |
source | IteratedFunctionSystem.hpp |
Probability | Transformation [ xx xy yx yy xc yc ] |
---|---|
p < 0.125 | [ 0.33 0.00 0.00 0.33 -0.66 0.66 ] |
p < 0.250 | [ 0.33 0.00 0.00 0.33 0.00 0.66 ] |
p < 0.375 | [ 0.33 0.00 0.00 0.33 0.66 0.66 ] |
p < 0.500 | [ 0.33 0.00 0.00 0.33 -0.66 0.00 ] |
p < 0.625 | [ 0.33 0.00 0.00 0.33 0.66 0.00 ] |
p < 0.750 | [ 0.33 0.00 0.00 0.33 -0.66 -0.66 ] |
p < 0.875 | [ 0.33 0.00 0.00 0.33 0.00 -0.66 ] |
p < 1.000 | [ 0.33 0.00 0.00 0.33 0.66 -0.66 ] |
Time (mean ± σ): 429.3 ms ± 31.5 ms [User: 402.7 ms, System: 18.1 ms]
Range (min … max): 393.0 ms … 472.3 ms 10 runs
Generator (xn) | xn = xx * x + xy * y + xc (see below) |
Generator (yn) | yn = yx * x + yy * y + yc (see below) |
inside color | 128 |
max iterations | 10000000 |
parameter file | sierpinski-triangle |
palette | inverted gnpu |
source | IteratedFunctionSystem.hpp |
Probability | Transformation [ xx xy yx yy xc yc ] |
---|---|
p < 0.33 | [ 0.50 0.00 0.00 0.50 -0.50 -0.50 ] |
p < 0.66 | [ 0.50 0.00 0.00 0.50 0.00 0.50 ] |
p < 1.00 | [ 0.50 0.00 0.00 0.50 0.50 -0.50 ] |
Time (mean ± σ): 377.3 ms ± 26.8 ms [User: 353.2 ms, System: 16.8 ms]
Range (min … max): 350.7 ms … 432.0 ms 10 runs
Parameters: tree
Parameters: seaweed
Parameters: julia-dragon
Parameters: julia-siegel
Parameters: julia-flower
Parameters: mandelbrot-histogram
Parameters: chrysantemum
Parameters: cross-snowflakes
Parameters: crystal
Parameters: dendrite
Parameters: ekg
Parameters: julia-snowflakes
Parameters: julia-sin
Parameters: julia-cos
Parameters: dragon-curve
Parameters: julia-funcs
Parameters: julia-func
Parameters: julia6
Parameters: koch
Parameters: koch-triangle
Parameters: kochmix
Parameters: leaf
Parameters: leaf2
Parameters: levy-curve
Parameters: mandelbrot-func
Parameters: mandelbrot-funcs
Parameters: mandelbrot-reciprocal
Parameters: maple
Parameters: pascal-hadamard
Parameters: pentagon
Parameters: sinh
Parameters: snowflakes
Parameters: tree2
Parameters: newton
Parameters: newton4
Parameters: barnsleytree
Parameters: biomorph-mandelbrot
Parameters: biomorph-julia
Parameters: biomorph-julia2
Parameters: biomorph-julia3
Parameters: biomorph-julia3
Parameters: biomorph-julia5
Parameters: biomorph-julia6
Parameters: biomorph-julia7
Parameters: biomorph-julia8