Giter Club home page Giter Club logo

Comments (1)

kevinmoran avatar kevinmoran commented on August 10, 2024

Yes, it is there as a precaution; unfortunately, the GJK algorithm can run into numerical issues in 3D; for example, a few lines prior we have to check if the search direction is the zero vector and pick another one, which feels quite brittle:

GJK/GJK.h

Line 52 in b38d923

if(search_dir==vec3(0,0,0)){ //origin is on this line segment

So the iteration limit will catch if the algorithm gets into a spiral of death and cannot exit. These sorts of issues have put me off GJK and I have done some exploration of the Separating Axis Test as an alternative, which seems a lot less prone to numerical problems. Dirk Gregorius's GDC talk is the best explanation if you want to check it out. I really should make an SAT sample project and link it from here since this code is not battle-tested and it's probably quite error-prone. Thanks!

from gjk.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.