Sine wave equation into Java Code

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 3K views
TastyLemons
Messages
3
Reaction score
0
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*cos(w *(x,y)+ wt*t + FI;

I understand that it returns a Vector. But i am unsure as to what this section of the formula means:

w *(x,y)

I believe that w is a vector. But I am not whether its a 3d Vector or 2d Vector, and how it is used.
If you have time, could you please explain this formula to me? Thank you

Source:
http://lnu.diva-portal.org/smash/get/diva2:205412/FULLTEXT01

Thank You!
 
Physics news on Phys.org
TastyLemons said:
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*cos(w *(x,y)+ wt*t + FI);

Added missing bracket.

I understand that it returns a Vector. But i am unsure as to what this section of the formula means:

w *(x,y)

I believe that w is a vector. But I am not whether its a 3d Vector or 2d Vector, and how it is used.
If you have time, could you please explain this formula to me? Thank you

Source:
http://lnu.diva-portal.org/smash/get/diva2:205412/FULLTEXT01

Thank You!

So far as I can tell, [itex]w[/itex] is the wavenumber and is a 2D vector, and "w * (x, y)" is the scalar product [itex]\vec w \cdot (x,y)[/itex].