Open lirun-sat opened 2 years ago
First of all, thanks a lot for this piece of software. I was looking quite a while to find something like this.
@MattiaMontanari At v3.0.1, the return value of lambdas seems garbage.How to add the lambdas to the current branch?
In #12 ,the mentioned simplex.p ,simplex.q and simplex.lambdas also removed in latest branch.
@ywyw2015 yes, I removed lambdas. My first implementation returned witness points, but it updated the barycentric coordinates (lambdas) at each GJK iteration. They brought some overheads and made the code more complex. So I removed them and focused on the most basic distance query.
Given the demand, I do intend to add the computation of witness points, but I still need to found the time...
If you want to give it a go here's my idea: preserve performance by computing the witness points only after gjk has converged. I have not figured out the details, but if you use the separating vector (returned by the sub-algorithm) and the support function for each body (mind the sign!) you should have all you need. Firstly you need to find who many witness points there are on each body, then you need to compute the barycentric coordinates.
Thank you for your reply, I will go to learn more about it according to your suggestion
this code just outputs the minimum distance between convex objects and does not provide the closest points (witness points) on objects.
How to add this feature to the current code?