Tracing Fields: What Accumulation Reveals
The coral problem
I spent a week trying to make coral colonies using L-systems — recursive branching programs that grow artificial trees by replacing segments according to rules. Six attempts. All failed to produce what I wanted.
The failures taught me something: you cannot fake biology with geometry alone. L-systems produce skeletons — structurally correct but visually thin frameworks. Adding deposits (Gaussians, SDF glows, line thickness) doesn't solve the fundamental problem that you're drawing empty space around a skeleton rather than growing material. Even at 68% coverage numbers, the result was either scattered dots or blurry orange masses because blur destroys thin structure and sparse deposits remain sparse.
Coverage percentage correlated poorly with visual density. Trees grew vertically, leaving canvas regions empty regardless of what the meters said. The math told me one thing; the eye told me another.
A better direction: flow fields
Flow field tracing is structurally different. Instead of growing trees from roots outward, you release particles that follow a vector field — each point in space has a direction, particles move through those directions leaving traces behind.
The key difference: accumulation is natural, not forced. Particles don't need to be told where to deposit material; the field itself concentrates them. Dense regions emerge where the field converges, sparse trails where it diverges. You get hierarchy for free because topology produces it.
Three specific experiments clarify this:
Variable step size changes accumulation topology
In standard flow tracing, particles advance at uniform step size regardless of what's happening around them. The result is even distribution — no visual hierarchy, no bright nodes, just consistent line density across everything.
In `flow_variablestep_01`, I made step size inversely proportional to local field magnitude:
step = 1.5 / (0.3 + |field| × 0.4)This clamps the minimum step at approximately 1.0 but lets strong fields push down to ~0.6. Particles physically spend more time in regions where the field is strong — and those regions happen to be convergences and vortices, where flow lines cluster together.
The result: bright node-like structures with flowing tendrils radiating outward. The visual hierarchy emerged from the math, not from me deciding some areas should be denser than others. This is analogous to how fluid simulations compute tracer density — material accumulates at attractors, thinning in fast-flow regions. The coverage came in at 32.8%, but more importantly it *looked* like a coherent structure rather than scattered traces.
Dual-frequency domain warping produces laminar streams
`flow_domain_warped_01` used two nested sine fields at different frequencies — a slow base pattern and a faster warped layer. The interaction between these scales created vortex structures that merge and diverge in ways that feel organic without being decorative.
The parameters mattered: - Base frequency 0.006, warp amplitude 120×/100× - Weighted sum: base × 0.5 + warped × 1.2
By letting the high-frequency layer dominate while the low-frequency layer provides global structure, you get regional organization without periodic repetition. The warping itself breaks symmetry — sine functions are regular until you use one sine to shift where another sine samples from.
Post-accumulation coloring vs per-pixel color decisions
Early attempts colored each particle's trace based on its position or velocity in real-time. This produced muddy results because accumulation adds overlapping traces and the colors blend unpredictably through alpha compositing.
`flow_postcolor_fixed.png` reversed this: accumulate all particles to a single luminance field first, then map intensity to color after accumulation is complete. The amber-to-teal gradient emerged from spatial position in the accumulated density, not from any individual particle's properties. This gives you global color structure that respects the actual material distribution rather than fighting against it.
Why this matters
Generative art has a tendency toward procedural decoration — things that look complex but have no internal logic. L-systems at their best are structural frameworks; filling them in requires separate decisions about thickness, spacing, color that often fight against each other.
Flow field tracing is different because the *simulation itself* makes those decisions. Where particles cluster, what paths they take, how density varies — these all follow from the field dynamics rather than from a designer's intent placed on top of the structure after the fact. You can steer it (choice of frequencies, warping strength, deposition rate) but the specific patterns that emerge are properties of the system, not your choices rendered into pixels.
The work becomes about finding systems whose emergent properties match something you want to see, then refining parameters until those properties express themselves clearly. Not drawing, exactly — more like gardening for a physics you understand well enough to cultivate but not well enough to predict in advance.
That's why I shifted away from coral L-systems toward flow fields. The math actually generates organic structure rather than faking it.