2
$\begingroup$

I need to make an animation of interfering coherent waves on the plane, that are produced by two sources. I would really appreciate if I am able to change the wavelength.

I am quite new to Wolfram, so I have completely no idea on how to make these "two" waves react to each other and show that to the user.

$\endgroup$
3
  • 1
    $\begingroup$ Take a look at this Wolfram Demonstration for a start: demonstrations.wolfram.com/WaveInterference. You can get the source code of the demonstration as well $\endgroup$
    – MarcoB
    Jul 17, 2016 at 20:11
  • 2
    $\begingroup$ What kind of sources (points, apertures, ...), what kind of time dependence? What have you tried? $\endgroup$
    – Jens
    Jul 17, 2016 at 20:17
  • 1
    $\begingroup$ Here's a starting point: ReliefImage[ Table[ Sin[Norm[{x + 4, y}]] + Sin[Norm[{x - 4, y}]], {x, -30., 30., .1}, {y, -30., 30, .1} ], ColorFunction -> "Aquamarine" ] Also look up DensityPlot. $\endgroup$
    – Szabolcs
    Jul 17, 2016 at 20:23

1 Answer 1

4
$\begingroup$

I guess you're looking for something like this:

wave[x_, y_, x0_, y0_, l_, t_] := 
  Sin[Sqrt[(x - x0)^2 + (y - y0)^2]/l + t];

Manipulate[
 DensityPlot[
  wave[x, y, d, 0, l1, t l1 l2] + 
   wave[x, y, -d, 0, l2, t l1 l2], {x, -100, 100}, {y, -100, 100}, 
  Mesh -> 10, PlotPoints -> 50], 
  {d, 5, 20},
  {l1, 5, 20}, 
  {l2, 5, 20}, 
  {t, 0, 1}]

d controls the distance between sources, l1 and l2 changes their wavelengths. Image of the manipulate object

Another example

Manipulate[
 ContourPlot[
  wave[x, y, d, 0, l1, t l1 l2] + 
   wave[x, y, -d, 0, l2, t l1 l2], {x, -100, 100}, {y, -100, 100}, 
  Mesh -> 10, PlotPoints -> 100, Contours -> {-0.5, 0.5}], {d, 5, 
  20}, {l1, 5, 20}, {l2, 5, 20}, {t, 0, 1}]

Another example

$\endgroup$
9
  • $\begingroup$ Thanks. But I want waves to move to see the process of interferrence itself. Do I add "Dynamic" or sth of this kind? $\endgroup$ Jul 18, 2016 at 5:12
  • $\begingroup$ I didn't include it because it might be kind of slow. $\endgroup$
    – Lucas
    Jul 18, 2016 at 15:14
  • 1
    $\begingroup$ @MichaelFreimann I've updated it, I just included a additional Manipulate field for t (with the right period). Use the + then just press play. $\endgroup$
    – Lucas
    Jul 18, 2016 at 15:23
  • $\begingroup$ Thanks a lot! I now about the density plot. $\endgroup$ Jul 19, 2016 at 15:58
  • 1
    $\begingroup$ @MichaelFreimann see updated answer $\endgroup$
    – Lucas
    Jul 19, 2016 at 22:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.