Click here to go to the applet.

This applet is a simulation that demonstrates scalar waves in two dimensions. Wave motion crops up in many different areas in physics; water waves, sound, and light are three examples.

When the applet starts up you will see a white square (called the "source") emitting circular waves. The light areas are positive and the dark areas are negative. So, if you prefer to think of the waves as sound waves, the light areas would be areas of high pressure, and the dark areas would be low pressure. The source might be a speaker of some sort.

You can drag the source around wherever you want. Also you can create new waves (areas of high pressure) by clicking anywhere. There is a popup menu that controls what the mouse does. By default it is set to "Mouse = Draw Wave (+)". Hold down the command or alt key while drawing to freeze the simulation.

Click the right mouse to bring up a popup menu to add various objects to block the path of the waves. Once you select one, it will be placed on the screen, and you can draw it anywhere you like, or click and drag the ends of it to resize it. Right-click on the object to edit its parameters.

The Setup popup can be used to view some interesting pre-defined experiments. Once an experiment is selected, you may modify it all you want. The choices are:

• Single Source: this is just a single source emitting circular waves.
• Two Sources: this is just two sources emitting circular waves, creating an interference pattern between them.
• Four Sources.
• Single Slit: this demonstrates diffraction of waves travelling through a slit.
• Double Slit: this demonstrates diffraction of waves travelling through a double slit.
• Triple Slit.
• Obstacle: this demonstrates diffraction of waves travelling around an obstacle.
• Half Plane: this demonstrates diffraction of waves around the edge of a plane.
• Dipole Source: this demonstrates an acoustic dipole source consisting of two sources out of phase.
• Lateral Quadrupole: this demonstrates an acoustic quadrupole source consisting of four sources arranged in a square.
• Linear Quadrupole: this demonstrates an acoustic quadrupole source consisting of four sources arranged in a line.
• Hexapole.
• Octupole.
• 12-Pole.
• Plane Wave: this demonstrates a simple plane wave source.
• Intersecting Planes: this demonstrates two plane waves intersecting at right angles.
• Phased Array 1: this is a group of point sources arranged in a line, where the relative phases of each point is different. This causes the radiation to be pointed downwards. The angle can be adjusted with the Phase Difference slider.
• Phased Array 2: this is a group of point sources arranged in a line, where the relative phases of each source causes the radiation to be directed at a single point. The location of the point can be adjusted with the Phase Difference slider.
• Phased Array 3: this is a group of point sources arranged in a line, where the relative phases of each source causes the radiation to act as if it is coming from a point source to the left of the screen. The location of the virtual point source can be adjusted with the Phase Difference slider.
• Doppler Effect 1: this shows a moving source, thereby demonstrating the Doppler effect.
• Doppler Effect 2: this shows waves being reflected by a moving obstacle. The horizontal obstacle on the right is moving up and down. (The divider in the middle is just there to make the effect more clear.) When the obstacle is moving up, the reflected waves have a higher frequency than the source. When it's moving down, the reflections have a lower frequency.
• Sonic Boom: this shows a source moving faster than the speed of wave propagation, creating a shock wave behind it.
• Big 1x1 Mode: this creates a small box with a standing wave in its normal mode of oscillation. The inside of the box changes color with a simple time dependence with no left-right or up-down motion.
• 1x1 Modes: this creates several small boxes of different sizes in their fundamental modes. If you cut out the right side of one of the boxes and turn up the brightness you can see waves coming out of the box at its resonant frequency.
• 1xN Modes: this creates several small boxes in other normal modes.
• NxN Modes: this creates several small boxes in other normal modes.
• 1xN Mode Combos: this creates several small boxes, each of which has a combination of two random 1xN modes.
• NxN Mode Combos: this creates several small boxes, each of which has a combination of two random NxN modes.
• 0x1 Acoustic Modes: this creates several small boxes of different sizes in their fundamental modes. The Fixed Edges checkbox is off, which causes the waves to act like acoustic waves.
• 0xN Acoustic Modes: this creates several small boxes in other acoustic normal modes. The mode frequencies are all multiples of the fundamental, so you will see all the modes sync up periodically. (This is not the case with the 1xN Modes example above.)
• NxN Acoustic Modes: this creates several small boxes in other acoustic normal modes.
• Coupled Cavities: this creates pairs of boxes with a small interconnection between them. This causes the oscillation energy to move back and forth between the two boxes.
• Beats: this creates two sources close together with different frequencies. Because the frequencies are close but not exactly the same, you will see black lines of interference or "beats".
• Slow Medium: in this demonstration, the area below the blue line has a different refractive index, so that waves move slower through that area. As a result, waves hitting the the blue region will be partially reflected and partially transmitted. Waves travel through the blue region at half the speed as they travel through the black region, so the blue region has a refractive index of 2. As a comparison, most common types of glass have a refractive index anywhere from 1.46 to 1.96.
• Refraction: this creates a blue region similar to the last setup, but shows short pulses hitting it at an angle so you can see the waves being reflected and refracted.
• Internal Reflection: this creates a blue region similar to the last setup, but shows short pulses hitting it at an angle from inside the blue region. The angle is such that none of the main part of the wave is transmitted; this is called total internal reflection. You will see some activity in the upper area; this is partly because the top part of the wave is rounded instead of being a plane, so that it hits the interface at a different angle (it goes up from the source instead of diagonally). This part is transmitted, but the plane part going diagonally is reflected. But, even for the part of the wave that is reflected, you will a portion of the wave travelling along the interface between the blue and black area; but it will not propagate into the black area.
• Anti-Reflective Coating: this creates a blue region similar to the last setup, but with an anti-reflective coating which eliminates reflections. (There will be some initial reflections when the source is first turned on because of high-frequency components in the initial wavefront.) If you increase the frequency of the source, you will see reflections because the wavelength of the source no longer matches the thickness of the coating.
• Zone Plate (Even): This creates a zone plate, which uses diffraction to focus light.
• Zone Plate (Odd): This creates another zone plate which is similar to the previous one, but has opaque areas made transparent and vice versa. It also focuses light.
• Circle: This creates a circular area with a source at the center. Pulses will travel outward and will then be reflected back to the center.
• Ellipse: This creates an elliptical area with a source at one focus. Pulses will converge at the other focus.
• Resonant Cavities 1: This creates a series of rectangular cavities being driven by a plane wave from above. As you change the frequency you will see the response of each cavity change. Each cavity has a different resonant frequency so it will respond differently. After changing the frequency you may want to wait a bit for things to settle down (or turn the simulation speed way up).
• Resonant Cavities 2: This creates a series of smaller rectangular cavities.
• Room Resonance: This shows acousting standing waves in a series of rooms being driven by the same frequency, but at different positions. The brightness is turned way down so you only see waves in the rooms that resonate. As you can see, three of the rooms resonate but the fourth does not, because the source is not located in the right place (there aren't any modes with the right frequency that have antinodes at the source location). By varying the frequency you can see different resonance behavior. (You may want to turn the simulation speed up so you get faster results as you experiment.)
• Waveguides 1: This creates a series of waveguides of different widths. Narrower waveguides, like at the left end of the screen, have higher cutoff frequencies; the leftmost waveguide has a cutoff frequency that is higher than the source, so there is no wave motion in it. You can fix this by turning the Source Frequency slider up.

Notice that the waves seem to be moving faster in thinner waveguides. They appear to be moving faster than waves normally move in the applet. This is because the phase velocity is faster in thinner waveguides; but the signal velocity is actually slower than normal, as you can verify by clicking the Clear Waves button and watching the wave move down the guide for the first time.

Since the waveguides are being driven by a plane wave, only the TE01 mode is present. (See the waveguide applet for another way to view waveguide modes.)

• Waveguides 2: This is just the same set of waveguides with a lower frequency, showing that more of the guides are driven below cutoff.
• Waveguides 3: This is a set of identical waveguides being driven by small holes at different locations. This causes different sets of modes to be excited in different proportions. When the guide is being driven near the center, the TE01 mode is dominant, but when it is driven near the edge, the TE02 mode is more prevalent. The frequency is low enough so that all other modes are cut off. You can fix this by turning the frequency up. By turning the frequency down, you can cut off the TE02 mode as well.
• Waveguides 4: This is a set of acoustic waveguides being driven at various locations.
• Waveguides 5: This is a set of identical waveguides with various modes present. The first waveguide contains the TE01 mode; the second contains the TE02 mode; the third contains both; the fourth contains the TE03 mode; the fifth contains TE01 and TE03; the sixth contains TE02 and TE03. (There may not be room on your screen for all these modes if your resolution is not set high enough.)

Notice that the higher modes (TE02 and especially TE03) seem to be moving faster. This is because the phase velocity of TE02 and TE03 is greater than that of TE01. Their signal velocities are slower, though, which is why it takes the TE03 wave so long to make it down to the end of the waveguide. Also if you turn off the source (by setting the source popup to "No Sources") it will take quite a while for the TE03 mode to stop.

• Parabolic Mirror 1: This shows a parabola with a source at the focus. The parabola direct the waves upward as plane waves (except at the edges where the waves don't look planar; if we extended the parabola further it would fix this).
• Parabolic Mirror 2: This shows a parabola with plane waves coming from above. They converge at the focus.
• Sound Duct: This shows a duct with sound waves travelling through it. When they get to the end, they are partially reflected, even through there is nothing there for them to bounce off of. This shows that waves are reflected by any discontinuity, not just by walls.
• Baffled Piston: This shows the sound radiation from a baffled piston, which is a simple model of a boxed loudspeaker.
• Low-Pass Filter 1, 2: This shows an acoustic low-pass filter. Low-frequency waves travel through it more easily than high-frequency waves, as you can verify by comparing Low-Pass Filter 1 with Low-Pass Filter 2. (These two setups are the same except for the frequency.) However there are a few higher frequencies which will pass easily.
• High-Pass Filter 1, 2: This shows an acoustic high-pass filter. High-frequency waves travel through it more easily than low-frequency waves, as you can verify by comparing High-Pass Filter 1 with High-Pass Filter 2.
• Band-Stop Filter 1, 2, 3: This shows an acoustic band-stop filter, which blocks out a range of frequencies. There are three versions of this setup; one at a low frequency, one high, and one at the blocked frequency.
• Planar convex lens: This shows a lens made out of a glasslike material. It focuses plane waves. Unfortunately the lens is pretty small compared to the wavelength of light so it won't focus the light as well as it would in real life. This lens is only a dozen or so wavelengths wide. The range of visible light wavelengths is 400 to 700 nanometers, so obviously a real lens is much larger compared to a wavelength and so will focus better without running into diffraction effects.
• Biconvex lens: This shows another lens. It takes line coming from a point source and focuses it at another point.
• Planar Concave Lens: This shows a lens that takes plane waves and spreads them out.
• Circular Prism: This shows a round prism made out of a dense material.
• Right-Angle Prism: This shows a prism that takes waves travelling down and points them to the right.
• Porro Prism: This shows a prism that takes waves travelling down and points them up. Obviously in real life it would do this at light speed.
• Scattering: This shows a plane wave being scattered by a point particle.
• Lloyd's Mirror: This shows an interferometer which consists of a point source close to a mirror (at the bottom of the window). The waves coming from the source interfere with the waves coming from its mirror image.
• Temperature Gradient 1: This shows refraction of a wave due to a temperature gradient. The blue area represents cool air, where sound waves move more slowly. This causes the waves to bend downwards.
• Temperature Gradient 2: This shows refraction of a wave due to a different type of temperature gradient. The blue area represents cool air, where sound waves move more slowly. This causes the waves to bend upwards. A similar effect is responsible for mirages.

If the Mouse popup is set to Mouse = Hold Wave (+), then if you click on a point and hold the mouse down, it will create a positive area on the screen which will persist as long as the mouse is down. This will cause the surrounding area to also be positive. For sound waves, this is like adding air at that point; it puts more pressure on the surrounding area.

The Clear Waves button clears out any waves but does not remove any walls or sources.

The Stopped checkbox stops the applet, in case you want to take a closer look at something, or if you want to work on something with the mouse without worrying about it changing out from under you.

The Waves popup determines what type of waves are being simulated. The type of waves affects two things: the screen width scale, and the response when a wave hits a wall. For acoustic waves, waves will be reflected with no phase change (so, positive wavefronts will still be positive when reflected). Otherwise, waves will be reflected negatively (positive wavefronts will be negative when reflected).

The screen width scale depends on the setting of the Waves popup, but you can also set it manually by going to File->Options. Setting the width of the screen in meters doesn't affect the simulation but it does affect the coordinate display, and the values that are displayed for object parameters (lengths, widths, wavelengths, etc).

The 3-D View checkbox gives you a 3-D view. You can rotate the view by dragging the mouse, but you can't modify the waves or walls in this mode. The brightness slider will adjust the height of the waves.

The Simulation Speed slider controls how far the waves move between frames. If you slide this to the left, the applet will go faster but the motion will be choppier.

The Resolution slider allows you to speed up or slow down the applet by adjusting the resolution; a higher resolution is slower but looks better.

The Brightness slider controls the brightness, just like on a TV set. This can be used to view faint waves more easily.

java@falstad.com