Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
DrA1ex authored Sep 30, 2023
1 parent 4f940e6 commit c48f05b
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Yet another physics engine implementation.

## Showcase
### Snow
<img width="1498" alt="image" src="https://user-images.githubusercontent.com/1194059/206975949-c1e56c28-7e7f-47d7-b970-ab6d9d81af5d.png">
<img width="1400" alt="image" src="https://user-images.githubusercontent.com/1194059/206975949-c1e56c28-7e7f-47d7-b970-ab6d9d81af5d.png">

### Features:
1. Real-time snow physics.
Expand Down Expand Up @@ -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
<img width="1400" alt="image" src="https://github.com/DrA1ex/physics-js/assets/1194059/39f0701b-d09f-4e5b-a40d-32b508ba01e1">


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)
Expand Down

0 comments on commit c48f05b

Please sign in to comment.