Skip to content

Commit 06a4fb8

Browse files
committed
homographic_matrix -> homography_matrix
1 parent d19e4f2 commit 06a4fb8

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

manim/camera/camera.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,18 +1003,19 @@ def display_image_mobject(
10031003
# and
10041004
# https://web.archive.org/web/20150222120106/xenia.media.mit.edu/~cwren/interpolator/
10051005

1006-
homographic_matrix = []
1006+
homography_matrix = []
10071007
for (x, y), (X, Y) in zip(target_coords, original_coords):
1008-
homographic_matrix.append([x, y, 1, 0, 0, 0, -X * x, -X * y])
1009-
homographic_matrix.append([0, 0, 0, x, y, 1, -Y * x, -Y * y])
1008+
homography_matrix.append([x, y, 1, 0, 0, 0, -X * x, -X * y])
1009+
homography_matrix.append([0, 0, 0, x, y, 1, -Y * x, -Y * y])
10101010

1011-
A = np.array(homographic_matrix, dtype=ManimFloat)
1011+
A = np.array(homography_matrix, dtype=ManimFloat)
10121012
b = original_coords.reshape(8).astype(ManimFloat)
10131013

10141014
try:
10151015
transform_coefficients = np.linalg.solve(A, b)
10161016
except np.linalg.LinAlgError:
1017-
# The matrix A might be singular
1017+
# The matrix A might be singular.
1018+
# In this case, do nothing and return.
10181019
return
10191020

10201021
sub_image = sub_image.transform(

0 commit comments

Comments
 (0)