Skip to content

SquareToCircle animation from README example looks odd? #4724

@aaronshenhao

Description

@aaronshenhao

Description of bug / unexpected behavior

I ran the SquareToCircle example from the README, but it looks a bit odd. The top and bottom parts of the polygon displayed some visual artifacts midway during the transition, and the way it transitioned from a square to a circle unexpected.

It looks even weirder when using the OpenGL renderer. There's no horizontal symmetry this time, and there are even more obvious visual artifacts.

See the attached video below.

Expected behavior

The square should expand into a circle, rather than contracting towards the vertical centerline and flipping over itself. All points on one polygon should move towards the closest points on the target polygon. The transformation should preserve horizontal and vertical symmetry, which the original shapes have.

How to reproduce the issue

Run this slowed-down version of the example from the README file

from manim import *


class SquareToCircle(Scene):
    def construct(self):
        circle = Circle()
        square = Square()
        square.flip(RIGHT)
        square.rotate(-3 * TAU / 8)
        circle.set_fill(PINK, opacity=0.5)

        self.play(Create(square))
        self.play(ChangeSpeed(
            Transform(square, circle),
            speedinfo={0: 0.01}
        ))
        self.play(FadeOut(square))

with this command:

python -m manim -p -ql example.py SquareToCircle

For testing the OpenGL renderer, use:

python -m manim -p -ql --renderer opengl example.py SquareToCircle

Additional media files

Cairo

Key section is between 0:45 to 1:00

SquareToCircle.mp4

OpenGL

OpenGL.SquareToCircle.Manim.Demo.mp4

System specifications

System Details
  • OS: Ubuntu 22.04.5 LTS
  • RAM: 16 GB
  • Python version (python/py/python3 --version): 3.12
  • Installed modules (provide output from pip list):
Package             Version
------------------- ------------
anyio               4.13.0
audioop-lts         0.2.2
av                  17.0.1
backports.tarfile   1.2.0
beautifulsoup4      4.14.3
Brotli              1.2.0
build               1.5.0
CacheControl        0.14.3
certifi             2026.4.22
cffi                2.0.0
charset-normalizer  3.4.7
cleo                2.1.0
click               8.3.3
cloup               3.0.9
colorama            0.4.6
crashtest           0.4.1
cryptography        48.0.0
decorator           5.2.1
distlib             0.4.0
dulwich             1.2.1
exceptiongroup      1.3.1
fastjsonschema      2.21.2
filelock            3.29.0
findpython          0.8.0
glcontext           3.0.0
h11                 0.16.0
h2                  4.3.0
hpack               4.1.0
httpcore            1.0.9
httpx               0.28.1
hunter              3.9.0
hyperframe          6.1.0
idna                3.13
importlib_metadata  8.8.0
importlib_resources 7.1.0
installer           1.0.0
isosurfaces         0.1.2
jaraco.classes      3.4.0
jaraco.context      6.1.2
jaraco.functools    4.4.0
jeepney             0.9.0
keyring             25.7.0
manhole             1.8.1
manim               0.20.1
ManimPango          0.6.1
mapbox_earcut       1.0.3
markdown-it-py      4.0.0
mdurl               0.1.2
moderngl            5.12.0
moderngl-window     3.1.1
more-itertools      11.0.2
msgpack             1.1.2
networkx            3.6.1
numpy               2.4.3
objprint            0.3.0
packaging           26.2
pbs-installer       2026.5.4
pillow              12.2.0
pip                 26.1.1
pkginfo             1.12.1.2
platformdirs        4.9.6
poetry              2.4.0
poetry-core         2.4.0
pycairo             1.29.0
pycparser           2.22
pydub               0.25.1
pyglet              2.1.14
pyglm               2.8.3
Pygments            2.20.0
pyinstrument        5.1.2
pyproject_hooks     1.2.0
PySocks             1.7.1
python-discovery    1.3.0
PyYAML              6.0.3
RapidFuzz           3.14.5
requests            2.33.1
requests-toolbelt   1.0.0
rich                15.0.0
scipy               1.17.1
screeninfo          0.8.1
SecretStorage       3.4.1
setuptools          82.0.1
shellingham         1.5.4
skia-pathops        0.9.1
snakeviz            2.2.2
sniffio             1.3.1
soupsieve           2.8.3
srt                 3.5.3
svgelements         1.9.6
tomli               2.4.1
tomlkit             0.14.0
tornado             6.5.5
tqdm                4.67.3
trove-classifiers   2026.4.28.13
typing_extensions   4.15.0
urllib3             2.6.3
virtualenv          21.3.1
viztracer           1.1.1
watchdog            6.0.0
zipp                3.23.1
zstandard           0.25.0

Additional comments

A GIF on the README could help clarify whether this is intended behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions