Skip to content

Commit cbbad12

Browse files
committed
Uniformisation of the examples names, but ... facing an issue
1 parent 0000ec8 commit cbbad12

File tree

3 files changed

+68
-67
lines changed

3 files changed

+68
-67
lines changed

docs/source/examples/3d.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
3D Scenes
22
=================================
33

4-
.. manim:: Example3DNo1
4+
.. manim:: ThreeDSphereExample
55
:save_last_frame:
66

7-
class Example3DNo1(ThreeDScene):
7+
class ThreeDSphereExample(ThreeDScene):
88
def construct(self):
99
axes = ThreeDAxes()
1010
sphere = ParametricSurface(
@@ -18,10 +18,10 @@
1818
self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES)
1919
self.add(axes, sphere)
2020

21-
.. manim:: Example3DLightSourcePosition
21+
.. manim:: ThreeDLightSourcePositionExample
2222
:save_last_frame:
2323

24-
class Example3DLightSourcePosition(ThreeDScene):
24+
class ThreeDLightSourcePositionExample(ThreeDScene):
2525
def construct(self):
2626
axes = ThreeDAxes()
2727
sphere = ParametricSurface(
@@ -36,9 +36,9 @@
3636
self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES)
3737
self.add(axes, sphere)
3838

39-
.. manim:: Example3DNo3
39+
.. manim:: ThreeDCameraRotationExample
4040

41-
class Example3DNo3(ThreeDScene):
41+
class ThreeDCameraRotationExample(ThreeDScene):
4242
def construct(self):
4343
axes = ThreeDAxes()
4444
circle=Circle()
@@ -50,9 +50,9 @@
5050
self.move_camera(phi=75 * DEGREES, theta=30 * DEGREES)
5151
self.wait()
5252

53-
.. manim:: Example3DNo4
53+
.. manim:: ThreeDCameraIllusionRotationExample
5454

55-
class Example3DNo4(ThreeDScene):
55+
class ThreeDCameraIllusionRotationExample(ThreeDScene):
5656
def construct(self):
5757
axes = ThreeDAxes()
5858
circle=Circle()
@@ -62,10 +62,10 @@
6262
self.wait(PI)
6363
self.stop_3dillusion_camera_rotation()
6464

65-
.. manim:: Example3DNo5
65+
.. manim:: ThreeDParametricSpringExample
6666
:save_last_frame:
6767

68-
class Example3DNo5(ThreeDScene):
68+
class ThreeDParametricSpringExample(ThreeDScene):
6969
def construct(self):
7070
curve1 = ParametricFunction(
7171
lambda u: np.array([
@@ -79,9 +79,9 @@
7979
self.set_camera_orientation(phi=80 * DEGREES, theta=-60 * DEGREES)
8080
self.wait()
8181

82-
.. manim:: ThreeDPlane
82+
.. manim:: ThreeDFunctionExample
8383

84-
class ThreeDPlane(ThreeDScene):
84+
class ThreeDFunctionExample(ThreeDScene):
8585

8686
def construct(self):
8787

docs/source/examples/animations.rst

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ Some more examples will come soon here!
1010
Updaters
1111
##########
1212

13-
.. manim:: Updater1Example
13+
.. manim:: RotationUpdaterExample
1414

15-
class Updater1Example(Scene):
15+
class RotationUpdaterExample(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:: RotationUpdater2Example
2626

27-
class Updater2Example(Scene):
27+
class RotationUpdater2Example(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:: NumberLinePointerExample
4545

46-
class Example3(Scene):
46+
class NumberLinePointerExample(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:: SnakeExample
6263

63-
class Example4(Scene):
64+
class SnakeExample(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:: ValTracker1Example
8182

82-
class Example1ValTracker(Scene):
83+
class ValTracker1Example(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:: ValTracker2Example
9697

97-
class Example2ValTracker(Scene):
98+
class ValTracker2Example(Scene):
9899
def construct(self):
99100
tick_start = 0
100101
tick_end = 2 * PI
@@ -107,9 +108,9 @@ Updaters
107108
self.add(line_reference, line_moving)
108109
self.play(val_tracker.set_value, tick_end, run_time=PI)
109110

110-
.. manim:: PlaneFadeOut
111+
.. manim:: PlaneFadeOutExample
111112

112-
class PlaneFadeOut(Scene):
113+
class PlaneFadeOutExample(Scene):
113114

114115
def construct(self):
115116

@@ -130,9 +131,9 @@ Updaters
130131
self.play(FadeOut(sq1),FadeOut(sq2),FadeOut(sq3))
131132
self.wait()
132133

133-
.. manim:: AnimationFadeInAndOut
134+
.. manim:: FadeInAndOutExample
134135

135-
class AnimationFadeInAndOut(Scene):
136+
class FadeInAndOutExample(Scene):
136137
def construct(self):
137138
square = Square(color=BLUE).shift(2*UP)
138139

docs/source/examples/shapes_images_positions.rst

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Shapes, Images and Positions
22
=================================
33

4-
.. manim:: Example1Shape
4+
.. manim:: GeometricShapesExample
55
:save_last_frame:
66

77
class Example1Shape(Scene):
@@ -17,7 +17,30 @@ Shapes, Images and Positions
1717
self.wait(1)
1818

1919

20-
.. manim:: Example1ImageFromArray
20+
.. manim:: ShapesExample
21+
22+
class ShapesExample(Scene):
23+
24+
def construct(self):
25+
26+
circle = Circle(radius= 1, color=BLUE)
27+
28+
dot = Dot()
29+
dot2= dot.copy().shift(RIGHT)
30+
self.add(dot)
31+
32+
line=Line(np.array([3,0,0]),np.array([5,0,0]))
33+
self.add(line)
34+
35+
36+
self.play(GrowFromCenter(circle))
37+
self.play(Transform(dot,dot2))
38+
self.play(MoveAlongPath(dot,circle), run_time= 2, rate_func=linear)
39+
self.play(Rotating(dot, about_point=np.array((2, 0, 0.))), run_time=1.5)
40+
self.wait()
41+
42+
43+
.. manim:: ImageFromArrayExample
2144
:save_last_frame:
2245

2346
class Example1ImageFromArray(Scene):
@@ -28,7 +51,20 @@ Shapes, Images and Positions
2851
self.add(image)
2952

3053

31-
.. manim:: Example2ImageFromFile
54+
.. manim:: GradientImageFromArrayExample
55+
:save_last_frame:
56+
57+
class ImageFromGradient(Scene):
58+
def construct(self):
59+
n = 256
60+
imageArray = np.uint8([[i*256/n for i in range(0,n)] for j in range(0,n)])
61+
image = ImageMobject(imageArray).scale(2)
62+
image.next_to(ORIGIN,LEFT, SMALL_BUFF)
63+
self.add(image)
64+
self.wait(1)
65+
66+
67+
.. manim:: ImageFromFileExample
3268
:save_last_frame:
3369

3470
class Example2ImageFromFile(Scene):
@@ -63,42 +99,6 @@ Shapes, Images and Positions
6399
self.wait(2)
64100

65101

66-
.. manim:: ImageFromGradient
67-
:save_last_frame:
68-
69-
class ImageFromGradient(Scene):
70-
def construct(self):
71-
n = 256
72-
imageArray = np.uint8([[i*256/n for i in range(0,n)] for j in range(0,n)])
73-
image = ImageMobject(imageArray).scale(2)
74-
image.next_to(ORIGIN,LEFT, SMALL_BUFF)
75-
self.add(image)
76-
self.wait(1)
77-
78-
79-
.. manim:: ShapesExample
80-
81-
class ShapesExample(Scene):
82-
83-
def construct(self):
84-
85-
circle = Circle(radius= 1, color=BLUE)
86-
87-
dot = Dot()
88-
dot2= dot.copy().shift(RIGHT)
89-
self.add(dot)
90-
91-
line=Line(np.array([3,0,0]),np.array([5,0,0]))
92-
self.add(line)
93-
94-
95-
self.play(GrowFromCenter(circle))
96-
self.play(Transform(dot,dot2))
97-
self.play(MoveAlongPath(dot,circle), run_time= 2, rate_func=linear)
98-
self.play(Rotating(dot, about_point=np.array((2, 0, 0.))), run_time=1.5)
99-
self.wait()
100-
101-
102102
.. manim:: InterpolationExample
103103
:save_last_frame:
104104

0 commit comments

Comments
 (0)