Graphics Programs Reference
In-Depth Information
3.8 A Coordinate-Free Approach: I
The discussion of general perspective in the previous sections is based on points and their
coordinates relative to a three-dimensional coordinate system. This section presents
a coordinate-free approach to the same problem that is based on vectors and vector
operations. The location of the origin and the directions of the coordinate axes are not
needed, although they may serve to illuminate the particular geometry of the examples
presented here. The term “point” is still used, but we refer to a point in terms of the
vector connecting it with the origin instead of as a triplet ( x, y, z ) of coordinates.
Figure 3.36a shows a viewer at point B looking in an arbitrary direction a .The
screen is, as always, perpendicular to the line of sight a , and we assume that
= k> 0.
The center of the screen is at point C . Note that vector a gives both the direction of
view of the viewer and the distance between the viewer and the screen.
|
a
|
Screen
y
Viewer
B
Screen
a
C
b
C
d b
c
a
P *
d
B
P
e
P *
p
P
z
Origin
(a)
(b)
Figure 3.36: (a) General Perspective with Vectors. (b) Example.
The derivation of the projection is surprisingly easy. We select an arbitrary point
P on the other side of the screen from the viewer and connect it with the viewer. The
intersection of line BP and the screen is the projected point P . Vector b indicates the
position of the viewer. Vector c indicates the direction CP on the screen. Vector d is
the position vector of point P . Vector e connects B to P . Vector p points from the
origin to point P . Vector d
b connects point B to point P .
Vector p is the sum p = b + e , which implies e = p
b .From d = b + a + c ,weget
c = d
b
a . Vector d
b is in the direction of e ,sowecanwrite d
b = α e = α ( p
b ),
where α is a real number. This implies c = α ( p
b )
a or
d = b + a + c = b + α ( p
b ) .
(3.15)
Since the line of sight is perpendicular to the screen, we can write a c =0,which
implies a
[ α ( p
b )
a ]=0,or α a
( p
b )= a
a ,or
2
|
a
|
α =
b ) .
(3.16)
a
( p
 
Search WWH ::




Custom Search