```What is it?
-----------
Picture this: You are waiting by the sidewalk to cross a busy
street, and as a car whizzes passed you, it honks its horn.
The pitch (frequency) of the horn's sound goes from a higher pitch to a
lower pitch as the car passes you. This situation is an example of how
relative movement between the source of a sound and a receiver affects the
pitch that is heard by the receiver.  When the source (the car) and the
receiver (you) are moving toward each other, the receiver hears a higher
pitch than the source.  When the two are moving away from each other, the
receiver hears a lower pitch than that of the source.  This phenomenon is
called the DOPPLER EFFECT.

This model demonstrates the Doppler effect with a plane flying over
a control tower, instead of a car and a pedestrian.  As the plane flies
over the control tower, it emits rings of yellow turtles, which can
represent the peaks of the sound waves dispersed by the plane's engines.
In this model, it may appear that the sound is being emitted in pulses or
bursts, but in reality, it is a continuous emission of waves, and the
rings only signify the peaks of the sound waves.
The WAVELENGTH, which is the distance between each wave peak,
determines what the frequency is.  If the wavelength is short (peaks are
close together) the frequency is high, and if it is long (peaks are far
apart) then the frequency is low.

How to use it?
--------------
Press the SETUP button to clear the screen and set up the plane and
control tower.  GO will run the program, moving the plane from left to
right.  The plane's speed is measured in miles per hour, and you can
adjust it with the SPEED slider from 0 to 1500 mph (approximately twice
the speed of sound, or Mach 2). The FREQUENCY slider controls the
wavelength of the sound, which in turn controls the frequency.  This
slider can be thought of as controlling how often the yellow rings are
emitted.  The higher the frequency, the more often the rings are emitted.
The computer will "beep" every time a wave peak passes over the
control tower. The more frequent the beeps, the higher the frequency of
the sound heard at the control tower, and vice versa. If you want to stop
the beeping, you can set the switch, BEEP? to 1.

NOTE: due to system limitations, as the plane approaches and surpasses the
speed of sound, the computer beeps might not reflect how high the relative
frequency really is at the tower.

THINGS TO NOTICE
----------------
When the plane is stationary (plane's speed is 0), notice how the
wave are equidistant on all sides of the plane. In other words, the
wavelength is the same on all sides, indicating that the frequency is also
the same.
As you increase the speed of the plane to 400 mph, the waves begin
to bunch closer together in front of the plane, and spread farther apart
behind the plane. What does this show about the pitch of the sound in
front and behind the plane as you increase the speed?  What would the
people in the control tower hear as the plane passes them?
When the plane is travelling at the speed of sound (Mach 1,
approximately 757mph), notice how all the sound waves overlap at one
point. At this point of intersection, the constructive interference of the
wave peaks creates a loud bang called a SONIC BOOM.

THINGS TO TRY
-------------

Adjust the SPEED and FREQUENCY sliders to observe how the relative
pitch heard at the control tower fluctuates accordingly.
As the plane exceeds the speed of sound, a SHOCK WAVE is produced
from the constructive interference of a large number of wave peaks, and
SONIC BOOMS occur along the surface of the SHOCK WAVE. If you increase the
plane's speed past Mach 1 (the speed of sound) and set the frequency to
15, you can see that the shock wave resembles a geometric shape. What
shape does it resemble?
Anything the shock wave passes over would experience a
"sonic boom", a loud bang created by the rapid increase and decrease of
air pressure from the shockwave.
The control tower doesn't hear anything emitted from the plane
until a yellow ring passes over it.  Up until then, there is silence.
Try setting the plane to the maximum speed, thereby creating a shockwave,
and pause the model exactly when the plane is directly above the tower.
Does the control tower hear anything at this point?  Now, unpause the
model. What would the tower experience as soon as the shock wave hits it?

EXTENDING THE MODEL
--------------------
This model does not measure the relative frequency heard at the
control tower.  This information would be useful to show how much the
pitch fluctuates as the plane passes the tower.  Can you figure out a way
to plot the relative frequency?

In this model, only the sound source is in motion.  What if you
created a second plane to be the receiver?  When the the two planes travel
toward or away from each other, would the frequency heard by the receiver
fluctuate more or less?

STARLOGO FEATURES
------------------

The computer "beeps" when any turtles pass over the control tower.
This is achieved with the line:

if(turtles-at tower-x tower-y >= 1)[beep]

"beep" is an observer command which can be useful as a signal to
the user.

Notice the 'constants' list, located near the top of the
procedures window, which defines the constants 'amplitude', 'tower-x' and
'tower-y'. StarLogoT constants make it easy to set aside special keywords,
similar to 'screen-size-x'. These labels can represent values that you
don't want procedurally redefined, but would like to quickly change
in-between runs of the model. Constants are usable by anything: turtle,
patch, or observer, and use less memory than normal global variables. They
are also slightly quicker to access than 'globals' reporters.

```