A community-maintained Python framework for creating mathematical animations.
Fixed small bug with Camera not properly transforming points
Grant Sanderson1f320a397485
diff --git a/manimlib/camera/camera.py b/manimlib/camera/camera.pyindex ef2b60a38..c0843782c 100644--- a/manimlib/camera/camera.py+++ b/manimlib/camera/camera.py@@ -345,10 +345,9 @@ class Camera(object):# return selfdef set_cairo_context_path(self, ctx, vmobject):- # self.old_set_cairo_context_path(ctx, vmobject)- # return-- points = vmobject.get_points()+ points = self.transform_points_pre_display(+ vmobject, vmobject.points+ )if len(points) == 0:returnelif np.any(np.isnan(points)) or np.any(points == np.inf):@@ -365,7 +364,7 @@ class Camera(object):)last_p3 = None- quads = vmobject.get_cubic_bezier_tuples()+ quads = vmobject.get_cubic_bezier_tuples_from_points(points)ctx.new_path()for p0, p1, p2, p3 in quads:if should_start_new_path(last_p3, p0):diff --git a/manimlib/camera/three_d_camera.py b/manimlib/camera/three_d_camera.pyindex 32e30d230..3f8b92290 100644--- a/manimlib/camera/three_d_camera.py+++ b/manimlib/camera/three_d_camera.py@@ -10,7 +10,6 @@ from manimlib.mobject.types.point_cloud_mobject import Pointfrom manimlib.mobject.value_tracker import ValueTrackerfrom manimlib.utils.color import get_shaded_rgbfrom manimlib.utils.simple_functions import clip_in_place-from manimlib.utils.space_ops import center_of_massfrom manimlib.utils.space_ops import rotation_about_zfrom manimlib.utils.space_ops import rotation_matrix@@ -190,7 +189,6 @@ class ThreeDCamera(Camera):if fixed_in_frame:return pointsif fixed_orientation:- # center = center_of_mass(points)center_func = self.fixed_orientation_mobjects[mobject]center = center_func()new_center = self.project_point(center)