---
description: 点的轨迹变换
---

# PointWithTrace

{% file src="https://3378841769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvb7a7iWx8OZAGPxzbEZJ%2Fuploads%2FMIkLzkwOJ8ubLgmP8Cxc%2FPointWithTrace.mp4?alt=media&token=928f7259-68e8-4659-ab64-0f3e2d01cd73" %}
PointWithTrace
{% endfile %}

```python
from manim import *

class PointWithTrace(Scene):
    def construct(self):
        path = VMobject()
        dot = Dot()
        path.set_points_as_corners([dot.get_center(), dot.get_center()])
        def update_path(path):
            previous_path = path.copy()
            previous_path.add_points_as_corners([dot.get_center()])
            path.become(previous_path)
        path.add_updater(update_path)
        self.add(path, dot)
        self.play(Rotating(dot, radians=PI, about_point=RIGHT, run_time=2))
        self.wait()
        self.play(dot.animate.shift(UP))
        self.play(dot.animate.shift(LEFT))
        self.wait()
```
