1+ from manim import *
2+ import numpy as np
3+
4+
5+ class EESASTLogo (Scene ):
6+ """
7+ 绘制 EESAST logo
8+ 注释部分为绘制时的辅助点、线、圆
9+ """
10+
11+ def construct (self ):
12+ base_circle = Circle (radius = 3 , color = WHITE )
13+
14+ p0 = base_circle .point_at_angle (210 * DEGREES )
15+ p1 = base_circle .point_at_angle (150 * DEGREES )
16+ p2 = base_circle .point_at_angle (90 * DEGREES )
17+ p3 = base_circle .point_at_angle (30 * DEGREES )
18+ p4 = base_circle .point_at_angle (330 * DEGREES )
19+ p5 = base_circle .point_at_angle (270 * DEGREES )
20+
21+ dot0 = Dot ().move_to (p0 )
22+ dot1 = Dot ().move_to (p1 )
23+ dot2 = Dot ().move_to (p2 )
24+ dot3 = Dot ().move_to (p3 )
25+ dot4 = Dot ().move_to (p4 )
26+ dot5 = Dot ().move_to (p5 )
27+
28+ big_circle_0 = Circle (radius = 3 , color = WHITE )
29+ big_circle_1 = Circle (radius = 3 , color = WHITE )
30+ big_circle_2 = Circle (radius = 3 , color = WHITE )
31+ big_circle_3 = Circle (radius = 3 , color = WHITE )
32+ big_circle_4 = Circle (radius = 3 , color = WHITE )
33+ big_circle_5 = Circle (radius = 3 , color = WHITE )
34+
35+ big_circle_0 .shift (1.5 * DOWN ).shift (1.5 * np .sqrt (3 ) * LEFT )
36+ big_circle_1 .shift (1.5 * UP ).shift (1.5 * np .sqrt (3 ) * LEFT )
37+ big_circle_2 .shift (3 * UP )
38+ big_circle_3 .shift (1.5 * UP ).shift (1.5 * np .sqrt (3 ) * RIGHT )
39+ big_circle_4 .shift (1.5 * DOWN ).shift (1.5 * np .sqrt (3 ) * RIGHT )
40+ big_circle_5 .shift (3 * DOWN )
41+
42+ frame_0 = Line (dot0 , dot1 )
43+ frame_1 = Line (dot1 , dot2 )
44+ frame_2 = Line (dot2 , dot3 )
45+ frame_3 = Line (dot3 , dot4 )
46+ frame_4 = Line (dot4 , dot5 )
47+ frame_5 = Line (dot5 , dot0 )
48+
49+ tiny_circle_0 = Circle (radius = 0.3 , color = ORANGE ).move_to (p0 )
50+ tiny_circle_0_p0 = tiny_circle_0 .point_at_angle (90 * DEGREES )
51+ tiny_circle_0_p1 = tiny_circle_0 .point_at_angle (330 * DEGREES )
52+ tiny_circle_0_dot_0 = Dot ().move_to (tiny_circle_0_p0 )
53+ tiny_circle_0_dot_1 = Dot ().move_to (tiny_circle_0_p1 )
54+
55+ tiny_circle_1 = Circle (radius = 0.3 , color = ORANGE ).move_to (p3 )
56+ tiny_circle_1_p0 = tiny_circle_1 .point_at_angle (150 * DEGREES )
57+ tiny_circle_1_p1 = tiny_circle_1 .point_at_angle (270 * DEGREES )
58+ tiny_circle_1_dot_0 = Dot ().move_to (tiny_circle_1_p0 )
59+ tiny_circle_1_dot_1 = Dot ().move_to (tiny_circle_1_p1 )
60+
61+ polygon_0 = Polygon (p0 ,
62+ tiny_circle_0_p0 ,
63+ tiny_circle_1_p0 ,
64+ p3 ,
65+ tiny_circle_1_p1 ,
66+ tiny_circle_0_p1 ,
67+ color = BLUE )
68+
69+ tiny_circle_2 = Circle (radius = 0.3 ,
70+ color = ORANGE ).move_to (tiny_circle_0_p1 )
71+ tiny_circle_2_p0 = tiny_circle_2 .point_at_angle (30 * DEGREES )
72+ tiny_circle_2_dot_0 = Dot ().move_to (tiny_circle_2_p0 )
73+ tiny_circle_2_p1 = tiny_circle_2_p0 + 0.6 * UP
74+ tiny_circle_2_dot_1 = Dot ().move_to (tiny_circle_2_p1 )
75+
76+ line_p0 = tiny_circle_2_p0 + 3.3 * UP
77+ line_0 = Line (tiny_circle_2_dot_0 , line_p0 )
78+
79+ tiny_circle_3 = Circle (radius = 0.3 ,
80+ color = ORANGE ).move_to (tiny_circle_1_p0 )
81+ tiny_circle_3_p0 = tiny_circle_3 .point_at_angle (210 * DEGREES )
82+ tiny_circle_3_dot_0 = Dot ().move_to (tiny_circle_3_p0 )
83+ tiny_circle_3_p1 = tiny_circle_3_p0 + 0.6 * DOWN
84+ tiny_circle_3_dot_1 = Dot ().move_to (tiny_circle_3_p1 )
85+
86+ line_p1 = tiny_circle_3_p0 + 3.3 * DOWN
87+ line_1 = Line (tiny_circle_3_p0 , line_p1 )
88+
89+ small_circle_0 = Circle (radius = 0.6 , color = GREEN ).move_to (p1 )
90+ small_circle_0_p1 = small_circle_0 .point_at_angle (270 * DEGREES )
91+ small_circle_0_p2 = small_circle_0 .point_at_angle (330 * DEGREES )
92+ small_circle_0_dot_0 = Dot ().move_to (line_p0 )
93+ small_circle_0_dot_1 = Dot ().move_to (small_circle_0_p1 )
94+ small_circle_0_dot_2 = Dot ().move_to (small_circle_0_p2 )
95+
96+ small_circle_1 = Circle (radius = 0.6 , color = GREEN ).move_to (p4 )
97+ small_circle_1_p1 = small_circle_1 .point_at_angle (90 * DEGREES )
98+ small_circle_1_p2 = small_circle_1 .point_at_angle (150 * DEGREES )
99+ small_circle_1_dot_0 = Dot ().move_to (line_p1 )
100+ small_circle_1_dot_1 = Dot ().move_to (small_circle_1_p1 )
101+ small_circle_1_dot_2 = Dot ().move_to (small_circle_1_p2 )
102+
103+ polygon_1 = Polygon (tiny_circle_0_p0 ,
104+ tiny_circle_2_p1 ,
105+ small_circle_0_p2 ,
106+ small_circle_0_p1 ,
107+ color = BLUE )
108+
109+ polygon_2 = Polygon (tiny_circle_1_p1 ,
110+ tiny_circle_3_p1 ,
111+ small_circle_1_p2 ,
112+ small_circle_1_p1 ,
113+ color = BLUE )
114+
115+ line_p2 = p2 + 0.3 * DOWN + 0.3 * np .sqrt (3 ) * RIGHT
116+ line_2 = Line (small_circle_0_dot_1 , line_p2 )
117+ line_2_dot_0 = Dot ().move_to (line_p2 )
118+
119+ line_p3 = p5 + 0.3 * UP + 0.3 * np .sqrt (3 ) * LEFT
120+ line_3 = Line (small_circle_1_dot_1 , line_p3 )
121+ line_3_dot_0 = Dot ().move_to (line_p3 )
122+
123+ polygon_3 = Polygon (small_circle_0_p1 , line_p2 , p2 , p1 , color = BLUE )
124+ polygon_4 = Polygon (small_circle_1_p1 , line_p3 , p5 , p4 , color = BLUE )
125+
126+ line_p4 = p0 + 1.35 * UP
127+ line_p5 = p3 + 1.35 * DOWN
128+
129+ tiny_circle_4 = Circle (radius = 0.3 , color = ORANGE ).move_to (line_p4 )
130+ tiny_circle_5 = Circle (radius = 0.3 , color = ORANGE ).move_to (line_p5 )
131+
132+ tiny_circle_4_p0 = tiny_circle_4 .point_at_angle (90 * DEGREES )
133+ tiny_circle_4_p1 = tiny_circle_4 .point_at_angle (270 * DEGREES )
134+
135+ tiny_circle_5_p0 = tiny_circle_5 .point_at_angle (90 * DEGREES )
136+ tiny_circle_5_p1 = tiny_circle_5 .point_at_angle (270 * DEGREES )
137+
138+ tiny_circle_4_p0 = Dot ().move_to (tiny_circle_4_p0 )
139+ tiny_circle_4_p1 = Dot ().move_to (tiny_circle_4_p1 )
140+
141+ tiny_circle_5_p0 = Dot ().move_to (tiny_circle_5_p0 )
142+ tiny_circle_5_p1 = Dot ().move_to (tiny_circle_5_p1 )
143+
144+ line_p6 = line_p2 + 0.375 * DOWN + 0.375 * np .sqrt (3 ) * RIGHT
145+ line_p7 = line_p6 + 0.3 * DOWN + 0.3 * np .sqrt (3 ) * RIGHT
146+ line_p8 = line_p4 + 0.6 * np .sqrt (3 ) * RIGHT + 0.3 * UP
147+ line_p9 = line_p8 + 0.6 * UP
148+
149+ line_p10 = line_p3 + 0.375 * UP + 0.375 * np .sqrt (3 ) * LEFT
150+ line_p11 = line_p10 + 0.3 * UP + 0.3 * np .sqrt (3 ) * LEFT
151+ line_p12 = line_p5 + 0.6 * np .sqrt (3 ) * LEFT + 0.3 * DOWN
152+ line_p13 = line_p12 + 0.6 * DOWN
153+
154+ line_4 = Line (tiny_circle_4_p0 , line_p6 )
155+ line_5 = Line (tiny_circle_4_p1 , line_p7 )
156+
157+ line_6 = Line (tiny_circle_5_p0 , line_p11 )
158+ line_7 = Line (tiny_circle_5_p1 , line_p10 )
159+
160+ polygon_5 = Polygon (line_p6 , line_p7 , line_p8 , line_p9 , color = BLUE )
161+ polygon_6 = Polygon (line_p10 , line_p11 , line_p12 , line_p13 , color = BLUE )
162+
163+ line_p4 = Dot ().move_to (line_p4 )
164+ line_p5 = Dot ().move_to (line_p5 )
165+ line_p6 = Dot ().move_to (line_p6 )
166+ line_p7 = Dot ().move_to (line_p7 )
167+ line_p8 = Dot ().move_to (line_p8 )
168+ line_p9 = Dot ().move_to (line_p9 )
169+ line_p10 = Dot ().move_to (line_p10 )
170+ line_p11 = Dot ().move_to (line_p11 )
171+ line_p12 = Dot ().move_to (line_p12 )
172+ line_p13 = Dot ().move_to (line_p13 )
173+
174+ eesast = Tex (
175+ r"\textbf{E\quad E\quad S\quad $\Lambda$\quad S\quad T}" )\
176+ .scale (1.5 ).shift (3 * DOWN )
177+
178+ # self.play(Create(base_circle))
179+
180+ # self.play(GrowFromCenter(big_circle_0), GrowFromCenter(big_circle_1),
181+ # GrowFromCenter(big_circle_2), GrowFromCenter(big_circle_3),
182+ # GrowFromCenter(big_circle_4), GrowFromCenter(big_circle_5))
183+
184+ # self.play(FadeIn(dot0), FadeIn(dot1), FadeIn(dot2), FadeIn(dot3),
185+ # FadeIn(dot4), FadeIn(dot5))
186+
187+ # self.play(FadeOut(big_circle_0), FadeOut(big_circle_1),
188+ # FadeOut(big_circle_2), FadeOut(big_circle_3),
189+ # FadeOut(big_circle_4), FadeOut(big_circle_5))
190+
191+ # self.play(GrowFromPoint(frame_0, dot0), GrowFromPoint(frame_1, dot1),
192+ # GrowFromPoint(frame_2, dot2), GrowFromPoint(frame_3, dot3),
193+ # GrowFromPoint(frame_4, dot4), GrowFromPoint(frame_5, dot5))
194+
195+ # self.play(FadeOut(base_circle))
196+
197+ # self.play(Create(tiny_circle_0), Create(tiny_circle_1))
198+ # self.play(FadeIn(tiny_circle_0_dot_0), FadeIn(tiny_circle_0_dot_1),
199+ # FadeIn(tiny_circle_1_dot_0), FadeIn(tiny_circle_1_dot_1))
200+
201+ self .play (GrowFromCenter (polygon_0 ))
202+
203+ # self.play(Create(tiny_circle_2), Create(tiny_circle_3))
204+ # self.play(FadeIn(tiny_circle_2_dot_0), FadeIn(tiny_circle_3_dot_0))
205+
206+ # self.play(GrowFromPoint(line_0, tiny_circle_2_dot_0),
207+ # GrowFromPoint(line_1, tiny_circle_3_dot_0))
208+ # self.play(FadeIn(tiny_circle_2_dot_1), FadeIn(small_circle_0_dot_0),
209+ # FadeIn(tiny_circle_3_dot_1), FadeIn(small_circle_1_dot_0))
210+
211+ # self.play(GrowFromCenter(small_circle_0),
212+ # GrowFromCenter(small_circle_1))
213+ # self.play(FadeIn(small_circle_0_dot_1), FadeIn(small_circle_0_dot_2),
214+ # FadeIn(small_circle_1_dot_1), FadeIn(small_circle_1_dot_2))
215+
216+ self .play (GrowFromPoint (polygon_1 , tiny_circle_0_p0 ),
217+ GrowFromPoint (polygon_2 , tiny_circle_1_p1 ))
218+
219+ # self.play(GrowFromPoint(line_2, small_circle_0_dot_1),
220+ # GrowFromPoint(line_3, small_circle_1_dot_1))
221+ # self.play(FadeIn(line_2_dot_0), FadeIn(line_3_dot_0),
222+ # FadeOut(tiny_circle_0), FadeOut(tiny_circle_1),
223+ # FadeOut(tiny_circle_2),
224+ # FadeOut(tiny_circle_3), FadeOut(dot0), FadeOut(dot3),
225+ # FadeOut(tiny_circle_0_dot_0), FadeOut(tiny_circle_0_dot_1),
226+ # FadeOut(tiny_circle_1_dot_0), FadeOut(tiny_circle_1_dot_1),
227+ # FadeOut(tiny_circle_2_dot_0), FadeOut(tiny_circle_2_dot_1),
228+ # FadeOut(tiny_circle_3_dot_0), FadeOut(tiny_circle_3_dot_1),
229+ # FadeOut(line_0), FadeOut(line_1))
230+
231+ self .play (GrowFromPoint (polygon_3 , small_circle_0_p1 ),
232+ GrowFromPoint (polygon_4 , small_circle_1_p1 ))
233+
234+ # self.play(FadeOut(small_circle_0), FadeOut(small_circle_1),
235+ # FadeOut(small_circle_0_dot_0), FadeOut(small_circle_0_dot_1),
236+ # FadeOut(small_circle_0_dot_2), FadeOut(small_circle_1_dot_0),
237+ # FadeOut(small_circle_1_dot_1), FadeOut(small_circle_1_dot_2),
238+ # FadeOut(line_2),
239+ # FadeOut(line_3), FadeOut(dot1), FadeOut(dot2), FadeOut(dot4),
240+ # FadeOut(dot5), FadeOut(line_2_dot_0), FadeOut(line_3_dot_0),
241+ # FadeOut(frame_1), FadeOut(frame_4))
242+
243+ # self.play(FadeIn(line_p4), FadeIn(line_p5))
244+ # self.play(GrowFromCenter(tiny_circle_4), GrowFromCenter(tiny_circle_5))
245+ # self.play(
246+ # FadeIn(tiny_circle_4_p0),
247+ # FadeIn(tiny_circle_4_p1),
248+ # FadeIn(tiny_circle_5_p0),
249+ # FadeIn(tiny_circle_5_p1),
250+ # )
251+
252+ # self.play(
253+ # GrowFromPoint(line_4, tiny_circle_4_p0),
254+ # GrowFromPoint(line_5, tiny_circle_4_p1),
255+ # GrowFromPoint(line_6, tiny_circle_5_p0),
256+ # GrowFromPoint(line_7, tiny_circle_5_p1),
257+ # )
258+
259+ # self.play(
260+ # FadeIn(line_p6),
261+ # FadeIn(line_p7),
262+ # FadeIn(line_p10),
263+ # FadeIn(line_p11),
264+ # )
265+
266+ # self.play(
267+ # FadeOut(tiny_circle_4),
268+ # FadeOut(tiny_circle_5),
269+ # FadeOut(line_p4),
270+ # FadeOut(line_p5),
271+ # FadeOut(tiny_circle_4_p0),
272+ # FadeOut(tiny_circle_4_p1),
273+ # FadeOut(tiny_circle_5_p0),
274+ # FadeOut(tiny_circle_5_p1),
275+ # )
276+
277+ # self.play(frame_0.animate.shift(0.6 * np.sqrt(3) * RIGHT),
278+ # frame_3.animate.shift(0.6 * np.sqrt(3) * LEFT))
279+
280+ # self.play(FadeIn(line_p8), FadeIn(line_p9), FadeIn(line_p12),
281+ # FadeIn(line_p13))
282+
283+ self .play (GrowFromPoint (polygon_5 , line_p6 ),
284+ GrowFromPoint (polygon_6 , line_p10 ))
285+
286+ # self.play(
287+ # FadeOut(line_4),
288+ # FadeOut(line_5),
289+ # FadeOut(line_6),
290+ # FadeOut(line_7),
291+ # FadeOut(frame_0),
292+ # FadeOut(frame_2),
293+ # FadeOut(frame_3),
294+ # FadeOut(frame_5),
295+ # FadeOut(line_p6),
296+ # FadeOut(line_p7),
297+ # FadeOut(line_p8),
298+ # FadeOut(line_p9),
299+ # FadeOut(line_p10),
300+ # FadeOut(line_p11),
301+ # FadeOut(line_p12),
302+ # FadeOut(line_p13),
303+ # )
304+
305+ self .play (polygon_0 .animate .set_fill (BLUE , opacity = 1.0 ),
306+ polygon_1 .animate .set_fill (BLUE , opacity = 1.0 ),
307+ polygon_2 .animate .set_fill (BLUE , opacity = 1.0 ),
308+ polygon_3 .animate .set_fill (BLUE , opacity = 1.0 ),
309+ polygon_4 .animate .set_fill (BLUE , opacity = 1.0 ),
310+ polygon_5 .animate .set_fill (BLUE , opacity = 1.0 ),
311+ polygon_6 .animate .set_fill (BLUE , opacity = 1.0 ))
312+
313+ up = 0.8 * UP
314+
315+ self .play (polygon_0 .animate .shift (up ), polygon_1 .animate .shift (up ),
316+ polygon_2 .animate .shift (up ), polygon_3 .animate .shift (up ),
317+ polygon_4 .animate .shift (up ), polygon_5 .animate .shift (up ),
318+ polygon_6 .animate .shift (up ))
319+
320+ self .play (FadeIn (eesast ))
0 commit comments