manim

Why does not rectangle make a perfect match when called Create in manim


When I run this code

from manim import *


class App(Scene):
    def construct(self):
        rectangle = Rectangle()
        self.play(DrawBorderThenFill(rectangle))

it draws a thin rectangle first, then the borders get thick. I wanted to remove that second part of the animation, and decided to play Create instead of DrawBorderThenFill.

But when I do that, here's how my rectangle looks like

enter image description here

as you can see, the upper right corner doesn't match. Why is that so, and how can I fix that?


Solution

  • Formulating my comment as an answer. Adding

    self.wait()
    

    at the end of the script should solve the issue.