This is an interactive HTML5/JavaScript simulation for a ramp and projectile lab experiment.
It visually models the motion of a ball rolling down a ramp, crossing a table (with adjustable friction), and launching as a projectile.
The simulation can be used for physics labs to explore concepts such as kinematics, dynamics, and projectile motion.
Try it live 🔗 https://atreyuartax.github.io/Ramp-Projectile-Simulator/
- Adjustable Parameters:
- Table height
- Ramp angle and start height
- Table surface friction coefficient (μ)
- Launch ramp angle
- Simulation Modes:
- Realistic mode (with random measurement error)
- Math mode (idealized, no error)
- Visual Features:
- Live trajectory and range display
- Camera panning to follow the projectile
- Shadow rendering for depth perception
- Trail effect to highlight the projectile’s path
- Responsive Controls:
- Range sliders and numeric input for precision
- Reset and start buttons
- Optional error simulation toggle
- Clone or download this repository.
- Open the
table_ramp.htmlfile in a web browser (Chrome, Firefox, or Edge recommended). - Adjust simulation parameters using the sliders or input fields.
- Click Start Simulation to run the model.
- Click Reset to reset the simulation to initial values.
No installation or additional libraries are required since the simulation runs entirely in the browser.
table_ramp.html: Complete self-contained HTML file with embedded CSS and JavaScript for simulation.
- HTML5 Canvas for real-time rendering
- Vanilla JavaScript for simulation logic
- Minimal CSS for styling
- Font Awesome for icons
- Educational use in physics labs (kinematics, dynamics, projectile motion)
- Quick visualization for classroom demonstrations
- Independent exploration of physics concepts
This project is licensed under the MIT License – see the LICENSE file for details.