from manim import *
class VectorProjectDemo(VectorScene):
    def construct(self):
        title = Text("VectorScene：向量与投影", font="STLiti", font_size=30).to_edge(UP)
        self.add(title)
        self.add_plane(animate=True, x_range=[-6, 6], y_range=[-6, 6], x_length=5, y_length=5)
        self.add_axes(animate=True)
        v1 = self.add_vector([2.5, 1.5], color=BLUE, animate=True)
        v2 = self.add_vector([0.5, 0.5], color=RED, animate=True)
        self.label_vector(v1, "v1")
        self.label_vector(v2, "v2")
        proj = self.add_vector([3, 3], color=GREEN, animate=True)
        self.label_vector(proj, "proj")
        self.wait(1.6)
