Nature of Code

Inspiration from Amrum

As part of our excursion to Amrum, we were asked to look for structures or processes in nature that we could translate into code.

I decided to focus on the structure of these plants on the salt marsh.

What caught my attention was the clustering of the plants. They grow very densely on the meadow and seem to be limited by the water.

I wanted to capture this phenomenon in my code using particles and a barrier. How is a moving mass confined, and what structures emerge as a result?

Pflanze auf Salzwiese

First I made some sketches:

Skizze 1 Skizze 2 Skizze 3

Hyperbolic Movement Patterns

The particles move along curved paths. The distinctive "opening" or "curve" that emerges strongly resembles the typical shape of a hyperbola (two mirror-like branches bending away from a common center).

In a physical particle system with a barrier, scattering often produces trajectory patterns that can be mathematically described using hyperbolas or similar curves. Likewise in nature (e.g., in light refraction, gravitation, etc.), hyperbola-like patterns appear when a force acts on many individual objects.

A moving mass (particles) encounters a barrier and is influenced by an underlying mathematical structure (a hyperbola). In my code, I use this curve logic to generate movements that feel organic while still being mathematically grounded.

Hyperbel

Visualization

Here you can see the particle simulation in action.

The invisible barriers deflect the particles and thus limit their space:

Here are a few screenshots of cool patterns that emerged from the code:

Screenshot 1 Screenshot 2 Screenshot 3