Skip to content

☔ Raindrops

JavaScriptThree.js

🎯 Solving the wave equation using a finite difference method for implementing the Laplace operator/solver
🧠 Inspired by this example from Recreational Mathematics with Python
🐍 Also available in VPython as raindrop_waves.py, but significantly slower!
👉 Wave equation with velocity-based damping:

utt+γut=c22uu_{tt} + \gamma u_t = c^2 \nabla^2 u

Where uu is the height of water, utu_t the velocity, and γ\gamma the damping coefficient.

Source
DiscreteScalarField
LaplaceOperator (FDM stencil)
WaveEquationSolver (explicit time stepping)
ScalarFieldSurface (visualization)