EXP·017 / Grainfield
move to sculpt · drag to orbit
scroll / pinch to change depth
Design Lab · emergence · 2026

Small things become structure.

One grain means almost nothing. Thousands of grains, responding to the same forces, become terrain. Move through it and the whole field reorganises around a tiny disturbance. This is an experiment about emergence: how simple units, relationships and local changes create something larger than any individual part.

building field…
00 / live physics console

Change the laws, not just the view.

These controls are wired into the main Grainfield above.

Turn a knob, then scroll back to the field. You are changing the equation that generates every grain: wave amplitude, spatial frequency, interaction radius, time speed, grain size and perspective. The point is to feel what each variable does before reading the explanation.

LIVE FIELD PARAMETERS

drag horizontally on a dial · double-click to reset
amplitude38
frequency18
force radius125
time1.2×
grain size1.4
perspective520
Experiment 017 / idea

The field remembers relationships, not objects.

The grains are deliberately insignificant on their own. What you perceive as hills, valleys, colour bands and motion exists only because each point participates in a shared field. Disturb one area and nearby points respond differently according to distance. The object is not any grain. The object is the relationship between them.

This makes Grainfield a small visual model for systems we work with every day: teams, markets, knowledge graphs, software and communities. A local decision can alter a larger shape; patterns can emerge without a central designer; and changing your viewpoint can reveal structure that was already present but invisible.

MediumCanvas 2D · pseudo-3D point cloud
Particlesadaptive
Fieldlayered sine noise + radial ridges + pointer deformation
Colourheight-mapped spectral bands
Inputpointer sculpt · drag orbit · wheel/pinch depth
Fallbackadaptive density + reduced-motion static field
01 / wave anatomy

Nothing here knows the shape.

There is no mountain object in the program.

JavaScript creates a grid of independent points. Every frame, each point asks the same function: how high should I be at this x, z and time? When thousands of answers are viewed together, your eye invents a continuous surface.

point → samplesamples → patternpattern → perceived object

Build the field

change the wave amplitude and frequency
02 / interference & superposition

A wave is a rule travelling through space.

Grainfield is not a scientific fluid simulation. It borrows the language of waves: periodic displacement, interference and falloff. Two oscillations overlap, so some locations reinforce each other while others cancel.

Complexity appears when simple waves meet.

h = A · sin(x · f + t)
    × cos(z · g − t)
  + radialWave(r, t)
  + pointerForce(distance)

A = amplitude · f/g = spatial frequency
t = time · r = distance from centre

The important part is superposition: the final height is the sum of several small influences. That is the same broad idea behind overlapping water waves, sound pressure and many field-based simulations.

03 / force & falloff

Your pointer is a local force.

Move over the main field and points near you rise more than distant points. The effect fades with distance. This gives the interaction a physical intuition without running an expensive particle solver.

Influence has a radius. Proximity changes response.

Force falloff

drag the radius to see how local becomes global
force = max(0, 1 − distance / radius)
04 / perspective projection

The browser only draws circles.

The scene feels three-dimensional because JavaScript rotates each x/y/z point, calculates a depth value, then uses perspective to decide where and how large to draw it. Far grains become smaller and fainter. Near grains become larger.

Depth is not drawn. It is inferred.

// tiny perspective camera const depth = 520 + z; const scale = zoom * 520 / depth; screenX = centreX + x * scale; screenY = centreY - y * scale; // depth also changes opacity + size drawGrain(screenX, screenY, size * scale);

This is why the experiment can look volumetric while staying in Canvas 2D. No Three.js and no WebGL scene graph are required.

05 / JavaScript loop

Every frame is just sample → transform → draw.

The browser repeats the same pipeline about sixty times per second. First we sample the height field. Then we rotate and project each 3D point into screen coordinates. Finally Canvas 2D draws a tiny circle. Nothing is stored as a mesh.

The animation is a function being evaluated again and again.

for (const grain of grains) { const y = height(grain.x, grain.z, time); const p = rotate3D(grain.x, y, grain.z); const s = perspective(p, camera); drawCircle(s.x, s.y, s.size); } requestAnimationFrame(frame);
height()physics-ish field equation
rotate3D()camera orientation using sin/cos
perspective()farther points shrink
drawCircle()the only actual visual primitive
06 / meaning changes with scale

Grain. Wave. Terrain. System.

Zoom mentally, not just visually. At one scale this is a collection of dots. At another it is a surface. At another it becomes a model for distributed systems.

The same data can tell a different story depending on the scale at which you observe it.

That is the final experiment: individual behaviour does not automatically explain system behaviour. Teams, markets, software architectures and communities all develop shapes that no single participant contains.

Read it at four scales

1 grainan individual state
10 grainsa local relationship
1,000+an emergent surface
whole fielda system you can reason about