Ownfos / physics-engine-rm

A 2D impulse-based rigidbody simulator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2D Impulse Based Physics Engine

What does this do?

This is basically a 2D rigidbody simulator.
You can spawn circles and convex polygons and let them collide!
In addition, you can dynamically create custom polygon objects
or create a spring that connectes two arbitrary objects using right-click.

'impulse based'?

Collisions are handled by finding an appropriate
impulse vector which satisfies Newton's law of restitution.

Screenshots

dragging objects

drag

spawning custom polygons

spawn

connecting objects with springs

spring

How to build

Step 1) clone vcpkg

git clone https://github.com/microsoft/vcpkg
./vcpkg/bootstrap-vcpkg.bat

Step 2) cmake

cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE="vcpkg/scripts/buildsystems/vcpkg.cmake"
cmake --build build

You can also use CMake extension on VSCode to configure and build.

Dependencies

About

A 2D impulse-based rigidbody simulator

License:GNU General Public License v3.0


Languages

Language:C++ 99.2%Language:CMake 0.8%