Graphics Programs Reference
In-Depth Information
relation is ( x, y )= D (cos θ, sin θ ), where D is th e distance (projected on the xy plane)
of P from the origin. This distance is x 2 + y 2 . Fromthisweget
( x, y )
x 2 + y 2
=(cos θ, sin θ ) ,
or
=arctan y
x
.
y
x 2 + y 2
x
x 2 + y 2
θ = arcsin
= arccos
Notice that the signs of x and y determine the quadrant number. If θ is in quadrant III
or IV, then y should be negative.
The z coordinate is determined by perspective projection. Figure 4.21d shows
how this is done with similar triangles:
= z
z
D
z = zR
D
zY
π x 2 + y 2 .
R
=
Exercise 4.9: It seems that the projected point P is given by
( x ,y ,z )= 0 ,
,
zY
π x 2 + y 2
±
Rθ,
so its coordinates depend on x , y , z ,and Y, but not on Z . What's the explanation?
The panoramic projection leads naturally to the concept of curved perspective (see
also Section 4.8). This concept comes up when we consider the panoramic projection of
a straight line. Figure 4.22a shows a cylinder and a line A in space. Several projection
lines are shown going from A to the center of the cylinder. These lines are contained in a
plane L , and we know from elementary geometry that the intersection of a cylinder and
a plane is, in general, an ellipse (Figure 4.22b). The projection of A on the cylinder is
therefore an elliptical arc. When the cylinder is unrolled, this arc turns into a sinusoidal
curve(Figure4.22c).
Exercise 4.10: Provethisclaim!
This behavior means that the panoramic projection converts straight lines into
curves, resulting in what can be termed curved perspective . Two special cases should
be considered. One is when the plane is perpendicular to the cylinder (corresponding
to an angle θ =0 in Figure Ans.15, page 271), and the other occurs when it is parallel
to the axis of the cylinder (corresponding to an angle θ =90 in Figure Ans.15). In the
former case, the intersection is a circle and the sinusoidal curve has zero amplitude (i.e.,
it degenerates into a straight segment). In the latter case, the intersection is an infinite
ellipse and the sinusoidal curve has infinite amplitude; it degenerates into three lines.
Figure 4.22d shows an observer positioned at the center of a cylinder and looking
to the north. Three horizontal infinitely long lines are shown. The projections of lines
1 and 3 are ellipses and become the sinusoids shown in Figure 4.22e. The projection
Search WWH ::




Custom Search