Skip to content

Commit 51151cd

Browse files
committed
add more self.play in Rotating example
1 parent db97433 commit 51151cd

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

manim/animation/rotation.py

+9-8
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,22 @@ class Rotating(Animation):
4646
4747
Examples
4848
--------
49-
.. manim:: UseRotating
49+
.. manim:: RotatingDemo
5050
51-
class UseRotating(Scene):
51+
class RotatingDemo(Scene):
5252
def construct(self):
5353
circle = Circle(radius=1, color=BLUE)
5454
line = Line(start=ORIGIN, end=RIGHT)
5555
arrow = Arrow(start=ORIGIN, end=RIGHT, buff=0, color=GOLD)
56-
self.add(circle, line, arrow)
57-
56+
vg = VGroup(circle,line,arrow)
57+
self.add(vg)
5858
anim_kw = {"about_point": arrow.get_start(), "run_time": 1}
59-
self.play(Rotating(arrow, PI, **anim_kw))
6059
self.play(Rotating(arrow, 180*DEGREES, **anim_kw))
61-
self.play(Rotating(VGroup(circle,line,arrow), PI, about_point=RIGHT))
62-
self.play(Rotating(VGroup(circle,line,arrow), PI, axis=UP, about_point=ORIGIN))
63-
self.wait()
60+
self.play(Rotating(arrow, PI, **anim_kw))
61+
self.play(Rotating(vg, PI, about_point=RIGHT))
62+
self.play(Rotating(vg, PI, axis=UP, about_point=ORIGIN))
63+
self.play(Rotating(vg, PI, axis=RIGHT, about_edge=UP))
64+
self.play(vg.animate.move_to(ORIGIN))
6465
6566
.. manim:: RotatingDifferentAxis
6667

0 commit comments

Comments
 (0)