3b1b / 3b1b/manim

Update Coordinates - Always Redraw

オープン
#1,299 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
93.8k
フォーク
7.7k
PR マージ指標
PR 指標を取得中

説明

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()
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。