FALAJ — Project Blog
Project Overview
For my final project in Decoding Nature, I built FALAJ, an interactive artwork that simulates the ancient Emirati falaj irrigation system.
The Falaj
A falaj is one of the oldest water systems in the world. It works entirely on gravity, with water flowing from an underground source called the Umm Al Falaj through carved stone channels down to farmland and date palms below. No pumps, no machinery, just water finding its natural path downhill. The earliest falaj systems in the UAE were found in Al Ain, and scientists have confirmed they are over 3,000 years old (UAE History and Culture). The Al Ain oasis, which still has working aflaj today, is recognized as a UNESCO World Heritage Site (UNESCO).
What makes the falaj special is the dawran, a time-based system where each farmer receives water for a set period before it moves to the next plot. It is one of the earliest examples of a community sharing a natural resource fairly, managed by time rather than ownership.
The Idea
This course taught me to look at nature differently. The falaj is something I grew up around in the UAE without ever really thinking about it. Studying natural systems this semester made me see it as something worth exploring more deeply.
The challenge was figuring out how to bring it to life visually. I thought about it for a long time. Should it look realistic, should it be a diagram, should it feel like a game? Earlier in the semester we visited teamLab and I saw Waterfall of Light Particles. That experience stayed with me. teamLab does not simulate water realistically, they express it as light, as movement, as something you feel rather than understand. When I started thinking about the falaj, that approach made complete sense. Water flowing through ancient stone channels is already something beautiful and alive. It deserved to be shown that way.
That became the goal of FALAJ. Not a diagram, not an educational tool. A living visual piece that lets you feel how this ancient system works.
Implementation Details
FALAJ was built phase by phase, with each stage adding a new layer on top of the last. It was a long process with many rebuilds and unexpected challenges along the way. What you see in the final sketch is the result of all of that.
Phase 1 — The Mother Well
Particles fall from the mother well. blendMode(ADD) makes them glow like light rather than paint.
Phase 2 — The Channel and Sharia Pool
Particles now flow down a stone channel and collect in the sharia pool.
Phase 3 — Branching and the Dawran
Water splits into three branches with the dawran rotating between them automatically. Click to switch manually.
Phase 4 — Palm Trees
Palms grow at each branch tip and respond to water level, fuller and brighter when fed, and dimmer when dry.
Phase 5 — Seasons and Polish
Four seasons with different moods, wind, and timing. Visual details like shimmer, foam, and pool depth were added.
Phase 6 — Sharia Pool and Mouse Interactions
A real water pool with rising and falling levels. Each season gets its own mouse interaction.
Phase 7 — Intro, Stars and Ground
An intro fade-in sequence was added. Winter stars appear in the sky. A solid ground plane anchors the palms to the scene.
Phase 8 — Design Polish
Bigger palms, seasonal ground texture, smooth season transitions, a unified HUD, and water rates tuned.
Final Sketch — FALAJ
Water falls from the mother well through stone channels into the sharia pool. The dawran timer rotates water between three date palms. You can redirect it manually by clicking the selector dots. Palms respond visually to how much water they receive. Dates ripen in the summer and can be harvested by clicking the crown. Four seasons cycle with different moods, wind, and ground textures. Each season has its own mouse interaction. In Winter, stars and shooting stars appear in the sky.
Technical Implementation
Particle Systems
420 particles, each with its own lifespan, visibility, and trail. Only a fraction draws visible trails, which creates the sparse glow.
let ageMult = [1.0, 0.58, 0.92, 1.35][season]; this.maxAge = int(random(100, 230) * ageMult); let visMult = [0.16, 0.10, 0.14, 0.20][season]; this.visible = random() < visMult;
Vectors and Forces
Gravity, seasonal wind, and Perlin noise wobble are all applied as forces to the velocity each frame.
this.vy += 0.035 * spd; // gravity this.vx += windPush * WIND_STR[season]; // seasonal wind this.vx *= lerp(0.95, 0.97, 1 - spd); // damping
Autonomous Agents
Once inside a branch, particles steer toward the channel centerline using a projection and a soft pull force.
let t = constrain((apx*abx + apy*aby) / (abx*abx + aby*aby), 0, 1); let nearX = ax + t*abx; this.vx += (nearX - this.x) * 0.04; // pull toward centerline this.vx += (abx / len) * 0.06; // push along branch
Cellular Automata
Simple fill/drain rules applied every frame. Dates only ripen in Summer above 85% water.
if (b === activeBranch) {
waterLevels[b] = min(1.0, waterLevels[b] + SEASON_FILL[season]);
} else {
waterLevels[b] = max(0.0, waterLevels[b] - SEASON_DRAIN[season]);
}
if (season === 1 && waterLevels[b] > 0.85) {
dateLevels[b] = min(1.0, dateLevels[b] + DATE_FILL);
}
Perlin Noise
Used for particle wobble, channel shimmer, stone texture, and pool breathing.
let n = noise(this.x * NOISE_SC, this.y * NOISE_SC, frameCount * 0.006); let wobble = map(n, 0, 1, -0.5, 0.5); this.vx += wobble * 0.06 * wobbleMult;
Flocking — Separation
In Summer, the mouse repels nearby particles outward, the separation principle.
let d = dist(p.x, p.y, mouseX, mouseY);
if (d < 50 && d > 1) {
let f = map(d, 0, 50, 0.07, 0);
p.vx += (p.x - mouseX) / d * f;
}
Video Documentation
A walkthrough of FALAJ showing all four seasons, mouse interactions, date harvesting in Summer, season skipping, and branch redirection.
Reflection
The moment the falaj and teamLab connection clicked was when the whole project made sense to me. Water already flows naturally through ancient stone channels, expressing that as light felt right.
The dawran arc ended up being one of my favorite parts of the sketch. What started as a simple timer turned into something that actually feels like it belongs to the falaj.
Sound was the hardest part. I could not find the right audio and synthesized sounds never felt natural. Real recorded water from an actual falaj would be the first thing I would add.
If I continued, I would push the visual design further and build the historical UAE aflaj map reveal that I originally planned but did not have time to finish.
References
-
- UAE History and Culture — The Falaj: Ancient Engineering Genius in the Desert
- UNESCO World Heritage Centre — Cultural Sites of Al Ain
- The National — Your guide to UAE dates
- teamLab Phenomena Abu Dhabi — Waterfall of Light Particles
- Shiffman, Daniel. The Nature of Code. No Starch Press, 2024. natureofcode.com