Click here to go to the applet.

This java 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 circle (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.

The first thing to do when starting up the applet is to adjust the settings for your computer. Slide the "Resolution" slider to the right as far as you can without slowing things down too much. Or you could slide it to the left if things are already too slow. Another thing to try, if the simulation is too slow, is to slide the "Simulation Speed" button to the right. That won't improve the framerate (it will slow it down slightly, in fact) but it will get the waves moving faster. Or you could make the window smaller. The applet runs slower when the window is large.

Now you can start playing with the applet. 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 = Edit Wave". If you change it to "Edit Walls", then you can use the mouse to put obstacles in the wave's path.

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:

The Source popup controls the wave sources. It has the following settings:

The Mouse popup controls what happens when the mouse is clicked. If the popup is set to Mouse = Edit Wave, then a positive or negative area is drawn on the screen. When the mouse is released, this will create a circular wave centered at that point.

If the popup is set to Mouse = Edit Wall, then clicking on a point will create a wall there which will reflect waves. Clicking on a wall will erase it.

If the popup is set to Mouse = Edit Medium, then clicking on a point will create (or remove) an area which has a higher refractive index than the surrounding area, so that waves will move slower through it. This area will be shown in blue.

If the 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 Clear Walls button clears out walls without clearing out waves.

The Add Border button add walls all around the edge of the screen, so the waves will be reflected at the edges of the screen. If you don't put walls up, then the waves will just drift off the edge of the screen. These walls can be removed with the Clear Walls button; or you can remove some of them with the mouse, if you set the mouse popup to "Mouse = Edit Walls".

The Import/Export button will let you save and load your own creations. Java security restrictions prevent the applet from saving a file directly on your computer. Instead, to save a setup, click this button, copy the selected text, and paste it into another file. To load it again later, click Import/Export again and paste the saved information into the window, and then click Import.

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 Fixed Edges checkbox determines what happens when the wave hits a wall. To simulate sound waves, this should not be checked. To simulate electromagnetic waves or waves in a membrane, this should be checked. If this box is unchecked, waves will be reflected with no phase change (so, positive wavefronts will still be positive when reflected). If it is checked, waves will be reflected negatively (positive wavefronts will be negative when reflected). Different types of waves have different boundary conditions when they hit an obstacle, and that's what determines the behavior when a wave is reflected.

A good example to illustrate this is a string. If you have a string under tension, fixed at either end, then waves going in one direction along the string will be reflected negatively when it hits the end of the string, because the two wavefronts (incident and reflected) have to add up to zero at the end of the string. If the end of the string is allowed to move freely up and down, then a wave will be reflected positively when it hits the end of the string, because the wavefronts no longer have to add up to zero at the edge. A similar argument applies to the two-dimensional case.

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.

Now a list of some of the many types of waves simulated by this applet. (Actually the applet only simulates two basic types of waves, but you can interpret the waves as being many different types.)

Click here to go to the applet.