Animator: Script Example 10
Doppler
Reinitialize
The Doppler object is a subclass of the Circle object that can emit wave crests at a
predetermined rate.
document.animator.addObject("doppler","r=10,c=1,n=20,period=1")
The following parameters are define for the Doppler object:
- r the radius of the object
- c the speed of the wave crests
- m the mass of the object
- n the maximum number of wave crests displayed at any one time
- period the period of the source
Doppler objects, like all other geometric shapes, can be made dynamic using the
setForce method.
NOTES:
- The Doppler object is non-relativistic. It is possible for the speed of the
Doppler object to exceed the phase velocity.
- The time step, dt, should be less than the 1/10 of the period.
- Wave crests will take on the color of the Doppler object. Create a second
object and slave it to the Doppler object in order to create a different color.