$\vec{v}$

$\vec{a}$

$\vec{v}$

λ

p(λ)

nächstgelegener Punkt

$\vec{v_λ}$

$\vec{q}$

C: (0, 0)
D = (1, 1)
v = Vector(C, D)
P = (1, -2)
p = Vector(P)
textv: "\vec{v} = " + (LaTeX[v]) + ""
text: "\textcolor{#3333FF}{g} =\left\{ \textcolor{#339900}{" + (LaTeX[p]) + "}+λ\cdot \textcolor{#ff0000}{" + (LaTeX[v]) + "}| λ∈ℝ\right\}"
v_1 = Vector(P, P + D)
lambda = 3.25 (slider from -10 to 10, step 0.05)
P_{lambda} = Point(P, Vector[(lambda * v)])
Q = (1.5742090367099966, 3.059057289407392)
s = Segment(P_{lambda}, Q)
textabstand: "\text{Abstand } \left\Vert p(λ)-Q \right\Vert=" + (LaTeX[s]) + ""
min = Minimize(s, lambda)
v_{lambda}: p + (lambda * v)
textlambda: "p(λ)=\textcolor{#339900}{" + (LaTeX[p]) + "}+" + (LaTeX[If[lambda < 0, "(" + lambda + ")", Text[lambda]]]) + "\cdot \textcolor{#ff0000}{" + (LaTeX[v]) + "}=" + (LaTeX[v_{lambda}]) + ""
q: Vector[Q] - v_{lambda}