Update Coordinates - Always Redraw
- Dominant language
- Python
- Stars
- 93.9k
- Forks
- 7.7k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 4
Description
I'm attempting to track the coordinates of a function, but I don't seem to be able to get always_redraw as it is not defined to work. Is this a new feature?
```
def construct(self):
self.wait()
self.setup_axes()
graph = self.get_graph(lambda x: x**3, x_min=-5, x_max=5)
initial_x = -5
final_x = 5
track = ValueTracker(initial_x)
coor = self.coords_to_point
dot = track.get_value
func = graph.underlying_function
moving_dot = always_redraw(lambda: Dot(coor(dot(), func(dot()))))
self.add(graph, moving_dot)
self.play(track.set_value, final_x, run_time=5)
self.wait()
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Look for the definition of 'always_redraw' in the manim codebase, likely in a module like mobject/updaters.py or scene/scene.py. Check if it's imported or if there's an alternative method like 'always_redraw' as a decorator or function. Run the provided code snippet to see the error and verify the fix by ensuring the dot updates with the ValueTracker.
Written by the indexing model from the issue text.
Assessment
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100