ω2 γ Xo Yo delay it
framerate

Use your fingers or mouse to control the model (hold shift key or use mouse wheel to zoom it). Canvas is matched to your browser window. 0 < Xo,Yo < 250. The script makes 2 it iterations with the time steps Δt = 0.05 per frame. Set it = 1 and γ = 0 after you get a stationary pattern. Two degenerate eigenmodes u5,7 and u7,5 are exited. Set Xo = 100 to see only one mode.
If you are bored of watching relaxation try the Square wave eigenmodes script.

Resonance

A CPU based simulation of the wave equation with time periodic perturbation
    t2u + γ∂t u = Δu + fo δ(r - ro ) sin ωt,
where γ is small damping (diffusion). Simple explicit scheme on a 250x250 grid is used. It is stable for the time steps Δt < h, where h = π/(N-1) is the space step of the grid.
For the square membrane wave eigenmodes and eigenfrequencies are
    un,m = sin(nx) sin(my) sin(ωo t),     ωo2 = n2 + m2.
You can see that in resonance ω = ωo (and γ = 0) wave amplitude increases to infinity.

HTML5 (no WebGL) 2D example with 500x500 grid.


WebGL Demos     updated 7 August 2010