manim
manim copied to clipboard
Animating Circle.set_fill results in a weird pattern.
Animating Circle.set_fill results in a weird pattern as follows:
https://user-images.githubusercontent.com/41336229/125058195-ac5fb800-e0c7-11eb-9a75-3f5ee05589de.mp4
Code:
from manimlib import *
class Test(Scene):
def construct(self):
circle = Circle(color=BLUE).set_fill(BLUE, opacity=0.5)
self.play(ShowCreation(circle))
self.wait()
Also, how do I animate the fill smoothly?
I didn't find a way to do that other than fading between 2 instance of Circle with ReplacementTransform.
(Mind you, I'm not the most proficient with Manim.)
class Test(Scene):
def construct(self):
circle = Circle(color=BLUE)
circle2 = Circle(color=BLUE).set_fill(BLUE, opacity=0.5)
self.play(ShowCreation(circle))
self.play(ReplacementTransform(circle, circle2))
self.wait()
https://user-images.githubusercontent.com/73761711/134973491-88e51fef-9d8b-45d8-9209-32201b6426f5.mp4