3b1b / 3b1b/manim

Update Coordinates - Always Redraw

Ouverte
#1,299 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
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.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.