Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CG: optimize projection of point on a triangle #221

Merged
merged 3 commits into from
Nov 12, 2021

Conversation

andrea-iob
Copy link
Member

Barycentric coordinates can be evaluated solving a 2x2 linear system. The system is solved using Cramer's rule.

The function _projectPointsTriangle is now 4 times faster than before and this makes SurfaceSkdTree::findPointClosesCell 1.6 times faster.

After this change, module CG doesn't depend on LAPACKe library anymore.

Instead of using LAPACK to solve the linear system system for
obtaining the barycentric coordinates, the system is solved using
Cramer's rule.
@andrea-iob andrea-iob force-pushed the CG.optimize.point.triangle.projection branch from bab3934 to b49eac7 Compare November 10, 2021 22:26
@marcocisternino marcocisternino merged commit 91824b3 into master Nov 12, 2021
@andrea-iob andrea-iob deleted the CG.optimize.point.triangle.projection branch November 12, 2021 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants