Skip to content

dbzguy56/sequentialImpulseCPP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sequential Impulse

About the project

This project is a work in progress aimed at simulating collision detection and response through sequential impulse in 3D. C++, OpenGL are used in this project.

Currently the code detects collision using the gjk algorithm. Another great interactive demo of the gjk (and minkowski difference) is located at this page.

Originally I started this project in Jai, check it out at this link.

Video on Youtube

Watch the video

Images

gjk_1 gjk_2 gjk_3

From the images above you can see that when the red tetrahedron collides with the blue cube, the green simplex appears. The gjk algorithmn relies on a support function that generates the points that would lie on the minkowski difference of the two colliding objects. These points make up the green simplex, and if this simplex contains the origin, then that means the two objects are colliding! (The black cube being the origin in this case)

Running the application

You can run the demo by running the following command at the base of the project:

.\run.bat

Controls

Input Action
Mouse Aim Camera
W/A/S/D Camera Movement
Left/Right/Up/Down Arrow Keys Move the tetrahedron around
Backspace Exit program

(Backspace because of my keyboard :D)

Building

Requirements

  1. Visual Studio along with the Desktop development with C++ module
  2. You may need to edit the vcvarsall path in vcvars.bat file.
    • It might already set to the correct path but if not, you will need to find where your vcvars64.bat is located.
    • If it's not under the current set directory, it maybe under C:\Program Files\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat

After that is setup, you build with simply by running the command.

.\build.bat

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages