Chapter Twelve

The Cross Ratio

November-December 1998

Geometry is the study of what properties of a figure stay the same as the figure undergoes some transformation. For example, in Euclidean geometry, the allowable transformations are rotations and translations. Properties that stay constant include distances and angles. For projective geometry, such as we use with homogeneous coordinates, the transformations include perspective projections. In this case, one thing that emphatically does not stay the same is geometric length. A property that does, however, is something called the cross ratio. Take a look at Figure 12.1 where lines p, q, r, and s all intersect at the same point; the cross ratio is the ratio of the ratios of the following distances:

χ=|AB|/|BD||AC|/|CD|

si1_e

This value is constant no matter where line m is placed. It is also constant if the whole diagram undergoes a homogeneous transformation (possibly including perspective).

f12-01-9781558608603
Figure 12.1 The cross ratio

This has always puzzled me. If geometric distances aren't preserved, and ratios of geometric distances aren't preserved, then how come the ratio of ratios of geometric distances is preserved? Well, here's a quick demonstration.

The First Ratio

Let's begin by calculating the Euclidean distance between points A and B. I'll start with the 2D homogeneous coordinates of each point, which I will name as follows:

A=[AxAyAw]B=[BxByBw]

si2_e

To calculate a Euclidean distance, we must turn these into the “real” coordinates by dividing out the homogeneous w coordinate giving the two 2D Euclidean points:

[AxAwAyAw]and[BxBwByBw]

si3_e

Then subtract giving

[AxAwBxBwAyAwByBw]

si4_e

The desired distance is the length of this 2D vector. The fact that this quantity doesn't treat all three of the x, y, and w components symmetrically is a hint that Euclidean distance is not a meaningful concept in projective geometry.

Anyway, if we bash ahead to get the Euclidean length of the above vector, we would need to calculate the square root of the sum of the squares of these two components—wotta pain. Instead, let's pretend for a minute that the line m is horizontal and points A … D line up horizontally. In that case, the length of the vector is just the x component of the vector. In other words,

AxAwBxBw=|AB|

si5_e

In general, though, the line will be at some angle θ. In this case, the x component will equal the length times the cosine of the tilt angle, or

AxAwBxBw=|AB|cosθ

si6_e

For the collinear segment BD, tipped by the same angle θ the x component would be

BxBwDxDw=|BD|cosϑ

si7_e

Here's where the first ratio will come in to simplify life. The top half of our desired cross ratio is the ratio between these segment AB and segment BD. And, by similarity, the ratio of the x components is the same as the ratio of the lengths. Taking the ratio of the above two equations, we find

AxAwBxBwBxBwDxDw=|AB|cosϑ|BD|cosϑ=|AB||BD|

si8_e

The angle dependency cancels. Yay! We can calculate the ratio of lengths without any squaring and square rooting.

The Second Ratio

Now let's look at the second ratio in the “ratio of ratios” game. Remember that what we are really interested in is

χ=|AB|/|BD||AC|/|CD|

si9_e

A little algebra on the AB/BD ratio turns it into

|AB||BD|=DwAw(AxBwAwBxBxDwBwDx)

si10_e

And by going through the same schtick, but everywhere changing B to C, we can see that the second of our two ratios is

|AC||CD|=DwAw(AxCwAwCxCxDwCwDx)

si11_e

Now we can see why the ratio of ratios is something interesting homogeneously—it lets us cancel the ugly w component ratios. The whole cross ratio then boils down to

χ=|AB|/|BD||AC|/|CD|=AxBwAwBxBxDwBwDxCxDwCwDxAxCwAwCx

si12_e

This is much more symmetric in x, y, and w, and closer to the sort of thing we expect we can make homogeneously constant.

Constancy with Changing m

Now we can ask why this ratio is independent of the position of the line m. The root cause must have something to do with the fact that we generate the points A, B, C, and D from the lines p, q, r, and s that have the special relationship of all intersecting at the same point E.

First, then, here's a brief reminder of the relationship between homogeneous points and lines. You can calculate the point at the intersection of two lines by taking the cross product of the line vectors. This means that the point at the intersection of the four lines is any of the six quantities:

E=c1(p×q)=c2(q×r)=c3(r×s)=c4(p×r)=c5(q×s)=c3(p×s)

si13_e

The inclusion of the constants ci recognizes the fact that the cross products can represent the same intersection point even though there might be a homogeneous scale factor applied to all three of the x, y, and w components.

After some fooling around, I have found that, for our purposes, the neatest algebraic way to use this relationship is to express the lines q and r in terms of p and s. I'll write this as

q=qαp+qβsr=rαp+rβs

si14_e  (12.1)

You can think of the pairs [qαqβ]si15_e and [rαrβ]si16_e as ID homogeneous coordinates for the collection of lines passing through E, the intersection of p and s. Any point passing through this intersection has an [αβ]si17_e pair that describes it. Any nonzero multiple of an [αβ]si18_e pair represents the same line though.

Now, let's relate this to our points. Remember, the cross product is how we intersect lines, so we have

A=p×mB=q×mC=r×mD=s×m

si19_e

Write the interior point B in terms of the outside lines and points:

B=q×m=(qαp+qβs)×m=qα(p×m)+qβ(s×m)=qαA+qβD

si20_e

We can then write the top half of the cross ratio as

|AB|/|BD|=AwDwAxBwAwBxBxDwBwDx    =AwDwAx(qαAw+qβDw)Aw(qαAx+qβDx)(qαAx+qβDx)Dw(qαAw+qβDw)Dx    =AwDwqβAxDwqβAwDxqαAxDwqαAwDx    =AwDwqβqα

si21_e

Again, run through this derivation with C instead of B, and you get

|AC|/|CD|=AwDwrβrα

si22_e

The net cross ratio is now

χ=|AB|/|BD||AC|/|CD|=qβ/qαrβ/rα

si23_e

The interesting thing about this is that the whole dependence on the location of m has disappeared, as well as the dependence on which coordinate (here we used x) we chose to use as the measure of distance ratios. That is, it is only dependant on the orientations of the lines q and r relative to P and s. Any line msi24_e intersecting these will generate the same cross ratio. The cross ratio is thus a property of the locations of the four original lines, rather than the extra line m.

As another way of looking at this, start with the equations in (12.1) and cross them with P and s:

q×p=qαp×p+qβs×p=qβs×pq×s=qαp×s+qβs×s=qβp×sr×p=rαp×p+qβs×p=qβs×pr×s=rαp×s+qβs×s=qβp×s

si25_e

These are four vector equations. Turn them into scalars by dotting them with m:

mq×p=qβms×pmq×s=qβmp×smr×p=qβms×pmr×s=qβmp×s

si26_e

And now you can write the cross product in the following form:

x=qβrαqαrβ=(mq×p)(mr×s)(mq×s)(mr×p)

si27_e

Here's another key fact: χ contains only the ratios of the alpha/beta pairs, so it is also independent of arbitrary homogeneous scalings of the vector for q and r. For example, if we replaced q with γsi28_eq (geometrically the same line), it means that we are scaling both qαsi29_e and qβsi30_e by γsi31_e, which will again cancel out in the formula for χ

Constancy under Perspective

Now let's see why the cross ratio is unchanged when we transform the four lines via an arbitrary transformation matrix. If we have a transformation T that changes our outer two lines as

p=Tps=Ts

si32_e

the inner lines will be

q=Tq=T(qαp+qβs)=qαTp+qβTs=qαp+qβs

si33_e

And similarly

r=rαp+rβs

si34_e

Even if we try to disguise line qsi35_e or rsi36_e by multiplying by some homogeneous scale, we get the same value of cross ratio—the ratio of ratios:

χ=qβ/qαrβ/rα

si37_e

A particularly interesting special case of this occurs when we take the outside lines p and s as the x and y axes, and transform by a simple nonuniform scale factor. Numerically, this would be

p=[100],q=[qαqβ0],r=[rαrβ0]s=[010]   T=[fx000fy0001]

si377_e

From this we get

p=[fx00],q=[fxqαfyqβ0],r=[fxrαfyrβ0]s=[0fy0]

si379_e

The alpha and beta components of q and r have changed to

qα=fxqα,qβ=fyqβrα=fxrα,rβ=fyrβ

si38_e

The lines p and s haven't moved, but the lines q and r both have. And the ratios of the [α,β]si39_e values of the lines q and r are different:

qβ/qα=fyfx(qβ/qα)rβ/rα=fyfx(rβ/rα)

si40_e

But sure enough, the ratio of ratios remains the same:

χ=qβ/qαrβ/rα=qβ/qαrβ/rα

si41_e

In other words, even though a transformation might not move the outside lines p and s, it will move the inside lines q and r in such a manner that the change in the ratio (qβ/qα)si42_e is matched by the same change in the ratio (rβ/rα)si43_e

Summary

The cross ratio is as much a property of the four mutually intersecting lines p, q, r, and s as it is of the four collinear points A, B, C, and D. Any line m that you throw across the lines will generate four points with the same cross ratio.

You can, in turn, take any four collinear points A, B, C, and D, and throw various collections of four mutually intersecting lines through them. Each of these line collections will have the same cross ratio. Finally, you can project any of these figures perspectively and also get an unchanged cross ratio.

The true homogeneous nature of the cross ratio can best be seen by writing it as

χ=qβrαqαrβ

si44_e

and reviewing the effect of an arbitrary homogeneous scaling on each of the four lines. Remember that

q=qαp +qβsr=rαp +rβs

si45_e  (12.21)

 Scaling only q will scale both qα and qβ but this cancels out.

χ=qβraqarβ

si88_e


 Scaling only r will scale rα and rβ, but these will cancel:

χ=qβraqarβ

si89_e


 Scaling only p will require inversely scaling qaand ra to keep q and r the same in Equation (12.1). These again cancel:

χ=qβraqarβ

si90_e


 Scaling only s will require inversely scaling qβ and rβ. Same song, new verse:

χ=qβraqarβ

si91_e


From this, we can see the necessity of this arrangement of ratio of ratios in constructing a quantity that remains homogeneously meaningful.

So, even though perspective transformations do not preserve distances, or ratios of distances, they do preserve these ratios of ratios of distances.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.2.149