Gilbert Johnson Keerthi Stelly Muratori... or not

The title of this post is an absurd amalgamation of names, but with good reason. Gilbert, Johnson and Keerthi described the GJK algorithm. Later, Jay Stelly of Valve and Casey Muratori realized that a lot of the papers describing the algorithm were describing methods that did a lot of unnecessary tests and computations. So, Muratori wrote a formulation and described it in a video, which turned out to be a lot simpler than what most papers described.

Muratori has written a blog post about it here, where the video is also included: https://caseymuratori.com/blog_0003

Despite being inspired by this and by the lecture on collision detection today, I realize that this algorithm probably is not very fitting for my simulation. I will instead implement a simple ray-triangle intersection test. The metaballs (i.e. the center point of each ball) move, and define rays in the direction they move, originating in their position. If their new position is on the opposite end of a triangle in the terrain mesh, there will have been a penetration, and the intersection test will give the intersection point, while the ray gives the direction. Then, the metaball's new direction will be determined by perfect reflection (with some absorption of energy taken into account), and the ball moved along the direction the appropriate distance. For large terrain meshes, checking for intersection with each triangle will be too slow, and I will implement an Axis Aligned Bounding Box tree (AABB tree) for speedup.

Kommentarer

Populära inlägg i den här bloggen

Marching cubes algorithm

Project specification