Update Coordinates - Always Redraw
- Lenguaje dominante
- Python
- Estrellas
- 93.8k
- Forks
- 7.7k
- Métricas de merge de PR
- Métricas de PR pendientes
Descripción
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()
```
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.