
508 Chapter 11 Intersection in 3D
x
y
z
z
x
y
h
r
T
Figure 11.11 Parameterized standard cylinder representation.
Pure standard representation: The object’s base is at the origin, its axis is aligned
with one of the local frame’s basis vectors, and the radius and height are 1. Asso-
ciated with the object is a transformation matrix M that translates and rotates the
cylinder to the desired position and that scales its dimensions to give it arbitrary
size and proportions (as well as allowing for elliptical cylinders).
Parameterized standard representation: Similar to the “pure” representation, but
the radius and height are parameters, and the axis may be any one of the three
basis vectors of the local frame. Variations on this might allow for a specification
of a height, a ratio of radius to height, and so on. See Figure 11.11.
General representation: The cylinder is specified by a centerpoint C, an axis
vector ˆa,radiusr, and some scheme for specifying the extent of the cylinder (i.e.,
the location of the end caps). Extent specification varies from system to system,
but a typical approach is to put one end cap at C and another at a distance from
C (i.e., the height). See Figure 11.12.
We’ll give an algorithm for computing the intersection of linear components
with only a parameterized standard representation. An algorithm that can handle
the completely general case could also be employed for the standard representations,
and you could argue for that algorithm instead. You could also argue that if you have
transformed a standard cylinder to its world-space location, then ray intersection,
for example, wouldn’t require you to transform the ray into the cylinder’s local space,
and then transform the intersection point(s) back into world space. All this may be
true, but in nearly all 3D applications and libraries providing cylinders (and cones,
etc.), geometric objects are organized by a scene graph, in which transformations
are inherited down the tree. Because components like cylinders are located, sized,