Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Removed VMobject.change_anchor_mode

Grant Sanderson2730c1036bb4
diff --git a/old_projects/eola/chapter3.py b/old_projects/eola/chapter3.py
index 6bf428486..671c46201 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 36b8e9316..245d289a0 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 94d523cc0..36d205552 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 61156e5b2..416ff56d1 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(
[