$\newcommand{\icol}[1]{% inline column vector \left(\begin{smallmatrix}#1\end{smallmatrix}\right)% }$ $\newcommand{\irow}[1]{% inline row vector \begin{smallmatrix}(#1)\end{smallmatrix}% }$ I have a line in three dimensions:
$P_0,V \in \mathbb R^3, t \in \mathbb R \\ P_0 = \icol{X_0\\Y_0\\Z_0} \\ V = \icol{X_v\\Y_v\\Z_v} \\ P(t) = P_0 + tV$
Now I want to project it into two dimensions like this:
$p(t) = \frac{\icol{X_0+tX_v\\Y_0+tY_v}}{Z_0+tZ_v}$
And reparametrize $p(t)$ in the form
$p(s) = p_0 + sv\\ p_0,v \in \mathbb R^2, s \in \mathbb R $
However I'm having trouble since $s$ is nonlinearly dependent on $t$. How do I figure out what $s(t)$ is in relationship to $t$, and then how do I get $v$?
I know that $p_0 = \icol{X_0/Z_0\\Y_0/Z_0}$ because that's the point when $t=0$.
If you’ve got a compelling reason for knowing how the new parameter $s$ is related to $t$, see jnez71’s answer for a convenient reparameterization. Otherwise, there’s a fairly straightforward way to produce a parameterization of the projection of the line in the form $p_0+sv$.
In a projective space, a line can be described as the join of a pair of point. In homogeneous coordinates, this means the set of combinations $\lambda\mathbf p+\mu\mathbf q$ of the points $\mathbf p$ and $\mathbf q$ with $\lambda$ and $\mu$ not both zero. Since a perspective projection $\mathtt P$ is a linear projection of the perspective space, $\mathtt P(\lambda\mathbf p+\mu\mathbf q)=\lambda\mathtt P\mathbf p+\mu\mathtt P\mathbf q$, that is, the image of the join of a pair of points is the join of their images.
Your line is the join of a finite point $P_0$ and the point at infinity that corresponds to the direction vector $V$, i.e., in homogeneous coordinates it’s $$\lambda[X_0:Y_0:Z_0:1]+\mu[X_v:Y_v:Z_v:0].$$ The projections of these two points are $\mathbf p=[X_0:Y_0:Z_0]$ and $\mathbf q=[X_v:Y_v:Z_v]$, respectively. Note that the image of the direction vector isn’t necessarily a point at infinity. It’s the vanishing point of lines parallel to $V$, which may well be finite. Conversely, the image of $P_0$ will be a point at infinity if $P_0$ lies in the $z=0$ plane.
Now, examine the $z$-coordinates. If $Z_0\ne0$ and $Z_V=0$, then set $p_0=\left({X_0\over Z_0},{Y_0\over Z_0}\right)$ and $v=(X_v,Y_v)$, i.e., to the (inhomogenous) Cartesian equivalents of $\mathbf p$ and $\mathbf q$, respectively; if $Z_0=0$ and $Z_v\ne0$, then swap $\mathbf p$ and $\mathbf q$ in the preceding. If both are zero, then your original line was in the $z=0$ plane and its image is the line at infinity, which has no finite points. Finally, if both $Z_0\ne0$ and $Z_v\ne0$, then you can parameterize the line as $(1-s)p+sq$, i.e., $p+s(q-p)$, where $p=\left({X_0\over Z_0},{Y_0\over Z_0}\right)$ and $q=\left({X_v\over Z_v},{Y_v\over Z_v}\right)$, the respective Cartesian equivalents of $\mathbf p$ and $\mathbf q$. (We only need one parameter here because we only care about the finite points on the line, all of which can be reached by setting the coefficient of one of the finite points $\mathbf p$ or $\mathbf q$ to a non-zero constant.)