Formulas
Formulas
The parametric mathematics behind each creature in the catalogue. Every formula here is the actual code being run — copied from the shaders, with annotation.
I. The Fireeel
A filiform creature: 10,000 points distributed along a parametric curve, mapped through a chain of trigonometric and radial transformations. The body emerges from the interaction of two harmonics modulated by a third radial term.
Parameters. Spine curvature k_freq,
body length e_scale, filament density q_inner,
writhe (2k harmonic) writhe, flare amplitude
flare, flare inner flare_inner, time
t.
Formula. For each point index
x ∈ [0, N):
k = 4 · cos(x / k_freq)
e = x / e_scale - 20
d = √(k² + e²)
m = step(15, k²) # mass flag (1 if k² > 15)
q = writhe · sin(2k)
+ 0.3 / k
+ k · sin(x / q_inner) · (flare + flare_inner · sin(14e − 3d + 2t))
X = q + 50 cos(d − t) + 200
Y = 875 − q sin(d − t) − 39d
The point (X, Y) is then mapped to NDC for rendering.
Points with m = 1 are tip points (warmer color, larger
size); the rest form the body.
Why this works. The variable d is a
radial distance — its level sets are nested ovals. q
modulates a tangential motion around those ovals, but the modulation
itself is gated by k², which oscillates rapidly. The
sin(x/q_inner) term introduces a slow envelope that
produces the writhing motion. The cos(d − t) and
sin(d − t) terms rotate everything as a function of radial
position and time, which is what gives the creature its characteristic
spiraling, breathing quality.
II. The Jellyfish
A bell of revolution attached to a colonnade of catenary tentacles. The bell pulses; the tentacles trail; the morphospace controls how each happens.
Parameters. Bell curvature n, tentacle
count N, tentacle length L, pulsation
frequency ω, flexibility φ, time
t.
Bell (superellipsoid of revolution)
For each bell point with surface coords (u, v) where
u ∈ [0, 1] is meridian and v ∈ [0, 2π] is
azimuth:
R(u) = (1 − uⁿ)^(1/n) # superellipse radius
h(u) = u^(1/n) # height drops with u
pulse_phase = 2ωt − 2πu
R *= 1 + (0.08 + 0.14(1 − u)) · sin(pulse_phase)
h *= 1 + 0.05 · sin(pulse_phase + 1)
bell(u, v) = (R cos v, −0.85 h, R sin v)
The exponent n controls the bell silhouette. At
n = 1.4 the bell is teardrop-shaped (siphonophore-like). At
n = 4 it is flat-domed (box-jellyfish-like). At
n = 2 it is exactly hemispherical.
Tentacles (wave-modulated catenaries)
For each tentacle k ∈ [0, N) with along-tentacle
parameter s ∈ [0, 1]:
φ_k = 2πk/N # azimuthal anchor
hip = bell(u = 0.92, v = φ_k) # tentacle origin at rim
amplitude(s) = φ · 0.42 · sinh(2.5s) / sinh(2.5)
wave_angle = 2ωt − 4πs + 1.3 φ_k
w_radial = amplitude · cos(wave_angle)
w_tangent = 0.55 · amplitude · sin(1.3 · wave_angle + 2s)
tentacle(k, s) = hip
+ (cos φ_k, 0, sin φ_k) · w_radial
+ (−sin φ_k, 0, cos φ_k) · w_tangent
+ (0, −s L, 0)
The sinh amplitude growth means tentacles are nearly
straight near the bell and increasingly mobile toward the tip. The 1.3×
tangent multiplier produces a slight rotational sweep so tentacles swirl
rather than oscillate in a plane.
III. The Quadruped
A body lofted along a curved spine, supported by four spring-loaded inverted pendulum (SLIP) legs that strike the ground in a trot pattern.
Parameters. Leg length L_leg, body
length B, stiffness k_s, spine curvature
κ, gait duty cycle τ, time t.
Body (tube along parametric spine)
For a body point at spine fraction s ∈ [0, 1] and tube
angle θ ∈ [0, 2π]:
H = 0.85 L_leg # ride height
arch = 0.18 κ · sin(πs)
radius(s) = 0.08 + 0.08 sin(πs) # thicker mid-body
spine(s) = (B(s − 0.5), H + arch, 0)
body(s, θ) = spine(s) + radius(s) · (0, sin θ, cos θ)
Negative κ produces a sway-backed silhouette
(dachshund). Positive κ produces an arched back (cheetah in
mid-bound).
Legs (SLIP cycle)
For each leg index k ∈ {0, 1, 2, 3} with phase
φ_k ∈ {0, 0.5, 0.5, 0} (a trot) and along-leg parameter
u ∈ [0, 1]:
attach_s = 0.18 if k ∈ {0, 1} else 0.82 # front pair vs back pair
hip = spine(attach_s) + lateral
c = frac(0.55 t + φ_k) # gait cycle position
if c < τ: # stance — foot on ground
s_stance = c / τ
foot_x = 0.7 L_leg · (0.5 − s_stance)
foot_y = 0
compression = 0.18 k_s · sin(π s_stance)
else: # swing — foot in air
s_swing = (c − τ) / (1 − τ)
foot_x = 0.7 L_leg · (s_swing − 0.5)
foot_y = 0.20 L_leg · sin(π s_swing)
compression = 0
leg(k, u) = hip + (foot − hip) · u / (1 − compression / |foot − hip|)
The compression term enforces the SLIP model: during stance the leg
shortens by an amount proportional to the spring stiffness
k_s times a sinusoidal load profile. Visible as a color
shift to red in the rendering — points under load.
IV. The Wing
A planform sampled over its (span, chord) coordinates, with modulated lift along the chord, dihedral and sweep applied as displacement fields, and wingtip vortices shed continuously from the trailing edge.
Parameters. Aspect ratio AR, planform
shape σ, sweep Λ, dihedral Γ,
flap amplitude A, time t.
Wing surface
For each surface point with span coord ξ ∈ [−1, 1] and
chord coord η ∈ [0, 1]:
half_span = 0.45 (AR / 7)
chord(ξ) = 0.36 · lerp(1, √(1 − ξ²), σ) # rectangular ↔ elliptical
· lerp(1, (1 − |ξ|)^1.2, 0.3σ) # tip pointedness
leading_edge_x(ξ) = −Λ |ξ|
y_camber(η) = 0.04 sin(πη)(1 − 0.5|ξ|)
y_dihedral(ξ) = Γ |ξ|
flap_phase = 1.8 t
y_flap(ξ) = 0.45 A · |ξ|^1.6 · sin(flap_phase)
y_twist(ξ, η) = 0.18 A · sign(ξ) · |ξ|^1.7 · cos(flap_phase) · (η − 0.5)
wing(ξ, η) = ( ξ · half_span,
y_dihedral + y_camber + y_flap + y_twist,
leading_edge_x(ξ) − η · chord(ξ) )
The 0.45 A |ξ|^1.6 flap term means the tip moves much
more than the root. The twist term is what makes a wing aerodynamically
correct in flapping — the tip rotates nose-down on the downstroke, a
phenomenon called washout.
Wingtip vortices
For each vortex particle, spawned from the trailing edge with age
α ∈ [0, 1]:
ξ_origin = random in [−1, 1]
spawn = trailing_edge(ξ_origin)
tip_factor = |ξ_origin|^1.5 # tip-biased
α_phase = 12α + 5 ξ_origin + 1.5 t
radius = 0.03 + 0.08 α
drift = 0.55 α # backward drift
particle = spawn + tip_factor · radius · (0, cos α_phase, sin α_phase)
+ (0, 0, −drift)
Particles spiral with growing radius as they age, drifting backward. The tip-biased weighting means the spiral is concentrated where real wingtip vortices form. Older particles fade.
A note on time
All four formulas take time t as a uniform. The
animation is not an overlay — the time term is inside the
parametric formula. Pause the time, and you see a snapshot of the
morphospace at instant t. Move the parameters with time
paused, and you walk the morphospace. Resume time, and the creature
breathes again.
This is the same trick the fireeel formula used originally: time as a parameter, not a frame counter. The animation is geometry, not interpolation.
A note on presets
Each creature exposes preset buttons that jump to named regions of the morphospace. The presets are not "good" parameter sets in any objective sense — they are labels. Names exist for the corners that resemble real creatures (Moon jelly, Cheetah, Albatross). Each catalogue also contains an "Empty Quadrant" preset: a corner of the morphospace nature does not occupy. These are deliberately included because the absence is informative — they show what was rejected, by physics or by selection.
Edit this document when you add a creature. The formula is the contribution.