Update Coordinates - Always Redraw
- Langage dominant
- Python
- Étoiles
- 93.8k
- Forks
- 7.7k
- Métriques de merge des PR
- Métriques de PR en attente
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()
```
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.