Skip to main content

Module analytic_field

Module analytic_field 

Source
Expand description

The analytic field: one fullscreen fragment pass whose output is a closed-form function of position, coloured through the shared palette LUT (ADR-0021).

Every stateless per-pixel mathematical world lives here as a named family (ADR-0180 rule 1), selected by [field] family: the Chladni plate, whose two integer mode numbers are the whole figure, and escape time — the Julia and Mandelbrot sets — coloured by the smooth iteration count.

§No state between frames

Nothing here accumulates: the picture is a pure function of the parameters the preset binds this frame, the palette, and the target’s aspect. So there is no Phase, no offscreen of its own, and nothing for a capture to reset — motion comes from what the bindings read (time, the bands), never from the scene.

§The aspect is the render target’s

ADR-0037’s rule, restated because a fullscreen field computing a radius is exactly the shape that gets it wrong: the field’s x axis is scaled by the aspect Scene::render is handed, which is the target’s, so one field unit is the same number of pixels on both axes and a square plate stays square at 1280x800.

Structs§

AnalyticFieldScene
The fullscreen analytic field, driven by named preset parameters and one [field] table.
FieldConfig
[field] — the structural configuration, fixed while the preset is loaded and delivered through Scene::configure, in the shape [curve] and [particles] already use.

Enums§

EscapeMap
Escape time only: what the pixel is (ADR-0180’s [field] map).
FieldFamily
Which closed-form world the field draws (ADR-0180 rule 1).
TrapShape
Escape time only: the shape an orbit is measured against ([field] trap).

Constants§

C_LIMIT
How far c may sit from the origin on either axis. Every constant with a connected Julia set lies inside |c| <= 2; this leaves room for a binding to overshoot into dust without letting it reach f32’s ceiling.
ESCAPE_RADIUS_RANGE
The escape radius’s clamp. Below 2 an orbit that stays bounded can still cross it; above 256 one step past it can overflow at the largest power.
FAMILY_PARAMS
Every parameter only one family reads (ADR-0180 rule 4), with the range that reads there — so the generated reference prints mode_n as Chladni’s and inert elsewhere, rather than leaving an author to find it dead. Ranges are in FieldFamily::ALL’s order, and each row’s spec range is one of them; both held by this module’s tests. A parameter missing from here reads the same on every family.
MAX_ITERATIONS
The most iterations any tier lets an escape-time preset ask for — the top of iterations’ declared range, and the loop bound the shader is handed.
MAX_MODE
The largest mode number either axis of the plate accepts. Past it the nodal lines are closer together than a 1080p frame has pixels to separate them.
MAX_POWER
The largest power, which with the largest radius keeps |z|^power inside f32 for one step past escape.
MIN_POWER
The smallest power the shader is handed: the smooth count divides by ln power, which vanishes at 1.
PARAMS
The parameter names this scene consumes — the vocabulary a preset binding is checked against at load (ADR-0020). Keep in sync with set_param below; declared_params_match_set_param in core/tests/suite/preset.rs fails if the two drift, and FAMILY_PARAMS says which family reads each family-bound one.
TRAP_RADIUS_LIMIT
How far from the origin a trap may sit, and how far trap_radius may push it — past every orbit’s escape radius a trap is simply never approached.