From 2730c1036bb4deee1257dc0df302a71742517589 Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Tue, 5 Feb 2019 15:24:30 -0800 Subject: [PATCH] Removed VMobject.change_anchor_mode --- old_projects/eola/chapter3.py | 2 +- old_projects/eola/chapter6.py | 2 +- old_projects/mug.py | 8 ++------ old_projects/triangle_of_power/intro.py | 9 +++------ 4 files changed, 7 insertions(+), 14 deletions(-) diff --git a/old_projects/eola/chapter3.py b/old_projects/eola/chapter3.py index 6bf42848..671c4620 100644 --- a/old_projects/eola/chapter3.py +++ b/old_projects/eola/chapter3.py @@ -501,7 +501,7 @@ class SneakyNonlinearTransformationExplained(SneakyNonlinearTransformation): FRAME_Y_RADIUS*RIGHT + FRAME_Y_RADIUS*UP ) diag.insert_n_curves(20) - diag.change_anchor_mode("smooth") + diag.make_smooth() diag.set_color(YELLOW) self.play(ShowCreation(diag)) self.add_transformable_mobject(diag) diff --git a/old_projects/eola/chapter6.py b/old_projects/eola/chapter6.py index 36b8e931..245d289a 100644 --- a/old_projects/eola/chapter6.py +++ b/old_projects/eola/chapter6.py @@ -159,7 +159,7 @@ class StockLine(VMobject): for x in range(self.num_points): step_size = self.step_range*(random.random() - 0.5) points.append(points[-1] + 0.5*RIGHT + step_size*UP) - self.set_anchor_points(points, mode = "corners") + self.set_points_as_corners(points) class StockPrices(Scene): def construct(self): diff --git a/old_projects/mug.py b/old_projects/mug.py index 94d523cc..36d20555 100644 --- a/old_projects/mug.py +++ b/old_projects/mug.py @@ -1564,9 +1564,7 @@ class FiveRegionsFourEdgesEachGraph(Scene): points *= 0.75 regions = VGroup(*[ - Square().set_anchor_points( - points[indices], mode = "corners" - ) + Square().set_points_as_corners(points[indices]) for indices in [ [0, 1, 2, 3], [0, 4, 2, 1], @@ -1894,9 +1892,7 @@ class EulersFormulaForGeneralPlanarGraph(LightUpNodes, ThreeDScene): def get_cube_faces(self, eight_points): return VGroup(*[ - Square().set_anchor_points( - eight_points[indices], mode = "corners" - ) + Square().set_points_as_corners(eight_points[indices]) for indices in [ [0, 1, 2, 3], [0, 4, 5, 1], diff --git a/old_projects/triangle_of_power/intro.py b/old_projects/triangle_of_power/intro.py index 61156e5b..416ff56d 100644 --- a/old_projects/triangle_of_power/intro.py +++ b/old_projects/triangle_of_power/intro.py @@ -43,10 +43,7 @@ class TrigAnimation(Animation): )*RIGHT + self.center, ] for line, point in zip(self.trig_lines, points): - line.set_anchor_points( - [circle_point, point], - mode = "corners" - ) + line.set_points_as_corners([circle_point, point]) @@ -96,8 +93,8 @@ class Notation(Scene): prod2.submobjects[0] = times new_sin, new_cos, new_tan = [ - VMobject().set_anchor_points( - corners, mode = "corners" + VMobject().set_points_as_corners( + corners ).replace(trig_part.split()[0]) for corners, trig_part in zip( [