
Doppler Effect Simulation
A 3D web-based simulation demonstrating the Doppler effect using Three.js.
Overview
This project models a large emitter moving through space and emitting spherical wavefronts at a configurable frequency. As the emitter travels, observers perceive a shift in wavelength and frequency, illustrating the Doppler effect in action.
Demo
Either navigate to https://binarynectar.github.io/doppler-simulation/ or open
index.html in your browser (preferably via a local HTTP server) to launch the simulation. Use your mouse (click + drag, scroll) to orbit, pan, and zoom with the built‑in OrbitControls.Features
Real‑time WebGL rendering powered by Three.js
Configurable simulation parameters (velocity, frequency, wavefront count)
Interactive camera controls for exploring the scene
Responsive canvas that adjusts to window resizing
Prerequisites
A modern web browser with ES module support
Internet access (to fetch Three.js and its addons via UNPKG), or serve modules locally
(Optional) Python 3.x or any simple HTTP server for local hosting
Installation & Setup
Clone the repository
Strat a local server (recommended to avoid CORS issues)
Open the simulation in your browser
File Structure
Configuration
Inside
index.html, you can tweak constants near the top of the <script type="module"> block:Adjust these values to see how they affect the visualization.
Dependencies
Contributing
Fork the repository
Create a feature branch (
git checkout -b feature/YourFeature)Commit your changes (
git commit -m "Add YourFeature")Push to your branch (
git push origin feature/YourFeature)Open a Pull Request
License
This project is released under the MIT License. Feel free to use, modify, and distribute it.
0 likes · 26 views · Jul 17, 2025
Developed a 3D Doppler effect simulation using Three.js.