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

=================

1

Welcome! Please do add more info, especially your code. Consider that the more precise and informative your question, the better your chances for good answers will be.

– Yves Klett

May 1 ’15 at 18:15

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

=================

1 Answer

1

=================

What about this?:

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π/λ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 kk, ω\omega and ϕ\phi. Whoa, I’m really a beginner.

– Caneholder123

May 1 ’15 at 18:37

See updated answer for explanations. What do you mean by “fucked up”?

– leosenko

May 1 ’15 at 18:46

2

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

1

PerformanceGoal -> “Quality” did the job, kinda. Thank you.

– Caneholder123

May 1 ’15 at 20:22