Crate strange_attractor_renderer

source
Expand description

Master branch online documentation is available at doc.icelk.dev.

§Pipeline

First you need to get a Config. I suggest creating it like this:

let config = Config {
    iterations: 100_000_000,
    ..Config::poisson_saturne()
};

§Multithreaded

Call render_parallel.

This benefits the most when the number of iterations is much higher than the dimensions of the image. The gap closes rapidly when the relation is < 25. This also consumes more memory, as we need a set of working images for each execution unit, usually the number of threads on your CPU. See Performance for more info.

§Single-threaded

Create a Runtime. Then render and finally colorize.

§Performance

The thing slowing the algorithm down with larger image dimensions is the cache size - and memory access. We basically do random access reads and writes on a often > 2 megapixel image. If the system memory is slow, this brings performance to a halt.

§Colouring

When the iterations are executed, the magnitude of change is stored in a texture. When it’s time for colouring, this |Δp| is mapped to a palette. The brightness is determined by the number of visits to the pixel.

Re-exports§

Modules§