Skip to content

Commit

Permalink
Add coputation of the third cotangent angele in add_laplacian_entry_i…
Browse files Browse the repository at this point in the history
…n_place function
  • Loading branch information
yamahigashi committed Jun 2, 2024
1 parent fe7ce54 commit 1e88219
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/robust_skin_weights_transfer_inpaint/logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ def add_laplacian_entry_in_place(L, tri_positions, tri_indices):
# calculate cotangent
cotan1 = compute_cotangent(v2, v1, v3)
cotan2 = compute_cotangent(v1, v2, v3)
cotan3 = compute_cotangent(v1, v3, v2)

# update laplacian matrix
L[i1, i2] += cotan1 # type: ignore
Expand All @@ -451,6 +452,11 @@ def add_laplacian_entry_in_place(L, tri_positions, tri_indices):
L[i2, i2] -= cotan2 # type: ignore
L[i3, i3] -= cotan2 # type: ignore

L[i1, i3] += cotan3 # type: ignore
L[i3, i1] += cotan3 # type: ignore
L[i1, i1] -= cotan3 # type: ignore
L[i3, i3] -= cotan3 # type: ignore


def add_area_in_place(areas, tri_positions, tri_indices):
# type: (np.ndarray, np.ndarray, np.ndarray) -> None
Expand Down

0 comments on commit 1e88219

Please sign in to comment.