that_one_nigga_you_k

transformada

May 31st, 2024
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.20 KB | None | 0 0
  1. from manim import *
  2.  
  3. config.pixel_height=1920
  4. config.pixel_width=1080
  5. config.frame_height=16
  6. config.frame_width=9
  7. config.frame_rate=60
  8.  
  9. class teste2(Scene):
  10.     def construct(self):
  11.         npl = NumberPlane(y_range=[-8,8],y_length=16).add_coordinates()
  12.         np2 = NumberPlane(x_range=[-1,8], x_length=10,y_range=[-1, 16], y_length= 17).add_coordinates()
  13.         pentagono = RegularPolygon(n=5, color=RED_C).set_fill(BLUE, opacity=0.35).scale(4)  #       pentagono.set_fill(BLUE, opacity= 0.35)
  14.         pentagoninho = RegularPolygon(n=5, color=RED_A).set_fill(PINK, opacity=0.5).scale(2)
  15.  
  16.  
  17.         line1 = Line(np2.c2p(-3, 7), np2.c2p(5, 2), color=GREEN)  # Line from (-3,0) to (5,0)
  18.         line2 = Line(np2.c2p(6, 2), np2.c2p(0, 4), color=YELLOW)  # Line from (0,0) to (0,4)
  19.  
  20.         self.play(Create(npl))
  21.         self.wait(1)
  22.         self.play(Transform(npl, np2))
  23.         self.wait(1)
  24.         self.play(FadeIn(line1))
  25.         self.play(Transform(line1,line2))
  26.         self.play(ReplacementTransform(line1, pentagono))
  27.         self.wait(1)
  28.         self.play(ReplacementTransform(pentagono, pentagoninho))
  29.         self.play(pentagoninho.animate.rotate(PI/5), run_time = 2)
  30.         self.wait(2)
Add Comment
Please, Sign In to add comment