D.B. wrote:I'm not sure about this factor of [imath]\sqrt{2}[/imath] scaling people are performing on AP. Imagine for a moment we were to rotate the cube around the edge AE until plane AEHD is parallel to our viewing plane (i.e. as if it were parallel to your computer screen). At this point we would expect the projection of AEHD to be a square, and for P to be coincident with D*. If we scale AP by [imath]\sqrt{2}[/imath] that will not occur, so something must be wrong.

You are quite correct. My above experiment supposedly confirming the √2 factor merely confirmed it in the special case when the cube is rotated 45° with respect to the coordinate axes. A more general calculation will reveal what is going on.

In my previous example, we put the vanishing points at y=±1. Instead, suppose we put one vanishing point at y=tan t. The other vanishing point must then be at y=-cot t (this corresponds to a cube rotated at an angle of t with respect to the coordinate axes - the reason for this is a good exercise for the reader). Now, let the nearest vertex of the bottom face of the cube have coordinates (a,b,c), and suppose the side of the cube is 1 unit. Then we will have other vertices at (a+cos t,b+sin t,c), (a+sin t, b-cos t, c), (a+cos t+sin t,b+sin t-cos t,c), and also (*,*,c+1) where (*,*,c) is one of the points already named. In that case, projecting onto the plane x=1 and dropping the first coordinate, the vertices A, B, D, and C will be at $$\left( \frac{b}{a}, \frac{c}{a}\right) \left(\frac{b+\sin t}{a+\cos t}, \frac{c}{a+\cos t} \right), \left(\frac{b-\cos t}{a+\sin t}, \frac{c}{a+\sin t} \right), \text{ and }\left (\frac{b+\sin t-\cos t}{a+\cos t+\sin t}, \frac{c}{a+\cos t+\sin t} \right),$$ respectively.

If we redo my previous calculation with these points, we get:

vertical distance AE: (1/a)

equation for line CB: z = c(y+cot t)/(b + csc t + a cot t)

equation for line CD: z = c(y-tan t)/(b - sec t - a tan t)

intersection between line CB and horizontal line through A: y = b/a+(1/a)csc t

ratio of distance from intersection to A to distance AE: csc t

intersection between line CD and horizontal line through A: y = b/a-(1/a)sec t

ratio of distance from intersection to A to distance AE: sec t

So instead of both legs being √2 times the length AE, one leg should be csc t times that length, and the other should be sec t times the length, where t measures the angle that the cube is rotated with respect to the coordinate axes. Since t was 45° in the previous example, we had √2 for both. (All this is assuming the bottom face is horizontal - someone else can deal with arbitrary orientations.) This explains why setting both at √2 yields good pictures - it is correct for a certain special case, but is not fully general.

I'm looking forward to the day when the SNES emulator on my computer works by emulating the elementary particles in an actual, physical box with Nintendo stamped on the side.

"With math, all things are possible." —Rebecca Watson