@@ -1003,18 +1003,19 @@ def display_image_mobject(
1003
1003
# and
1004
1004
# https://web.archive.org/web/20150222120106/xenia.media.mit.edu/~cwren/interpolator/
1005
1005
1006
- homographic_matrix = []
1006
+ homography_matrix = []
1007
1007
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 ])
1010
1010
1011
- A = np .array (homographic_matrix , dtype = ManimFloat )
1011
+ A = np .array (homography_matrix , dtype = ManimFloat )
1012
1012
b = original_coords .reshape (8 ).astype (ManimFloat )
1013
1013
1014
1014
try :
1015
1015
transform_coefficients = np .linalg .solve (A , b )
1016
1016
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.
1018
1019
return
1019
1020
1020
1021
sub_image = sub_image .transform (
0 commit comments