Projective transformation
Let X be a point on the x-axis. A projective transformation can be defined geometrically for this line by picking a pair of points P, Q, and a line m, all within the same x-y plane which contains the x-axis upon which the transformation will be performed.
Points P and Q represent two different observers, or points of view. Point R is the position of some object they are observing. Line m is the objective world which they are observing, and the x-axis is the subjective perception of m.
Draw line l through points P and X. Line l crosses line m at point R. Then draw line t through points Q and R: line t will cross the x-axis at point T. Point T is the transform of point X [Paiva].
The above is a synthetic description of a one-dimensional projective transformation. It is now desired to convert it to an analytical (Cartesian) description.
Let point X have coordinates (x_{0},0). Let point P have coordinates $(P_{x},P_{y})$. Let point Q have coordinates $(Q_{x},Q_{y})$. Let line m have slope m (m is being overloaded in meaning).
The slope of line l is
- $P_{y} \over P_{x}-x_{0},$
so an arbitrary point (x,y) on line l is given by the equation
- ${y \over x-x_{0}}={P_{y} \over P_{x}-x_{0}}$,
- $y={P_{y} \over P_{x}-x_{0}}(x-x_{0}).\qquad \qquad (1)$
On the other hand, any point (x,y) on line m is described by
- $y=mx+b.\qquad \qquad (2)$
The intersection of lines l and m is point R, and it is obtained by combining equations (1) and (2):
- $mx+b={P_{y}x \over P_{x}-x_{0}}-{P_{y}x_{0} \over P_{x}-x_{0}}.$
Joining the x terms yields
- $\left({P_{y} \over P_{x}-x_{0}}-m\right)x=b+{P_{y}x_{0} \over P_{x}-x_{0}}$
and solving for x we obtain
- $x_{1}={b(P_{x}-x_{0})+P_{y}x_{0} \over P_{y}-m(P_{x}-x_{0})}.$
x_{1} is the abscissa of R. The ordinate of R is
- $y_{1}=m\left[{b(P_{x}-x_{0})+P_{y}x_{0} \over P_{y}-m(P_{x}-x_{0})}\right]+b.$
Now, knowing both Q and R, the slope of line n is
- ${y_{1}-Q_{y} \over x_{1}-Q_{x}}.$
We want to find the intersection of line n and the x-axis, so let
- $(Q_{x},Q_{y})+\lambda (x_{1}-Q_{x},y_{1}-Q_{y})=(x,0)\qquad \qquad (3)$
The value of λ must be adjusted so that both sides of vector equation (3) are equal. Equation (3) is actually two equations, one for abscissas and one for ordinates. The one for ordinates is
- $Q_{y}+\lambda (y_{1}-Q_{y})=0$
Solve for lambda,
- $\lambda ={-Q_{y} \over y_{1}-Q_{y}}\qquad \qquad (4)$
The equation for abscissas is
- $x=Q_{x}+\lambda (x_{1}-Q_{x})$
which together with equation (4) yields
- $x=Q_{x}-Q_{y}\left({x_{1}-Q_{x} \over y_{1}-Q_{y}}\right)\qquad \qquad (5)$
which is the abscissa of T.
Substitute the values of x_{1} and y_{1} into equation (5),
- $x=Q_{x}-Q_{y}\left[{{b(P_{x}-x_{0})+P_{y}x_{0} \over P_{y}-m(P_{x}-x_{0})}-Q_{x} \over {mb(P_{x}-x_{0})+mP_{y}x_{0} \over P_{y}-m(P_{x}-x_{0})}+b-Q_{y}}\right].$
Dissolve the fractions in both numerator and denominator:
- $x=Q_{x}-Q_{y}\left[{b(P_{x}-x_{0})+P_{y}x_{0}-Q_{x}P_{y}+mQ_{x}(P_{x}-x_{0}) \over mb(P_{x}-x_{0})+mP_{y}x_{0}+bP_{y}-mb(P_{x}-x_{0})-Q_{y}P_{y}+mQ_{y}(P_{x}-x_{0})}\right].$
Simplify and relabel x as t(x):
- $t(x)=Q_{x}-Q_{y}\left[{(P_{x}-x_{0})(b+mQ_{x})+P_{y}(x_{0}-Q_{x}) \over (P_{x}-x_{0})mQ_{y}+P_{y}(mx_{0}+b-Q_{y})}\right].$
t(x) is the projective transformation.
Transformation t(x) can be simplified further. First, add its two terms to form a fraction:
- $t(x)={(mQ_{x}P_{y}-Q_{y}P_{y}+bQ_{y})x_{0}+(bQ_{x}P_{y}-bQ_{y}P_{x}) \over m(P_{y}-Q_{y})x_{0}+(mP_{x}Q_{y}+P_{y}(b-Q_{y}))}\qquad \qquad (6)$
Then, define the coefficients α, β, γ and δ to be the following
- $\alpha =mQ_{x}P_{y}-Q_{y}P_{y}+bQ_{y},$
- $\beta =bQ_{x}P_{y}-bQ_{y}P_{x},$
- $\gamma =m(P_{y}-Q_{y}),$
- $\delta =mP_{x}Q_{y}+P_{y}(b-Q_{y}).$
Substitute these coefficients into equation (6), in order to produce
- $t(x)={\alpha x+\beta \over \gamma x+\delta }$
This is the Möbius transformation or linear fractional transformation.
It is clear from the synthetic definition that the inverse transformation is obtained by exchanging points P and Q. This can also be shown analytically. If P ↔ Q, then α → α′, β → β′, γ → γ′, and δ → δ′, where
- $\alpha '=mP_{x}Q_{y}-P_{y}Q_{y}+bP_{y}=\delta ,$
- $\beta '=bP_{x}Q_{y}-bP_{y}Q_{x}=-\beta ,$
- $\gamma '=m(Q_{y}-P_{y})=-\gamma ,$
- $\delta '=mQ_{x}P_{y}+bQ_{y}-Q_{y}P_{y}=\alpha .$
Therefore if the forwards transformation is
- $t(x)={\alpha x+\beta \over \gamma x+\delta }$
then the transformation t′ obtained by exchanging P and Q (P ↔ Q) is:
- $t'(x)={\delta x-\beta \over -\gamma x+\alpha }.$
Then
- $t'(t(x))={\delta \left({\alpha x+\beta \over \gamma x+\delta }\right)-\beta \over -\gamma \left({\alpha x+\beta \over \gamma x+\delta }\right)+\alpha }$.
Dissolve the fractions in both numerator and denominator of the right side of this last equation:
- $t'(t(x))={\alpha \delta x+\beta \delta -\beta \gamma x-\beta \delta \over -\alpha \gamma x-\beta \gamma +\alpha \gamma x+\alpha \delta }$
- $={\alpha \delta x-\beta \gamma x \over \alpha \delta -\beta \gamma }=x$.
Therefore t′(x) = t^{−1}(x): the inverse projective transformation is obtained by exchanging observers P and Q, or by letting α ↔ δ, β → −β, and γ → −γ. This is, by the way, analogous to the procedure for obtaining the inverse of a two-dimensional matrix:
- ${\begin{bmatrix}\alpha &\beta \\\gamma &\delta \end{bmatrix}}{\begin{bmatrix}\delta &-\beta \\-\gamma &\alpha \end{bmatrix}}=\Delta {\begin{bmatrix}1&0\\0&1\end{bmatrix}}$
where Δ = α δ − β γ is the determinant.
Also analogous with matrices is the identity transformation, which is obtained by letting α = 1, β = 0, γ = 0, and δ = 1, so that
- $t_{I}(x)=x.$
Composition of transformations[edit | edit source]
It remains to show that there is closure in the composition of transformations. One transformation operating on another transformation produces a third transformation. Let the first transformation be t_{1} and the second one be t_{2}:
- $t_{1}(x)={\alpha _{1}x+\beta _{1} \over \gamma _{1}x+\delta _{1}},$
- $t_{2}(x)={\alpha _{2}x+\beta _{2} \over \gamma _{2}x+\delta _{2}}.$
The composition of these two transformations is
- $t_{2}(t_{1}(x))={\alpha _{2}\left({\alpha _{1}x+\beta _{1} \over \gamma _{1}x+\delta _{1}}\right)+\beta _{2} \over \gamma _{2}\left({\alpha _{1}x+\beta _{1} \over \gamma _{1}x+\delta _{1}}\right)+\delta _{2}}$
- $={\alpha _{2}\alpha _{1}x+\alpha _{2}\beta _{1}+\beta _{2}\gamma _{1}x+\beta _{2}\delta _{1} \over \gamma _{2}\alpha _{1}x+\gamma _{2}\beta _{1}+\delta _{2}\gamma _{1}x+\delta _{2}\delta _{1}}$
- $={(\alpha _{2}\alpha _{1}+\beta _{2}\gamma _{1})x+(\alpha _{2}\beta _{1}+\beta _{2}\delta _{1}) \over (\gamma _{2}\alpha _{1}+\delta _{2}\gamma _{1})x+(\gamma _{2}\beta _{1}+\delta _{2}\delta _{1})}.$
Define the coefficients α_{3}, β_{3}, γ_{3} and δ_{3} to be equal to
- $\alpha _{3}=\alpha _{2}\alpha _{1}+\beta _{2}\gamma _{1},$
- $\beta _{3}=\alpha _{2}\beta _{1}+\beta _{2}\delta _{1},$
- $\gamma _{3}=\gamma _{2}\alpha _{1}+\delta _{2}\gamma _{1},$
- $\delta _{3}=\gamma _{2}\beta _{1}+\delta _{2}\delta _{1}.$
Substitute these coefficients into $t_{2}(t_{1}(x))$ to obtain
- $t_{2}(t_{1}(x))={\alpha _{3}x+\beta _{3} \over \gamma _{3}x+\delta _{3}}.$
Projections operate in a way analogous to matrices. In fact, the composition of transformations can be obtained by multiplying matrices:
- ${\begin{bmatrix}\alpha _{2}&\beta _{2}\\\gamma _{2}&\delta _{2}\end{bmatrix}}{\begin{bmatrix}\alpha _{1}&\beta _{1}\\\gamma _{1}&\delta _{1}\end{bmatrix}}={\begin{bmatrix}\alpha _{2}\alpha _{1}+\beta _{2}\gamma _{1}&\alpha _{2}\beta _{1}+\beta _{2}\delta _{1}\\\gamma _{2}\alpha _{1}+\delta _{2}\gamma _{1}&\gamma _{2}\beta _{1}+\delta _{2}\delta _{1}\end{bmatrix}}={\begin{bmatrix}\alpha _{3}&\beta _{3}\\\gamma _{3}&\delta _{3}\end{bmatrix}}.$
Since matrices multiply associatively, it follows that composition of projections is also associative.
Projections have: an operation (composition), associativity, an identity, an inverse and closure, so they form a group.
The cross-ratio defined by means of a projection[edit | edit source]
Let there be a transformation t_{s} such that t_{s}(A) = $\infty$, t_{s}(B) = 0, t_{s}(C) = 1. Then the value of t_{s}(D) is called the cross-ratio of points A, B, C and D, and is denoted as [A, B, C, D]_{s}:
- $[A,B,C,D]_{s}=t_{s}(D).$
Let
- $t_{s}(x)={\alpha x+\beta \over \gamma x+\delta },$
then the three conditions for t_{s}(x) are met when
- $t_{s}(A)={\alpha A+\beta \over \gamma A+\delta }=\infty ,\qquad \qquad (7)$
- $t_{s}(B)={\alpha B+\beta \over \gamma B+\delta }=0,\qquad \qquad (8)$
- $t_{s}(C)={\alpha C+\beta \over \gamma C+\delta }=1.\qquad \qquad (9)$
Equation (7) implies that $\gamma A+\delta =0$, therefore $\delta =-\gamma A$.
Equation (8) implies that $\alpha B+\beta =0$, so that $\beta =-\alpha B$.
Equation (9) becomes
- ${\alpha C-\alpha B \over \gamma C-\gamma A}=1,$
which implies
- $\gamma =\alpha {C-B \over C-A}.$
Therefore
- $t_{s}(D)={\alpha D-\alpha B \over \alpha \left({C-B \over C-A}\right)D-\gamma A}={\alpha (D-B) \over \alpha \left({C-B \over C-A}\right)D-\alpha \left({C-B \over C-A}\right)A}$
- $={D-B \over C-B}\;{C-A \over D-A}={A-C \over A-D}\;{B-D \over B-C}.\qquad \qquad (10)$
In equation (10), it is seen that t_{s}(D) does not depend on the coefficients of the projection t_{s}. It only depends on the positions of the points on the "subjective" projective line. This means that the cross-ratio depends only on the relative distances among four collinear points, and not on the projective transformation which was used to obtain (or define) the cross-ratio. The cross ratio is therefore
- $[A,B,C,D]={A-C \over A-D}\;{B-D \over B-C}.\qquad \qquad (11)$
Conservation of cross-ratio[edit | edit source]
Transformations on the projective line preserve cross ratio. This will now be proven. Let there be four (collinear) points A, B, C, D. Their cross-ratio is given by equation (11). Let S(x) be a projective transformation:
- $S(x)={\alpha x+\beta \over \gamma x+\delta }$
where $\alpha \delta \neq \beta \gamma$. Then
- $[S(A)S(B)S(C)S(D)]={{\alpha A+\beta \over \gamma A+\delta }-{\alpha C+\beta \over \gamma C+\delta } \over {\alpha A+\beta \over \gamma A+\delta }-{\alpha D+\beta \over \gamma D+\delta }}\cdot {{\alpha B+\beta \over \gamma B+\delta }-{\alpha D+\beta \over \gamma D+\delta } \over {\alpha B+\beta \over \gamma B+\delta }-{\alpha C+\beta \over \gamma C+\delta }}$
- $={[(\alpha A+\beta )(\gamma C+\delta )-(\alpha C+\beta )(\gamma A+\delta )][(\alpha B+\beta )(\gamma D+\delta )-(\alpha D+\beta )(\gamma B+\delta )] \over [(\alpha A+\beta )(\gamma D+\delta )-(\alpha D+\beta )(\gamma A+\delta )][(\alpha B+\beta )(\gamma C+\delta )-(\alpha C+\beta )(\gamma B+\delta )]}$
- $={[\alpha A\delta +\beta \gamma C-\alpha C\delta -\beta \gamma A][\alpha B\delta +\beta \gamma D-\alpha D\delta -\beta \gamma B] \over [\alpha A\delta +\beta \gamma D-\alpha D\delta -\beta \gamma A][\alpha B\delta +\beta \gamma C-\alpha C\delta -\beta \gamma B]}$
- $={[\alpha \delta (A-C)+\beta \gamma (C-A)][\alpha \delta (B-D)+\beta \gamma (D-B)] \over [\alpha \delta (A-D)+\beta \gamma (D-A)][\alpha \delta (B-C)+\beta \gamma (C-B)]}$
- $={(\alpha \delta -\beta \gamma )(A-C)(\alpha \delta -\beta \gamma )(B-D) \over (\alpha \delta -\beta \gamma )(A-D)(\alpha \delta -\beta \gamma )(B-C)}$
- $={A-C \over A-D}\cdot {B-D \over B-C}$
Therefore [S(A) S(B) S(C) S(D)] = [A B C D], Q.E.D.