@@ -14,7 +14,7 @@ Shapes, Images and Positions
14
14
s.next_to(c, LEFT)
15
15
t.next_to(c, DOWN)
16
16
self.add(d, c, s, t)
17
- self.wait(1 )
17
+ self.wait()
18
18
19
19
20
20
.. manim :: ShapesExample
@@ -57,11 +57,9 @@ Shapes, Images and Positions
57
57
class GradientImageFromArrayExample(Scene):
58
58
def construct(self):
59
59
n = 256
60
- imageArray = np.uint8([[i*256/n for i in range(0,n)] for j in range(0,n)])
60
+ imageArray = np.uint8([[i*256/n for i in range(0,n)] for _ in range(0,n)])
61
61
image = ImageMobject(imageArray).scale(2)
62
- image.next_to(ORIGIN,LEFT, SMALL_BUFF)
63
62
self.add(image)
64
- self.wait(1)
65
63
66
64
67
65
.. manim :: ImageFromFileExample
@@ -72,7 +70,7 @@ Shapes, Images and Positions
72
70
# Use PIL when you want to import an image from the web
73
71
import requests
74
72
from PIL import Image
75
- img = Image.open(requests.get("https://raw.githubusercontent.com/ManimCommunity/manim/master/logo/cropped .png",
73
+ img = Image.open(requests.get("https://raw.githubusercontent.com/ManimCommunity/manim/master/logo/logoWAlpha .png",
76
74
stream=True).raw)
77
75
img_mobject = ImageMobject(img)
78
76
# this line, when you want to import your Image on your machine
@@ -96,7 +94,6 @@ Shapes, Images and Positions
96
94
for rad,col in zip(radius,colors)])
97
95
98
96
self.add(circles_group)
99
- self.wait(2)
100
97
101
98
102
99
.. manim :: InterpolationExample
@@ -154,6 +151,7 @@ Shapes, Images and Positions
154
151
155
152
156
153
.. manim :: SplineExample
154
+ :save_last_frame:
157
155
158
156
class SplineExample(Scene):
159
157
def construct(self):
@@ -216,18 +214,10 @@ Shapes, Images and Positions
216
214
dest_line1_point2 )
217
215
218
216
219
- start=VGroup(Line(destination_dot1.get_center(), destination_dot2.get_center()),
220
- destination_dot1.copy(),
221
- destination_dot2.copy())
222
- start.scale(0.5)
223
-
224
- end= VGroup(Lp1s1, Lp2s2,dest_line1,dest_line2,destination_dot1,destination_dot2)
225
- end.scale(2)
217
+ mobjects= VGroup(Lp1s1, Lp2s2,dest_line1,dest_line2,destination_dot1,destination_dot2)
226
218
227
- self.add(start)
228
- self.wait()
229
- self.play(ClockwiseTransform(start,end), run_time=3)
230
- self.wait()
219
+ mobjects.scale(2)
220
+ self.add(mobjects)
231
221
232
222
Note: Here can come the UnitDot Example.
233
223
0 commit comments