diff --git a/README.md b/README.md index eec3c84..240ef36 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Yet another physics engine implementation. ## Showcase ### Snow -image +image ### Features: 1. Real-time snow physics. @@ -36,10 +36,22 @@ Yet another physics engine implementation. - Debug mode: [link](https://dra1ex.github.io/physics-js/examples/snow/?stats=1&debug=1) - Tree debug mode: [link](https://dra1ex.github.io/physics-js/examples/snow/?stats=1&debug=1&debug_tree=1&debug_velocity=0&debug_boundary=1&smoke_interval=500&snow_emit=200) +### Gravity +image + + +This is a gravity N-Body simulation, similar to my other project available on [GitHub](https://github.com/DrA1ex/JS_ParticleSystem). However, this simulation includes collision physics using a pretty accurate impulse-based physics solver. + +The simulation models the interactions between multiple bodies in a gravitational field. Each body has its own position, velocity, and mass. The simulation calculates the gravitational forces between the bodies based on their relative positions and masses, and uses this information to update their velocities and positions over time. +In addition to the gravitational forces, this simulation also models collisions between bodies. When two bodies collide, their velocities are adjusted based on the laws of conservation of momentum and energy. This ensures that the simulation is physically accurate and can generate realistic outcomes. + +The simulation can run in real-time as it utilizes WebGL for image rendering, resulting in an image that closely resembles a lava lamp. It can be used as a screensaver or wallpaper. However, if you desire a more complex simulation, you can modify the simulation settings (the button is located in the lower-right corner) and increase the particle count or make other parameter changes. + +Demo: [link](https://dra1ex.github.io/physics-js/examples/gravity/) + ## Examples - Particles (WebGL): [link](https://dra1ex.github.io/physics-js/examples/particles) -- Gravity (WebGL): [link](https://dra1ex.github.io/physics-js/examples/gravity) - Ramp: [link](https://dra1ex.github.io/physics-js/examples/ramp) - Friction: [link](https://dra1ex.github.io/physics-js/examples/friction) - Tower: [link](https://dra1ex.github.io/physics-js/examples/tower)