-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshapes.py
More file actions
37 lines (30 loc) · 962 Bytes
/
Copy pathshapes.py
File metadata and controls
37 lines (30 loc) · 962 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from manim import *
class ShapeCircle(Scene):
def construct(self):
circle = Circle(radius=2,color=RED)
self.play(Create(circle))
self.wait(1)
class ShapeSquare(Scene):
def construct(self):
square = Square(side_length=2,color=RED)
self.play(Create(square))
self.wait(1)
class ShapeTriangle(Scene):
def construct(self):
triangle = Triangle(color=PURPLE)
self.play(Create(triangle))
self.wait(1)
class Shapes(Scene):
def construct(self):
circle = Circle(radius=1,color=RED)
square = Square(color=PINK)
triangle = Triangle(color=PURPLE).set_width(2)
square.shift(LEFT*3)
triangle.shift(RIGHT*3)
self.play(Create(circle))
self.wait(1)
self.play(Create(square))
self.wait(1)
self.play(Create(triangle))
self.wait(1)
self.play(FadeOut(circle),FadeOut(square), FadeOut(triangle))