Removed VMobject.change_anchor_mode

This commit is contained in:
Grant Sanderson
2019-02-05 15:24:30 -08:00
parent 1f46904f9b
commit 2730c1036b
4 changed files with 7 additions and 14 deletions

View File

@ -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)

View File

@ -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):

View File

@ -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],

View File

@ -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(
[