Skip to content

Commit

Permalink
even nicer math
Browse files Browse the repository at this point in the history
  • Loading branch information
m-reuter authored Jan 17, 2025
1 parent f22bfad commit d7b8d43
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lapy/diffgeo.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,12 +665,12 @@ def get_flipped_area(triax):
def tet_compute_gradient(tet, vfunc):
r"""Compute gradient of a vertex function f (for each tetra).
For a tetrahedron (vi,vj,vk,vh) with volume V we have:
For a tetrahedron :math:`(v_i, v_j, v_k, v_h)` with volume V we have:
.. math::
grad(f) &= [ (f_j - f_i) (vi-vk) \times (vh-vk) \\
& + (f_k - f_i) (vi-vh) \times (vj-vh) \\
& + (f_h - f_i) (vk-vi) \times (vj-vi) ] / (6 V).
grad(f) = \left[ & (f_j - f_i) (v_i-v_k) \times (v_h-v_k) \\
& + (f_k - f_i) (v_i-v_h) \times (v_j-v_h) \\
& + (f_h - f_i) (v_k-v_i) \times (v_j-v_i) \right] / (6 V).
Parameters
----------
Expand Down

0 comments on commit d7b8d43

Please sign in to comment.