ManimCommunity / ManimCommunity/manim
always_redraw works in 0.18.0 but not in 0.18.1 (single ValueTracker)
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
The following code which does not work in 0.18.1 and is fine on 0.17.3:
```python
for i, idx_r in enumerate(r_idxs):
r = points[idx_r]
if i == 0:
track_pt = PointValueTracker(r)
# lines denoting the prq angle
pr = always_redraw(lambda: Line(p, track_pt.get_value(), color=YELLOW, buff=0))
qr = always_redraw(lambda: Line(q, track_pt.get_value(), color=YELLOW, buff=0))
grp = VGroup(pr, qr)
self.play(LaggedStartMap(Create, grp, runtime=2, lag_ratio=0.2))
# move the point of two "angle" lines along the line
# connecting points[idx_r] and points[idx_r + 1]
if i < len(r_idxs) - 1:
r_next = points[r_idxs[i + 1]]
self.play(track_pt.animate.set_value(r_next))
```
## System specifications
System Details
- OS Windows11:
- RAM: 128 Gb
- Python version (`python/py/python3 --version`): 3.10.12
- Installed modules (provide output from `pip [list`):](url)
```
PASTE HERE
```
correct.mp4 and wrong.mp4 show the porblem *at 15 sec*
https://github.com/ManimCommunity/manim/assets/987574/7e8341d1-19e4-4c0a-af86-640cfa91b64f
https://github.com/ManimCommunity/manim/assets/987574/86fa4c6d-a32e-41b4-a448-5710ca33dada
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 animation pattern with always_redraw, PointValueTracker, and the animated set_value call, comparing behavior in 0.18.0 and 0.18.1. Done means the 0.18.1 animation matches the working behavior shown in correct.mp4 rather than the failure in wrong.mp4.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100