Untitled
unknown
plain_text
a year ago
978 B
9
Indexable
from manim import * class SquareToCircle(Scene): def construct(self): circle = Circle() circle.set_fill(PINK, opacity=0.5) square = Square() square.set_fill(BLUE, opacity=0.5) square1 = Square() square1.set_fill(BLUE, opacity=0.5) square1.next_to(circle,LEFT,buff=1) square.next_to(circle, RIGHT, buff=0.5) self.play(Create(circle), Create(square),Create(square1)) self.play(Transform(square,circle)) square.remove() hidensquare=Square() hidensquare.set_fill(ORANGE, opacity=1) self.play(Transform(square1,circle)) square1.set_opacity(0.0) square.set_opacity(0.0) self.play(Transform(circle, hidensquare)) self.play(circle.animate.rotate(PI / 4),circle.animate.set_color(ORANGE,RED_C )) self.play(circle.animate.rotate(PI / 4)) self.play(FadeOut(circle))
Editor is loading...
Leave a Comment