Presets
Playback
Butterfly body
Pick a species preset above, then change wing length, mass and wing area.
Flapping and flight
Frequency, stroke and air speed set the Strouhal number. Auto C_L lets the butterfly carry its weight; switch it off to choose C_L yourself.
Wing colour
Structural colour comes from thin chitin layers separated by air. The layer thicknesses decide which colour is reflected.
Meadow
More butterflies, more wandering. Click the meadow or the map to plant a flower.
Camera
Layers
Quality
Model checks
The science
What this model is
A butterfly flaps two pairs of wings through a large stroke at 5 to 20 beats per second. This page treats the wings as a quasi-steady aerodynamic surface: at each instant the lift comes from the air speed over the wing, which combines the flight speed and the flapping speed. Everything is computed in SI units; the picture is drawn at 1 unit = 3.5 cm and slowed down so you can see single wingbeats (the slow-motion slider).
1. Flapping kinematics
The wing angle above the body plane is phi(t) = phi0 + (Phi/2) sin(2 pi f t), with stroke amplitude Phi, frequency f and a stroke centre phi0 = 12 degrees. The flapping speed of the wing section at the radius of the second moment of area (r2 = 0.58 R) is u_f = r2 dphi/dt = r2 pi f Phi cos(2 pi f t), with Phi in radians. The peak-to-peak vertical travel of the wing tip is A = 2 R cos(phi0) sin(Phi/2).
2. Lift, weight and the lift coefficient
The instantaneous lift is L(t) = 1/2 rho C_L S (U^2 + u_f(t)^2), where U is the forward air speed, S the total wing area and rho the air density. Averaged over a wingbeat <u^2> = U^2 + r2^2 R^2 (pi f Phi)^2 / 2, so level flight needs C_L = m g / (1/2 rho S <u^2>) (the "C_L needed" readout and the fourth graph). The required value rises quickly when the butterfly slows down; in hover only the flapping speed is left. A fixed-wing section stalls near C_L = 1 to 1.5, but the leading-edge vortex on a flapping insect wing can reach about 2.5 (the red line, an assumption set to 2.6): beyond it the butterfly cannot hold height and the simulation lets it sink.
3. Vertical motion and body bobbing
The height follows m dv/dt = L(t) - m g - 1/2 rho C_D,b (S/2) v |v| (C_D,b = 1). Because L(t) peaks twice per beat, the body bobs up and down at twice the wingbeat frequency, as real butterflies do. With "Auto C_L" on, the butterfly sets its C_L to carry its weight; with the altitude pilot on it also climbs or descends to the flower it is visiting (a PD controller on height and vertical speed). Switch both off to fly with a fixed C_L and watch it climb or sink.
4. Strouhal number and the wake
St = f A / U compares the flapping tip speed with the forward speed. Swimming and flying animals that cruise efficiently cluster at 0.2 < St < 0.4 (Taylor, Nudds and Thomas 2003), the green band on the third graph. The wake is drawn as a train of vortex rings shed at each half-stroke, spaced about U / (2 f) apart in the air. The circulation estimate assumes one ring of radius R per wingbeat that carries the weight impulse, Gamma = m g / (rho pi R^2 f) (vortex-ring gait).
5. Power
The aerodynamic power is estimated as P = 1/2 rho C_D S <|u|^3> with C_D = 0.12 + C_L^2 / (pi e AR) (e = 0.7, aspect ratio AR = (2R)^2 / S), using a numerical average of u^3 over a beat. It ignores the inertial power needed to accelerate the wings and any elastic storage.
6. Colour: pigments and thin-film structures
The orange of a monarch comes from pigments that absorb short wavelengths. The blue of a Morpho wing has no blue pigment: the scales carry stacks of chitin lamellae (refractive index n1 = 1.56) separated by air (n2 = 1.0). Light reflected from every interface adds in phase when lambda = 2 (d1 sqrt(n1^2 - sin^2 theta) + d2 sqrt(n2^2 - sin^2 theta)) (Bragg condition), so the colour moves towards violet as the viewing angle theta grows. The reflectance graph is computed with the characteristic-matrix (transfer-matrix) method, s and p polarisation averaged; the spectrum is turned into a screen colour with a CIE 1931 colour-matching fit under a flat white illuminant.
7. Steering between flowers
Butterflies wander, seek the nearest flower with nectar, slow down to arrive, land, feed for 2 to 5 s and move on. A visit that follows a visit to another flower of the same kind counts as a cross-pollination event. Click the meadow (or the map) to plant a flower.
Model checks on this page
(1) the cycle average of the instantaneous lift by quadrature against the closed form, and trimmed lift against weight; (2) the Strouhal number measured from the simulated tip path against the formula; (3) the transfer-matrix reflectance peak against the Bragg condition; (4) a step-size test of the vertical-motion integrator.
Honest simplifications
- Quasi-steady aerodynamics with a constant C_L: it ignores clap-and-fling, wake capture, added mass, wing flexibility and the unsteady build-up of the leading-edge vortex. C_L max is an assumption, not a measurement of a particular species.
- Forward speed is a controlled input (scaled down near flowers); the horizontal thrust balance and body pitch are not solved. The pitch and wing twist drawn on screen are cosmetic.
- Species numbers (wing length, mass, area, frequency) are of the right order of magnitude, not measurements of individual animals. The efficient Strouhal band is an empirical range, not a prediction for a given wing.
- The live viewing angle is halved before it enters the Bragg formula, a crude stand-in for the angle-spreading of ridged scales (otherwise the wing would fade to white at steep angles). The structural colour treats the stack as flat parallel layers; real Morpho scales have ridged lamellae that spread the reflection over a wide angle and a pigment layer below that absorbs transmitted light. Monarch and white-butterfly colours use simple illustrative spectra.
- Vortex rings are a visual aid placed from the flapping phase, not the output of a flow solver; ring sizes and decay are schematic.
What to try
- Press Slow and hovering: U drops to 0.4 m/s, C_L needed jumps above the red line and the butterfly can no longer hold its height.
- Press Strouhal sweet spot: U is set so that St = 0.3, the middle of the efficient band.
- Press Blue morpho, choose the Follow close camera and orbit around it: the wing colour moves from blue towards violet as the viewing angle grows. Change the air gap d2 to retune the colour.
- Switch off Auto C_L and lower C_L: the butterfly sinks until it reaches the ground.
- Raise the flap frequency while keeping U fixed and watch St, the lift ripple and the body bobbing change.
- Click the meadow to plant a flower and see which butterfly arrives first. Click a butterfly to follow it.