Midterm Progress — “Shifting Grounds”
Concept — What Am I Making?
I’m building a generative desert landscape. Not a drawing of a desert, a system that grows one. Dunes form, shift, break apart, and settle, all on their own, driven by wind, tremors, and rain.
The title is “Shifting Grounds.”
The system moves through four phases like a timeline:
Wind → Ground Tremor → Rain → Stillness
- Wind pushes sand around and builds dunes
- Ground Tremor shakes things up, dunes collapse and spread out
- Rain smooths the surface through erosion
- Stillness everything settles. The terrain stops changing. This is the frame I export for my A3 prints
The simulation runs once and ends. It doesn’t loop.
Why a Desert?
I’m from the UAE. The desert isn’t just a landscape to me, it’s something I grew up around. I’ve always noticed how dunes shift and reshape themselves. Sand looks still but it never really is.
I want to explore that through code. How do dunes actually get their shape? Why are some tall and some flat? What happens when wind hits a ridge? This project is my way of digging into those questions and turning them into generative art.
Design — How Will It Work?
The Height Map
Instead of simulating thousands of sand particles (which is way too complex and slow), I’m using a height map. It’s just an array:
heightMap[0] = 45 heightMap[1] = 47 heightMap[2] = 52
Each index is a column on the canvas. The value is how tall the sand is at that spot. When I draw it, I fill from the bottom up to the height. That gives me a terrain profile, like a side view of the desert.
Why this approach:
- Way more stable than particles
- Easier to control
- Better for high-res A3 output
- Clean and simple
Rendering
The look is minimal. Warm sandy monochrome palette. Shading is based on slope:
fill(baseColor - slope * contrast)
Steep slopes = darker. Flat areas = lighter. This fakes sunlight hitting the dunes from the side and creates a 3D look using just math. No textures, no images, just numbers and color.
Code Design — Functions, Classes, Structure
Here’s how I’m planning to organize the code:
- windPhase() — moves sand using Perlin noise for wind direction and strength. After moving sand, it checks slope stability (angle of repose) so dunes don’t become unrealistically steep
- tremorPhase() — lowers the stability threshold temporarily so dunes collapse and spread. Adds small random jitter to simulate vibration
- rainPhase() — averages each column’s height with its neighbors. This is what erosion does, peaks go down, valleys fill up, everything smooths out
- renderTerrain() — draws the height map with slope-based shading
State Management
A variable like currentPhase controls which phase is active. Each phase runs for a set number of frames, then transitions to the next:
WIND → TREMOR → RAIN → STILLNESS
In stillness, the draw loop still runs but nothing changes. The terrain is frozen in its final form.
Key Variables
- heightMap[] — the core data. One value per pixel column
- windStrength — controlled by Perlin noise, varies across space
- maxSlope — the angle of repose. How steep sand pile can be before it slides
- currentPhase — which phase the system is in
- phaseTimer — counts frames in each phase
Interactivity (Planned)
- Different noise seeds = different landscapes each run
- Keyboard controls to adjust wind strength or skip phases
- Parameter presets for different “climates” (strong wind, heavy rain, etc.)
States and Variations
Each run of the sketch will look different because of Perlin noise; different seeds create completely different dune formations from the same rules. That’s what makes it generative. I don’t place the dunes. The algorithm does.
For my three A3 prints, I plan to create variation by:
- Changing the noise seed (different dune shapes)
- Adjusting wind strength and direction (some runs make tall, sharp dunes, others make gentle rolling ones)
- Varying how long each phase lasts (more wind = more dramatic terrain, more rain = smoother result)
The final stillness frame from each run becomes a unique print.
The Scariest Part
The most frightening part of this project is the wind simulation.
If sand transport is too strong, everything flattens instantly, and no dunes form. If the slope stability rules are too strict, the terrain freezes before anything interesting happens. The whole project depends on finding the right balance between these forces.
What I Did to Reduce This Risk
I wrote a basic prototype that tests the two core mechanics together: wind transport and slope stability.
This isn’t the final system. It only has the wind phase. But it confirms that the core mechanic, the hardest part, actually works. The tremor, rain, and stillness phases will be simpler to add on top of this foundation.
Other Risks I’m Watching
The final print might look too simple on A3 paper. Since it is just a 1D height map, it could feel flat. I need to test it early. If it looks too basic, I might add more depth, like a fake 3D effect or layered lines. I will decide after the full system is working.
References
- R.A. Bagnold — The Physics of Blown Sand and Desert Dunes (1941).
- Angle of Repose — From granular mechanics. The maximum steepness a pile of sand can have before it slides.
- Ken Perlin — Perlin Noise (1983).
- Soil Liquefaction — When vibration makes sand temporarily act like liquid.
- Aeolian Transport — The geological process of wind moving sand.