Simple Sea Waves

The Mathematics of Waves

The position of the water surface is calculated for each individual layer $i$ (where $i=0$ is the topmost layer) using the periodic function:

$$y_{i}(x, t) = y_{pos} + A_{i} \sin(k_{i}x + \omega_{i}t + \phi_{i})$$

Each parameter in the equation is derived from your slider settings and scales based on the layer index $i$:

When you enable Superposition, the resultant wave is the algebraic sum of all active layers at every point $x$ along the surface:

$$y_{total}(x, t) = y_{pos} + \sum_{i=0}^{n-1} A_{i} \sin(k_{i}x + \omega_{i}t + \phi_{i})$$