mirror of
https://github.com/3b1b/manim.git
synced 2025-07-30 05:24:22 +08:00
Removed VMobject.change_anchor_mode
This commit is contained in:
@ -501,7 +501,7 @@ class SneakyNonlinearTransformationExplained(SneakyNonlinearTransformation):
|
|||||||
FRAME_Y_RADIUS*RIGHT + FRAME_Y_RADIUS*UP
|
FRAME_Y_RADIUS*RIGHT + FRAME_Y_RADIUS*UP
|
||||||
)
|
)
|
||||||
diag.insert_n_curves(20)
|
diag.insert_n_curves(20)
|
||||||
diag.change_anchor_mode("smooth")
|
diag.make_smooth()
|
||||||
diag.set_color(YELLOW)
|
diag.set_color(YELLOW)
|
||||||
self.play(ShowCreation(diag))
|
self.play(ShowCreation(diag))
|
||||||
self.add_transformable_mobject(diag)
|
self.add_transformable_mobject(diag)
|
||||||
|
@ -159,7 +159,7 @@ class StockLine(VMobject):
|
|||||||
for x in range(self.num_points):
|
for x in range(self.num_points):
|
||||||
step_size = self.step_range*(random.random() - 0.5)
|
step_size = self.step_range*(random.random() - 0.5)
|
||||||
points.append(points[-1] + 0.5*RIGHT + step_size*UP)
|
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):
|
class StockPrices(Scene):
|
||||||
def construct(self):
|
def construct(self):
|
||||||
|
@ -1564,9 +1564,7 @@ class FiveRegionsFourEdgesEachGraph(Scene):
|
|||||||
points *= 0.75
|
points *= 0.75
|
||||||
|
|
||||||
regions = VGroup(*[
|
regions = VGroup(*[
|
||||||
Square().set_anchor_points(
|
Square().set_points_as_corners(points[indices])
|
||||||
points[indices], mode = "corners"
|
|
||||||
)
|
|
||||||
for indices in [
|
for indices in [
|
||||||
[0, 1, 2, 3],
|
[0, 1, 2, 3],
|
||||||
[0, 4, 2, 1],
|
[0, 4, 2, 1],
|
||||||
@ -1894,9 +1892,7 @@ class EulersFormulaForGeneralPlanarGraph(LightUpNodes, ThreeDScene):
|
|||||||
|
|
||||||
def get_cube_faces(self, eight_points):
|
def get_cube_faces(self, eight_points):
|
||||||
return VGroup(*[
|
return VGroup(*[
|
||||||
Square().set_anchor_points(
|
Square().set_points_as_corners(eight_points[indices])
|
||||||
eight_points[indices], mode = "corners"
|
|
||||||
)
|
|
||||||
for indices in [
|
for indices in [
|
||||||
[0, 1, 2, 3],
|
[0, 1, 2, 3],
|
||||||
[0, 4, 5, 1],
|
[0, 4, 5, 1],
|
||||||
|
@ -43,10 +43,7 @@ class TrigAnimation(Animation):
|
|||||||
)*RIGHT + self.center,
|
)*RIGHT + self.center,
|
||||||
]
|
]
|
||||||
for line, point in zip(self.trig_lines, points):
|
for line, point in zip(self.trig_lines, points):
|
||||||
line.set_anchor_points(
|
line.set_points_as_corners([circle_point, point])
|
||||||
[circle_point, point],
|
|
||||||
mode = "corners"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -96,8 +93,8 @@ class Notation(Scene):
|
|||||||
prod2.submobjects[0] = times
|
prod2.submobjects[0] = times
|
||||||
|
|
||||||
new_sin, new_cos, new_tan = [
|
new_sin, new_cos, new_tan = [
|
||||||
VMobject().set_anchor_points(
|
VMobject().set_points_as_corners(
|
||||||
corners, mode = "corners"
|
corners
|
||||||
).replace(trig_part.split()[0])
|
).replace(trig_part.split()[0])
|
||||||
for corners, trig_part in zip(
|
for corners, trig_part in zip(
|
||||||
[
|
[
|
||||||
|
Reference in New Issue
Block a user