Skip to content

valflrt/fractal_rndr

Repository files navigation

Fractal Renderer

This is a program used to render fractals using a RON parameter file. It also has a very simple gui for an easier navigation.

Table of contents

How to install

If you have cargo installed:

cargo install fractal_rndr

Otherwise, you can download the latest executable from the releases tab.

How to use

Start the app using:

fractal_rndr path/to/param_file.ron path/to/output_image.png --gui

Note

Supported image formats are png and jpg (the extension is used to guess the format)

This is what the app looks like:

gui

If there is no parameter file, the app will start with a preset fractal. You can save the parameter file anytime by clicking the corresponding button.

Enjoy !

Preset renders

These are preset renders I like, you can access their parameter files by clicking on the title. There are some more in presets/.

The renders found in presets/ are licensed under CC BY 4.0

Fractal: ThirdDegreeRecWithGrowingExponent

cyggmf.png

Fractal: Mandelbrot

iabppp.png

Fractal: ThirdDegreeRecWithGrowingExponent

ukhbrp.png

Fractal: SecondDegreeRecWithGrowingExponent

ffayuk.png

Fractal: SecondDegreeRecWithGrowingExponent

mzfyje.png

Fractal: SecondDegreeRecWithGrowingExponentParam

ecwfwb.mp4

Fractal: SecondDegreeRecWithGrowingExponent

xvebhd.png

Fractal: Iigdzh

quhuap.png

Fractal: ThirdDegreeRecWithGrowingExponent

ebidxr.png

Fractal: Mjygzr

ajwrkx.png

Fractal: Vshqwj

wztpft.png

Fractal: Iigdzh

dvzrjn.png

Fractal: SecondDegreeThirtySevenBlend

ckvjjj.png

Fractal: Wmriho(a_re: -0.1, a_im: 0)

phgzbz.png

Fractal: ComplexLogisticMapLike

gqwzzr.mp4

Fractal: SecondDegreeRecAlternating1WithGrowingExponent

dmgtyz.png

Fractal: SecondDegreeRecWithGrowingExponent

datgdv.png

Ideas

  • use wgpu to perform calculations ? see this and especially this
  • use opencl to perform calculations ? see this
  • Make a new program using this one that is a purely gui program with progressive rendering
    • Progressive rendering ? Save a global raw_image and sample continuously from another thread to improve image quality
      • How to sample ? Use Low or Medium for first pass then do other passes with High (as the number of passes increases, the value of each pixel gets more and more accurate)
      • Careful: The average between new passes and the current values must be weighted: (sampling_point_count_from_start * stored_value + sampling_point_count_for_current_pass * new_value) / (sampling_point_count_from_start + sampling_point_count_for_current_pass)

Notes

  • To create a video from the frames:
    ffmpeg -framerate <fps> -pattern_type glob -i 'frames/*.png' -c:v libx264 -pix_fmt yuv420p video.mp4