Skip to content

Closed-form expressions for the Distance Gradients / Hessians #87

Closed Answered by zfergus
INeedAUniqueUsername asked this question in General
Discussion options

You must be logged in to vote

All of the distance derivatives in the toolkit (except for point-point) are derived using symbolic differentiation, so unfortunately, I do not have the matrix calculus versions of these expressions on hand. I can point you to Kim and Eberle's [2022] "Dynamic Deformables" course (see "Appendix I: Computing the Derivatives of a Triangle (and Edge) Normal"). Shi and Kim [2023] also have some useful derivations in their supplemental.

If your goal is to verify your derivation you can compare it with the existing implementation or use finite differences.

The derivatives were originally derived using the Symbolic Math Toolbox in MATLAB, but I prefer to use SymPy in Python. There is a utility file

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by zfergus
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #86 on December 18, 2023 05:10.