| from manim import * | |
| class manadala(Scene): | |
| def construct(self): | |
| center = Dot() | |
| tri = RegularPolygon(n=3, radius=0.5).rotate(PI, about_point=ORIGIN) | |
| circ = Circle(radius = 1) | |
| petarc = VMobject().set_anchors_and_handles( | |
| [np.cos(PI/8),np.sin(PI/8),0], | |
| [1.5*np.cos(PI/8),1.5*np.sin(PI/8),0], | |
| [1.2*np.cos(PI/8),0.2*np.sin(PI/8),0], | |
| [1.5,0,0] | |
| ) | |
| petals = VGroup( | |
| VGroup( | |
| petarc.copy(), | |
| petarc.copy().rotate(PI,about_point=ORIGIN,axis=[1,0,0]) | |
| ).rotate(i*PI/4, about_point=ORIGIN) | |
| for i in range(8) | |
| ) | |
| fline = VMobject(color=GREEN).set_points_as_corners( | |
| [ | |
| [2,-2,0],[2,-0.5,0],[2.25,-0.5,0],[2.25,-1,0],[2.5,-1,0],[2.5,0,0], | |
| ] | |
| ) | |
| frame = VGroup( | |
| VGroup( | |
| fline.copy(), | |
| fline.copy().rotate(PI,about_point=ORIGIN,axis=[1,0,0]) | |
| ).rotate(i*PI/2,about_point=ORIGIN) | |
| for i in range(4) | |
| ) | |
| self.play(Create(center), rate_func=rate_functions.linear) | |
| self.play(Create(tri), rate_func=rate_functions.linear) | |
| self.play(Create(circ), rate_func=rate_functions.linear) | |
| self.play(Create(petals), rate_func=rate_functions.linear) | |
| self.play(Create(frame), rate_func=rate_functions.linear) | |
| self.wait() |