Question: How can one translate a perpendicular along parallel lines to a given point?
Here is the problem. Given a curve $\mathscr{C}$ (blue), a point $A\in \mathscr{C}$, the tangent line $T_A$ (green) at $A$, the line $L_A$ (orange) going through the origin parallel to $T_A$, and the orthogonal projection $P(A)$ of the plane onto $T_A$, and a point $B$ not on $\mathscr{C}$, and $E=P(A)A$ and $D=P(A)B$, the orthogonal projections of the points $A$ and $B$ onto $L_A$. Find the point $C\in T_A$ such that $DC$ is orthogonal to $T_A$ (and hence $L_A$), where again $D=P(A)B$. In otherwords, extend the line $DB$ down to $T_A$, maintain the perpendicularity.
Intuitively, we are translating the line $AE$ along the line $T_A$ until one of the endpoints reaches $D=P(A)B$. How do we do this?

While writing out the question here, I believe I figured it out algebraically so I figured a Q&A cannot hurt. The answer is that $$C(B) = P(A)(B-A)+A$$ is the orthogonal projection of the plane $\mathbb{R}^2$ onto the tangent line $T_A$ of the curve $\mathscr{C}$ at $A$.
Proof: Indeed, we need the translation of $E=P(A)A$ to land at $D=P(A)B$. That is we need a point $T$ such that $E+T=D$. It follows that $x_T = x_D-x_E$ and $y_T = y_D-y_E$, hence $$T=D-E=P(A)B-P(A)A=P(A)(B-A),$$ but this needs to be applied to the point $A$ to translate along $T_A$ instead of along $L_A$. Thus, we set $$C=A+T=A+P(A)(B-A),$$ proving the claim.
Here is the picture reproduced with the output point $C$ as defined above: