@@ -46,21 +46,22 @@ class Rotating(Animation):
46
46
47
47
Examples
48
48
--------
49
- .. manim:: UseRotating
49
+ .. manim:: RotatingDemo
50
50
51
- class UseRotating (Scene):
51
+ class RotatingDemo (Scene):
52
52
def construct(self):
53
53
circle = Circle(radius=1, color=BLUE)
54
54
line = Line(start=ORIGIN, end=RIGHT)
55
55
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)
58
58
anim_kw = {"about_point": arrow.get_start(), "run_time": 1}
59
- self.play(Rotating(arrow, PI, **anim_kw))
60
59
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))
64
65
65
66
.. manim:: RotatingDifferentAxis
66
67
0 commit comments