Simple Version of Gerstner Wave Formula?

682 Views Asked by At

I am attempting to implement these formulas into a wave simulator for java. But i am trouble understand a lot of parts of the equation:

http://http.developer.nvidia.com/GPUGems/gpugems_ch01.html

For example in equation 1:

It returns $Wi(x,y,t)$ as with all other equations there; Whats weird to me is that its returning $t$ and not $z$? And why is it returning values for $Wi()$, when in the equation it uses $Wi$ to calculate it:

$x Wi + t?$

Also is this returning a 2 dimensional Vector or a three-dimensional vector? For what im doing, i need a Vector3$f(x,y,z)$ to apply it to vertices in my grid mesh. But I'm rather confused.

Would it be possible for you to explain it to me in simple terms, or provide a link to a simplified version perhaps? Thanks for your help.

1

There are 1 best solutions below

0
On

Whats weird to me is that its returning t and not z?

The variables $x,y,t$ are not "returned", they are the arguments of function $W$. The third argument is named $t$ and not $z$, because it represents time, not the third spatial coordinate. The formulas are for wave in two spatial dimensions.

And why is it returning values for Wi(), when in the equation it uses Wi to calculate it:

Mathematics is case-sensitive. The equation involves $w_i$, which is the angular frequency of the wave (mentioned in the first bullet point before the formula).

Also is this returning a 2 dimensional Vector or a Three dimensional Vector?

The function $W_i$ returns a scalar, "the state of each wave as a function of horizontal position and time".