# Animation of a plane wave

I want to animate in 3D the plane wave $\sin(\omega t+kx+\phi)$, but following the form from the documentation, I can only make $k$ or $\omega$ vary, and I want $t$ to change. How do I do that?

• Thank you. There's no really much of a code. I just don't know how to use this function. There may be some proper tag for questions like this, maybe, that I should have used. I wrote this: Animate[Plot3D[ Sin[[Omega]*t + k*x + [Pi]/3], {x, -2, 2}, {t, -5, 5}], {k, -1, 1}] – Caneholder123 May 1 '15 at 18:29

wave[x_, t_, k_, ω_, ϕ_] := Sin[ω*t + k.x + ϕ];
Animate[Plot3D[wave[{x, y}, t, {1, 1}, 1, 0], {x, 0, 3}, {y, 0, 3}],
{t, 0, 10}] where {x,y} or x in the wave function definition is a 2D vector (in order to be able to draw it; in reality, x is a 3D vector and there would be no way to plot), k is the wave vector (I just used {1, 1} for demonstration), its magnitude is related to wavelength as $k = 2\pi/\lambda$ where $\lambda$ is the wavelength, its direction relates to the direction of the wave (energy) propagation. ω is the frequency (I chose 1) and ϕ is the phase which I chose as 0.

• Thank you very much. This is what I have been looking for. What do these numbers: t, {1, 1}, 1, 0 represent and how should this be read? – Caneholder123 May 1 '15 at 18:35
• Aha, I get, it is $k$, $\omega$ and $\phi$. Whoa, I'm really a beginner. – Caneholder123 May 1 '15 at 18:37
• I guess "fucked up" should mean having low plot resolution because of default PerformanceGoal->"Speed" chosen due to Animate. One might want to use explicit PerformanceGoal->"Quality" option for Plot3D. – Ruslan May 1 '15 at 19:09
• They are very polygonal, and at the saddle points there are differently colored triangles. Animations in Wolfram demonstrations usually look much smoother. Sorry for my use of imprecise and non-academic "fucked up". – Caneholder123 May 1 '15 at 20:21
• PerformanceGoal -> "Quality" did the job, kinda. Thank you. – Caneholder123 May 1 '15 at 20:22