Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Sine wave equation into Java Code

  1. Feb 3, 2014 #1
    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 im 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


    Thank You!
  2. jcsd
  3. Feb 3, 2014 #2


    User Avatar
    Homework Helper

    Added missing bracket.

    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].
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Threads - Sine wave equation Date
Why is the set of cosines and sines a vector space? Aug 18, 2015
Value of sine(π) Jul 21, 2014
Laplace Sine Transform Oct 31, 2012
Sine of inverse pi pattern Jun 21, 2011
Sine Waves and Primes Feb 15, 2006