This project demonstrates different physics simulations using HTML5 Canvas and JavaScript. It shows three different scenarios of ball movement:
- Gravity with Water: Shows balls bouncing with gravity in a half-filled water container
- Underwater No Gravity: Demonstrates ball movement in a fully submerged environment without gravity
- Underwater Brownian Motion: Simulates Brownian motion of particles in water
- Multiple physics simulations running simultaneously
- Water effects with waves and gradients
- Collision detection and response
- Buoyancy and water resistance
- Colorful particles with consistent behavior
- Clone this repository
- Open
index.html
in a web browser - Or serve it using a local server:
Then visit
python3 -m http.server 8000
http://localhost:8000
- HTML5 Canvas
- JavaScript
- CSS3
- Gravity and buoyancy
- Elastic collisions
- Water resistance
- Brownian motion
- Conservation of momentum