Graphics Reference
In-Depth Information
Section 4.14
Let L 0 and L 1 be the directed lines through the origin in R 3 with direction vectors
(1,-1,0) and (1,1,0), respectively. Let R 0 and R 1 be the rotations about the directed lines
L 0 and L 1 , respectively, through angle p/3 and let M 0 and M 1 be the matrices that rep-
resent them. If M t , t Π[0,1], is the 1-parameter family of in-betweening matrices in
SO (3) between M 0 and M 1 , find M 1/2 ?
4.14.1
Section 4.15
4.15.1
Show that equations (4.31) compute the rotation T correctly.
4.17
P ROGRAMMING P ROJECTS
Section 4.5
4.5.1
A simpler graphics pipeline
The approach to clipping we described in Section 4.5 is more general than may be needed in
some simple situations. This project describes a quick way to deal with clipping if one already
has a two-dimensional clipper implemented. The basic idea is to do the z-clip in three dimen-
sions but then to project to the view plane and do the rest of the clipping with the old 2-dimen-
sional clipper. Since the far clipping plane is usually not very important, we shall ignore it and
only worry about the near clipping plane. Then a simple graphics pipeline for an object that is
either a point or a segment would go as follows:
(1)
Transform any vertex (x,y,z) of the object in shape coordinates to camera coordi-
nates (x¢,y¢,z¢).
(2)
Clip the resulting point or segment against the near clip plane.
(3)
Project any vertex (x¢,y¢,z¢) of the remaining object to the point (x≤,y≤) in the view
plane using the equations
xd x
z
¢
¢
d y
z
¢
¢
¢¢ =
and
y
¢¢ =
,
where d is the distance that the view plane is in front of the camera.
Clipping against the near clip plane is essential for two reasons. One is that we do not want
points from behind the camera to project to the front. The second is that we want to prevent
any division by zero. The clipping itself is very easy here. Assume that the near clipping plane
is defined in the camera coordinate system by the equation z = d n . Mathematically, clipping a
single point simply amounts to checking if z¢<d n or not. In the case of a segment, we have to
find the intersection of that segment with the plane.
Consider a world of rectangular blocks for this program. Each block is defined by three
real parameters a, b, and c and a frame f. The basic block is situated at the origin with faces
parallel to the coordinate planes and vertices (0,0,0), (a,0,0), (a,0,c), (0,0,c), (0,b,0), (a,b,0),
(a,b,c), and (0,b,c) and all other blocks are copies of this block moved by the frame f.
Search WWH ::




Custom Search