ManimCommunity / ManimCommunity/manim
ManimCE 0.19.0 and 0.18.1: Axes.c2p() intermittent problem
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
( this is a spin-off from [issue 4153](https://github.com/ManimCommunity/manim/issues/4153) )
During the process of `self.play(Create(axes))` the functionality of `.coords_to_point()` is momentarily broken.
## Expected behavior
The method `.coords_to_point(x,y)` does give the correct position on the scene when the corresponding `Axes()` object is not on the screen which can be used for coordinate transformations. It also works correctly when the `Axes()` object is placed on the scene. But during the process of the animated creation of the `Axes()` object the coordinate calculation is broken, which becomes apparent when `.c2p()` is used in an updater which is active during the creation of the `Axes()` object.
## How to reproduce the issue
Code for reproducing the problem
```py
class weird(Scene):
def construct(self):
axes = Axes(
x_range=(-1,4,1),
y_range=(-2,5,1),
tips=False,
).add_coordinates()
dotA=always_redraw(lambda: Dot(point=axes.c2p(2,2)))
self.add(dotA)
self.wait()
self.play(Create(axes))
self.wait(1)
```
## Additional media files
rendered video ManimCE 0.19.0
https://github.com/user-attachments/assets/425e6779-9cf2-4e1a-bf7d-addada3d021c
## System specifications
System Details
- OS (with version, e.g., Windows 10 v2004 or macOS 10.15 (Catalina)): Windows 10
- RAM:
- Python version (`python/py/python3 --version`): 3.13 and 3.11
## Additional comments
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided Scene reproduction with Python 3.11 or 3.13 and observe the always_redraw updater during self.play(Create(axes)). Trace Axes.c2p() and coords_to_point() while the Axes object is being created. Done means the dot remains at the correct coordinate throughout the animated creation, matching the behavior before and after it.
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100