Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from manim import *
- config.pixel_height=1920
- config.pixel_width=1080
- config.frame_height=16
- config.frame_width=9
- config.frame_rate=60
- class teste2(Scene):
- def construct(self):
- npl = NumberPlane(y_range=[-8,8],y_length=16).add_coordinates()
- np2 = NumberPlane(x_range=[-1,8], x_length=10,y_range=[-1, 16], y_length= 17).add_coordinates()
- pentagono = RegularPolygon(n=5, color=RED_C).set_fill(BLUE, opacity=0.35).scale(4) # pentagono.set_fill(BLUE, opacity= 0.35)
- pentagoninho = RegularPolygon(n=5, color=RED_A).set_fill(PINK, opacity=0.5).scale(2)
- line1 = Line(np2.c2p(-3, 7), np2.c2p(5, 2), color=GREEN) # Line from (-3,0) to (5,0)
- line2 = Line(np2.c2p(6, 2), np2.c2p(0, 4), color=YELLOW) # Line from (0,0) to (0,4)
- self.play(Create(npl))
- self.wait(1)
- self.play(Transform(npl, np2))
- self.wait(1)
- self.play(FadeIn(line1))
- self.play(Transform(line1,line2))
- self.play(ReplacementTransform(line1, pentagono))
- self.wait(1)
- self.play(ReplacementTransform(pentagono, pentagoninho))
- self.play(pentagoninho.animate.rotate(PI/5), run_time = 2)
- self.wait(2)
Add Comment
Please, Sign In to add comment