Sine Wave Animation

I created an animation visually demonstrating the Doppler effect via a sine wave.
Introduction
During a course on Engineering Education Design, we were tasked with explaining an introductory-level engineering concept to theoretical first-year engineers. We chose the Doppler Effect and wanted to create a live hands-on experiment, but also provide a dynamic visual that would help explain the physics behind how the effect functions and some of its innate properties.
Visuals
I wanted to show what happens to observed waves when the observer moves, and when the source moves. I had some prior experience with Adobe After Effects, so I created a 2D animation simplifying the cylindrical sound wave into a 2D sine wave, which I reasoned would also be affected by the Doppler effect.
Using some basic javascript, I created a sine wave generator that could be controlled in its production and featured an “observer” that sampled the animation at its position just like an observer would in real life. Using this, I created three animations that showed what the sine wave looked like when either the source or observer moved, which had the observer “blip” at a constant frequency, and then one when the observer moved, and one when the source moved. The “blip” speed change would show that the observed frequency changed with relative velocity between the objects. 
I also created some more tools to aid in the visualization, including an apparent blue and red shift to the sine wave when it was compressed or elongated, respectively; this would mimic how light is affected by Doppler, shifting its hue.
Property scripting used to generate the sine wave and resulting visuals.
Property scripting used to generate the sine wave and resulting visuals.
A display of the color changing as the wave is compressed and the observer exchibiting a "blip" for intersecting the wave.
A display of the color changing as the wave is compressed and the observer exchibiting a "blip" for intersecting the wave.
AE actively allocating too much memory.
AE actively allocating too much memory.
AE using up way too much RAM.
AE using up way too much RAM.
Difficulties
Due to what I am inclined to think is a memory leak in the software, the combination of a package that aids in the drawing of the sine wave on the screen and the observer sampling effect, the memory usage of the program began to spiral out of control exponentially simply when opening the project, even above allocated allowable levels. I attempted to reduce the sampling radius and frequency and ended up simplifying the animation to its bare components, but the issue persisted. 
After fighting with the software for a substantial amount of time, I ended up working in tiny chunks of opening the program and working a small bit before the RAM usage ramped up, then saving and closing, repeating the process over and over until the project was completed. Even with these difficulties, however, I think practically creating a working model of a concept both assisted in the lesson’s visualizations as well as allowed me to create a better mental model of the concept and why it occurs.

You may also like

Back to Top