Home▸Physics & Mechanics▸Wind Flag Simulation

Wind Flag Simulation (2D)

Interactive 2D wind flag: a mass-spring cloth grid pinned to a pole along one edge flaps and ripples as a Verlet-integrated wind field pushes across it — tune wind speed, gustiness and fabric stiffness.

Physics & Mechanics2DEasy60 FPS📱 Mobile-adapted⇄ 3D version
2d-3d-flag-cloth ↗ Open standalone

This 2D simulator builds a flag from a grid of point masses joined by structural and shear springs, pins the entire hoist edge to a flagpole, and advances the rest with Verlet integration under a gusting wind field. Raise the wind speed to see the fabric billow harder toward the free fly edge, hit the gust button for a sudden burst, and adjust fabric stiffness to trade a loose, floppy ripple for a tighter, faster-recovering wave — the same trade-off that separates heavy canvas from light nylon in a real flag.

⚙ Under the hood

A 2D mass-spring flag pinned to a pole along its hoist edge flaps and ripples as a Verlet-integrated wind field pushes across it, with adjustable wind speed and fabric stiffness.

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)