SARATH THARAYILST
WRITEUPSPROJECTSLABABOUT
SARATH THARAYIL
മ
SARATH THARAYIL
/ SYSTEM

Building thoughtful software, writing notes, and shipping experiments across data, AI, and the web.

No cookies, no tracking. Preferences are stored locally in your browser. Anonymous view counts are kept server-side.

Hey, there's a story for the river above/© 2026 Sarath Tharayil/IST --:--:--/--- LOC
/ System--:--:-- IST

Building thoughtful software, writing notes, and shipping experiments across data, AI, and the web.

© 2026 Sarath Tharayil--- LOC

No cookies, no tracking. Preferences stored locally. Anonymous view counts server-side.

Hey, there's a story for the river above→
← LAB

Flow Field

Jun 8, 2026

Each pixel in a Perlin-noise scalar field has a direction. Thousands of particles follow that direction, leaving fading trails. No physics, no forces — just flow. Change the noise scale, speed, and particle count to shift between turbulent storms and gentle rivers.

PARTICLES
|
SPEED1.5
|
SCALE0.0040
TRAIL
|
COLOR
|
ANIMATE FIELD

Low SCALE = broad sweeping flows. High SCALE = tight turbulent eddies. Disable ANIMATE FIELD to freeze noise and let particles carve permanent paths.

/ NOTES
HOW IT WORKS

The canvas is divided into a grid. Each cell holds an angle derived from Perlin noise at that position. Particles sample the angle at their current cell and move in that direction, leaving a fading trail. A slowly incrementing Z offset animates the field over time, making the flow shift and breathe.

KEY PARAMETERS
ScaleNoise frequency. Low scale = broad, sweeping flows. High scale = tight, turbulent eddies.
SpeedHow fast particles travel along the field vectors.
Trail LengthHow many past positions each particle remembers. Longer trails reveal more of the field structure.
Animate FieldWhen on, zOff increments each frame — the noise field slowly morphs. Off = static field, particles settle into fixed orbits.
Color ModeAccent = theme color. White = high contrast. Rainbow = hue mapped to particle age, revealing trajectory arcs.
WHAT TO TRY

Set count to 4000, trail to 80, and animate off — then watch particles carve permanent grooves into the field. Switch to rainbow mode to see how age maps to movement. Crank scale to 0.01 for chaos, drop it to 0.002 for slow, river-like flow.