Giter VIP home page Giter VIP logo

Comments (4)

MattiaMontanari avatar MattiaMontanari commented on May 19, 2024

Yes, that's likely a bug, but:

  1. I believe B[0] isn't right, although barely used because it represents the case when the latest vertex a is discarded - and that's never the case for GJK, but may be useful to develop for EPA.
  2. I doubt you actually need to ADAPTIVEFP.

I'm not sure if I understand your question, what do you mean by "clamp that to [0,1] as the lambda"? Anyway, unless you can guarantee that all your simplices are not "degenerate", then you need the reduction stuff. The SV method is recursive, but specifically for a 1-simplex (line segment) the call to S1D leads to either of these cases: (i) The origin is between A and B or (ii) The origin is beyond A. Again, the origin cannot be found beyond B in GJK, but may be useful to develop for EPA.

from opengjk.

adrianstephens avatar adrianstephens commented on May 19, 2024

Thanks for the reply - I don't need the ADAPTIVEFP, but I was looking at that branch because it was easier to understand than the for -loop in the non-adaptive case!

As for the S1D stuff, consider the test of point b.
if x is dotProduct(b, t) / dotProduct(t, t)
then det_pb = (x * (ai - bi) + bi) - bi = x * (ai - bi)
so the sign test with ti (= bi-ai) is comparing the signs of x * (ai - bi) and -(ai - bi)

In other words, ai and bi make no difference, degenerate or not, to the sign check and you can just test for x < 0. And in the case of the origin being between A and B, x actually is the first lambda value.

Not sure if I've explained this properly or if I'm missing something?

Adrian

from opengjk.

MattiaMontanari avatar MattiaMontanari commented on May 19, 2024

You are right, there are a few unnecessary operations there: -bi, -1*. I believe the method would be equivalent but better coded - and better coding help presenting the method as well.

We have been working on a new, totally undocumented, method and for S1D things may work out like you said: first a dot product identifies the support of the point of minimum norm, then a second step computes the shortest vector.

from opengjk.

MattiaMontanari avatar MattiaMontanari commented on May 19, 2024

I won't do any work to fix the potential bug reported here, but I'll close this once I merge the dev branch into master as the new algorithm doesn't show this.

from opengjk.

Related Issues (20)

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.