ManimCommunity / ManimCommunity/manim

SquareToCircle animation from README example looks odd?

Open
#4,724 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
40.9k
Forks
3.1k
Avg merge
3d 12h
Merged PRs (30d)
25

Description

## 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

```python
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:

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

For testing the OpenGL renderer, use:

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

## Additional media files

### Cairo
Key section is between 0:45 to 1:00

https://github.com/user-attachments/assets/03cc81ef-3632-44b3-8d38-18fc92565dc0

### OpenGL

https://github.com/user-attachments/assets/893e262c-c12c-42ac-b88d-3afd587d431d

## 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run the README's SquareToCircle example with both the Cairo and OpenGL commands provided, using the slowed-down animation to observe the artifacts. Trace the transformation behavior from that entry point and compare the resulting geometry in both renderers. Done means the square expands into the circle with preserved horizontal and vertical symmetry and no visible artifacts.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.