@@ -10,9 +10,9 @@ Some more examples will come soon here!
1010Updaters
1111##########
1212
13- .. manim :: Updater1Example
13+ .. manim :: RotationUpdater
1414
15- class Updater1Example (Scene):
15+ class RotationUpdater (Scene):
1616 def construct(self):
1717 def my_rotation_updater(mobj,dt):
1818 mobj.rotate_about_origin(dt)
@@ -22,9 +22,9 @@ Updaters
2222 self.add(line_reference, line_moving)
2323 self.wait(PI)
2424
25- .. manim :: Updater2Example
25+ .. manim :: RotationUpdater2
2626
27- class Updater2Example (Scene):
27+ class RotationUpdater2 (Scene):
2828 def construct(self):
2929 def updater_forth(mobj, dt):
3030 mobj.rotate_about_origin(dt)
@@ -41,9 +41,9 @@ Updaters
4141 line_moving.remove_updater(updater_back)
4242 self.wait(0.5)
4343
44- .. manim :: Example3
44+ .. manim :: NumberLinePointer
4545
46- class Example3 (Scene):
46+ class NumberLinePointer (Scene):
4747 def construct(self):
4848 number_line = NumberLine() ##with all your parameters and stuff
4949 pointer = Vector(DOWN)
@@ -57,10 +57,11 @@ Updaters
5757 self.play(pointer_value.set_value, 5)
5858 self.wait()
5959 self.play(pointer_value.set_value, 3)
60+ self.wait()
6061
61- .. manim :: Example4
62+ .. manim :: PointWithTrace
6263
63- class Example4 (Scene):
64+ class PointWithTrace (Scene):
6465 def construct(self):
6566 path = VMobject()
6667 dot = Dot()
@@ -77,9 +78,9 @@ Updaters
7778 self.play(dot.shift, LEFT)
7879 self.wait()
7980
80- .. manim :: Example1ValTracker
81+ .. manim :: PointMovingWithValTracker
8182
82- class Example1ValTracker (Scene):
83+ class PointMovingWithValTracker (Scene):
8384 def construct(self):
8485 dot_disp = Dot().set_color(RED)
8586 self.add(dot_disp)
@@ -92,9 +93,9 @@ Updaters
9293 self.play(val_tracker.set_value, tick_end, rate_func=linear)
9394 self.wait()
9495
95- .. manim :: Example2ValTracker
96+ .. manim :: RotationValTracker
9697
97- class Example2ValTracker (Scene):
98+ class RotationValTracker (Scene):
9899 def construct(self):
99100 tick_start = 0
100101 tick_end = 2 * PI
@@ -105,4 +106,38 @@ Updaters
105106 line_moving = Line(ORIGIN, LEFT).set_color(ORANGE)
106107 line_moving.add_updater(my_rotation_updater)
107108 self.add(line_reference, line_moving)
108- self.play(val_tracker.set_value, tick_end, run_time=PI)
109+ self.play(val_tracker.set_value, tick_end, run_time=PI)
110+
111+ .. manim :: PlaneFadeOut
112+
113+ class PlaneFadeOut(Scene):
114+ def construct(self):
115+ sq2 = Square()
116+
117+ sq1 = Square()
118+ sq1.next_to(sq2, LEFT)
119+
120+ sq3 = Square()
121+ sq3.next_to(sq2, RIGHT)
122+
123+ circ = Circle()
124+ circ.next_to(sq2, DOWN)
125+
126+ self.add(sq1, sq2, sq3, circ)
127+ self.wait()
128+
129+ self.play(FadeOut(sq1), FadeOut(sq2), FadeOut(sq3))
130+ self.wait()
131+
132+ .. manim :: FadeInAndOut
133+
134+ class FadeInAndOut(Scene):
135+ def construct(self):
136+ square = Square(color=BLUE).shift(2 * UP)
137+ annotation = Text("Fade In", height=0.8)
138+ self.add(annotation)
139+ self.play(FadeIn(square))
140+
141+ annotation.become(Text("Fade Out", height=0.8))
142+ self.add(annotation)
143+ self.play(FadeOut(square))
0 commit comments