Precision floor: the view sits on a region boundary, so the renderer cannot descend into a single region. Pan a little to continue.

SFG Explorer

Scalable Fractal Graphics describes images that hold detail at every scale. Each pattern splits its space into regions and hands every region to another pattern, smaller. Loops in the graph give unbounded depth.

Drag to pan, scroll or pinch to zoom, click a point to inspect it. Dive falls straight in.

Inspector

How the marked pixel was produced, from the camera's region down to where the descent stopped.

View

3.3 px
none

Below either cutoff a pattern is drawn as its solved average color, so cutting detail off never changes what you see from farther out.

Source

Ctrl or Cmd + Enter renders. Text and JSON are two spellings of the same document; links carry the whole source.

Format reference (v0.1)

A file is a list of patterns. A pattern is either a solid color or one split. A split hands out up to three slots, in, out and alt; missing ones reuse in.

voronoidensity, gap, jitter, alt. Cells go to in, a random fraction alt to alt; gaps to out.
gridcols, rows, mortar, stagger, alt, holes=4 or 1,3. Tiles to in; holes and random tiles to alt; mortar to out.
dotsdensity, radius, jitter, sizevar, fill, alt. Dots to in or alt; background to out.
noisefreq, octaves, threshold. Above to in, below to out.

Slot lines: in -> name scale=1 rotate jitter=0.1 hue=0.05 tint=#ccbbaa color=#998877. Aliases: cell, tile, brick, dot, high mean in; gap, mortar, bg, low mean out.

color= anchors a slot: seen from afar the region averages to that color, and finer levels only redistribute it. Inside a loop, tints multiply every lap, so keep them near 1.

root name size=2m seed=1 picks the start pattern, its physical width (drives the scale bar) and the random seed.

The full draft lives in docs/spec/sfg-v0.md.

How rendering stays fast at any depth

Everything coarser than the screen is constant across it. The camera keeps a stack of the regions it has entered, in double precision, and starts each frame from the deepest one that contains the whole view.

Each pixel walks down the graph from there, one split per level, and stops once features are smaller than its footprint, returning the pattern's solved average. Work per pixel depends on how many scales are visible at once, not on how deep you are.

Every split is periodic with a long period, so local coordinates are wrapped and stay small, which keeps 32-bit GPU floats accurate at any depth.

Related work

Multiscale Texture Synthesis (Han et al., 2008): exemplar graphs whose loops give infinite zoom. Context Free Art's grammars, IFS and flame fractals, and fractal image compression describe images by self-similarity. Substance, MaterialX and OSL are procedural node graphs at a single scale. Terrain splat maps and detail textures in games, and grain synthesis in AV1 and JPEG XL, add procedural high frequencies by class.