A fractal and dynamical-systems wallpaper engine with 129 built-in looks, an interactive browser editor, and TOML recipes that render cleanly up to 16K.

fractalgen started as two messy wallpaper scripts I got tired of copying every time I wanted a new desktop background. I rebuilt it into a Python engine driven by TOML recipes: each recipe picks a registered generator, parameters, a palette, framing, tone curve, composited layers, and post-processing effects. Heavy inner loops compile with Numba across CPU cores, and a local browser editor lets me pan, zoom, and tune a look before exporting it at full resolution.
Separating what an image is (a TOML recipe) from how pixels are computed (a generator plugin) made variations, recipe inheritance, plugins, and embedded-recipe exports all fall out of the same data model.
fractalgen gui) with drag/scroll pan, zoom, rotate, undo history, random variations, hold-backslash before/after compare, and 2x/3x supersampled export.fractalgen started as two scripts I wrote to generate desktop wallpapers for myself. Every fractal formula, color ramp, and crop lived directly in Python, so adding a new image meant duplicating a function and editing constants. I rebuilt it around two pieces: generators (registered functions that turn a region of the plane into field data) and recipes (TOML tables that pick a generator and describe everything else about the picture).
Recipes can extend other recipes, carry separate portrait framing for phones, and stack composited layers and effects, so most new looks take a few lines of TOML. The same recipe drives the CLI (fractalgen render, including --random), multi-device batch presets, and the browser GUI. Version 0.1.0 went up on GitHub in November 2026 under the MIT license.
An 8K wallpaper has over 33 million pixels, and several looks iterate each pixel more than a thousand times. The inner loops are compiled with Numba and run in parallel across cores. Escape-time kernels use Brent cycle detection so interior points that settle into repeating orbits stop early instead of hitting the iteration cap. Simulations like Gray-Scott reaction-diffusion and physarum slime mold run on multi-threaded solvers, and batch renders run in isolated worker processes with timeouts so one slow look cannot stall a preset.
Interactive editing has its own speed constraint, since nobody wants to wait five seconds just to preview another palette. The server stores expensive intermediate buffers (iteration counts, density grids) in a bounded LRU cache and applies palettes, tone curves, and post-processing afterward, so recoloring or adjusting bloom updates quickly.
A look framed in a 960 pixel preview window should match the 16K export. Views are defined against a 4K reference canvas with explicit fill, cover, and contain rules for other aspect ratios, and pixel-radius effects like blur and bloom scale proportionally with the output dimensions.
Exposure needed the same fix. Generators that stretch dynamic range to fit the current frame's histogram re-exposed the image every time I panned, dimming bright filaments whenever something brighter scrolled into the corner. fractalgen now measures those tone statistics once on the recipe's authored view and replays them while panning and zooming, keeping colors anchored to the math rather than the current viewport.
Running fractalgen gui starts a local server and opens an editor written with Preact and htm as plain ES modules, with no Node build step or bundler. You can browse all 129 looks, generate parameter variations, drag and scroll to pan, zoom, and rotate, tweak palettes, layers, and effects with full undo history, and hold backslash to compare against the original preset.
Exports support 2x and 3x supersampling, and every PNG or JPEG stores its full recipe in the file metadata. You can take any finished wallpaper and fork it straight back into an editable TOML file.