# Wave Builder

• Play with the sliders for a while to see how you can use them to build waves of various shapes. You can set a slider to zero by clicking (or tapping) on its center point.
• Then choose a target and try to match that shape. Start with the easier targets, near the top of the list. If you're stuck, click the Hint button.
• After a little practice, switch modes from Free exploration to Challenge round 1. Try to match the targets without using too many hints.
• You can also try Challenge round 2, but be aware that Challenge round 3 is much harder.
• Next, choose Draw target from the bottom of the target list, and click/tap in a few spots on the graph to outline your own target function. In this case, if you don't want to take the time to match the target by hand, you can just click the Solve button and the computer will do it for you.
• You’ll notice that you can’t match every target perfectly using only these 16 basis functions. To match corners and other abrupt changes requires adding basis functions with shorter wavelengths. Still, you can match a remarkable variety of shapes using only a limited set of basis functions.
• As you can see, all of these waves are pinned down at the two ends. You can think of the shape as a stretched string on a guitar or violin. In that case the leftmost slider controls what we call the fundamental mode, while the other sliders control the harmonics or overtones.
• The default basis functions, each controlled by a slider, are sine waves. For variety, you can also choose from two less-familiar sets of basis functions. Some targets are much easier to match in one basis than in the others. Challenge round 4 uses the Oscillator basis.
• Building complicated waves out of sine waves is called Fourier synthesis, and finding the correct mix of sine waves to match a given target is called Fourier analysis. Scientists and engineers use these operations all the time when studying signals such as sound and electromagnetic waves. We also analyze the quantum states of a trapped particle in terms of sine waves and other basis functions. The names of the oscillator and bouncer basis functions come from the quantum systems for which these functions correspond to states of definite energy.
• How is the computer able to calculate the correct slider positions to match an arbitrary target wave (when you ask for a hint or press the Solve button)? The answer is what Griffiths calls Fourier’s trick, and it’s similar to finding the components of an ordinary vector, by dotting it into the unit vector along each axis—except that here we’re working in a 16-dimensional space, and the dot-product involves multiplying the two functions together and integrating.
• Technically these shapes are just snapshots of waves at a given instant. Real-world waves change and move around as time passes—but that motion is beyond the scope of this exercise.

Based in part on the Mac Classic program QWave written in 1992 by Michael Martin, and on the PhET interactive Fourier: Making Waves. This is open-source software; see the source code for details.

More physics software