I have been trying to implement this Wave equation into java:
A = amplitude of wave L = wave length w = spatial angular frequency s = speed wt = temporal angular frequency d = direction FI = initiatory phase
$$Y(x,y,t)=A\cdot\cos(w \cdot(x,y)+ wt\cdot t + FI)$$
I understand that it returns a Vector. But I am unsure as to what this section of the formula means:
$$w \cdot(x,y)$$
I believe that $w$ is a vector. But I'm not whether its a 3D Vector or 2D Vector, and how it is used.
Source: http://lnu.diva-portal.org/smash/get...412/FULLTEXT01
The general equation for a planar wave in 3D is of the form $E : \mathbb{R}^{4} \rightarrow \mathbb{C}$, where
$$ E( \mathbf{r}, t ) = E_0 \cos \left( \omega t + \mathbf{k}^{T} \mathbf{r} + \varphi_0 \right), $$
where $t$ is time, $\omega$ is temporal frequency, $\mathbf{r}$ is position, and $\mathbf{k}$ is the wave vector. The wave vector is a unit vector in the direction of propagation scaled by the wavenumber, $k = \omega / c_0 = 2\pi / \lambda$, it will often look something like
$$ \mathbf{k} = k \left[ \begin{array}{c} \cos(\phi) \cos(\theta) \\ \cos(\phi) \sin(\theta) \\ \sin(\phi) \end{array} \right], $$
where $\theta$ would usually be the azimuth angle and $\phi$ the elevation.
If you look at your equation, it is of the same form except that it is only using 2 spatial dimensions, $x$ and $y$. (So it's a plane wave with its propagation confined to the $x-y$ plane.) Thus, what you have written as "w*(x,y)" is $\mathbf{k}^{T} \mathbf{r}$ in the above; it is the dot product between the wave vector and the position vector.
Also, your equation does not return a vector but rather a scalar; it takes a 2D location and an instant in time and returns the scalar value of the propagating wave at that point at that particular time ($\mathbb{R}^{3} \rightarrow \mathbb{C}$).