Update Coordinates - Always Redraw
- 主要语言
- Python
- 星标
- 93.9k
- 派生
- 7.7k
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 4
描述
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()
```
贡献指南
这个仓库没有索引到贡献指南
调研方向
在manim代码库中查找 'always_redraw' 的定义,可能在像 mobject/updaters.py 或 scene/scene.py 这样的模块中。检查它是否被导入,或者是否有类似 'always_redraw' 的装饰器或函数替代方法。运行提供的代码片段查看错误,并通过确保 dot 使用 ValueTracker 更新来验证修复。
由索引模型根据 Issue 内容生成。
评估
- 领域
- computer-graphics
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100