https://github.com/notgiven688/unified_epa
Robust and simple implementation of the Expanding Polytope Algorithm (EPA)
https://github.com/notgiven688/unified_epa
collision-detection epa gjk gjk-algorithm physics physics-engine
Last synced: 4 months ago
JSON representation
Robust and simple implementation of the Expanding Polytope Algorithm (EPA)
- Host: GitHub
- URL: https://github.com/notgiven688/unified_epa
- Owner: notgiven688
- License: mit
- Created: 2021-06-20T14:38:02.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-12-19T23:31:02.000Z (over 1 year ago)
- Last Synced: 2024-12-20T00:26:41.181Z (over 1 year ago)
- Topics: collision-detection, epa, gjk, gjk-algorithm, physics, physics-engine
- Language: C#
- Homepage:
- Size: 407 KB
- Stars: 19
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Unified EPA (UEPA) Demo
[](https://github.com/notgiven688/unified_epa/actions/workflows/uepa_tests.yml)
Robust and simple implementation of the **Expanding Polytope Algorithm** (EPA).
The demo is written in C#, with [OpenTK](https://github.com/opentk/opentk) as only dependency.
## Some Details
The implementation itself is contained in [UEPA.cs](src/UEPA.cs) with ~400 lines of code. The algorithm detects whether two convex objects are separated or colliding and returns the points of closest distance and deepest penetration, respectively.
The expanding polytope algorithm is used also for the separating case - simplifying
the algorithm for collision detection for the general case.
## Run the demo
The demo should be able to run cross-platform utilizing OpenGL.
1. Install the [.NET 9.0 SDK](https://dotnet.microsoft.com/download/dotnet/9.0)
2. git clone https://github.com/notgiven688/unified_epa.git
3. cd unified_epa && dotnet run -c Release
## Screenshots
[YouTube Video](https://www.youtube.com/watch?v=NMdp7A13EAI)
