Skip to content

James-Rhodes/doppl-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

doppl-rs

This project is a simulation of the Doppler effect using Bevy and Rust to animate. The Doppler effect is responsible for frequency change in sound you can hear when a car drives past. As the car drives towards you, you hear a higher pitch, as it passes it then changes to a lower pitch.

The goal of this simulation is to show how moving towards or away from a transmitter (sound or radio waves) causes a change in phase/frequency. This concept is often demonstrated by showing an image of a car travelling through waves, and these waves seem to squash at the front of the car and stretch out at the back. This always confused me as it seemed like the car was having an impact directly on the waves, where as in reality it is more about relative frequencies, ie. The receiver receives a different frequency than the transmitter sent because of the speed the receiver was moving. Not the receiver "bent" or "distorted" the wave necessarily. If any of that explanation is wrong please do tell me.

Ps. This was my first time using Bevy so there are probably lots of small things wrong with this code, but it does indeed work.

Note: By hitting spacebar with the gifcreate feature enabled, 500 png's will be saved in ./screenshots The png's can be rendered to a gif using:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages