Projecting 3D Position Vector / Point onto a Line That Doesn't Go Through Origin

185 Views Asked by At

I have position vector $\vec{P}$ with component $\langle0,2,1\rangle$, and line $l$ with equation $\langle2t,2t,2\rangle$ where $\vec{V}$ is the direction vector $\langle2,2,0\rangle$. My question is how to project $\vec{P}$ onto $l$ ? If $l$ doesn't go through $(0,0,2)$ and it goes through origin i could've easily project $\vec{P}$ onto $l$ by projecting it onto $\vec{V}$. Can i just go ahead and project $\vec{P}$ onto $\vec{V}$ then translate it 2 unit up and call that projection of $\vec{P}$ onto $l$ ?