You are on page 1of 7

Scanline Rendering of Parametric Surfaces*

Dino Schweitzer
and
Elizabeth S. Cobb

C o m p u t e r Science D e p a r t m e n t
U n i v e r s i t y of U t a h
Salt L a k e City, U t a h 84112

Abstract
1. Introduction
A scanline a l g o r i t h m is described which renders Full-color s h a d e d r a s t e r i m a g e s can often
bicubic patches directly from the p a r a m e t r i c convey more useful information about the shape of
description without producing a polygonal p a r a m e t r i c surfaces t h a n the b e t t e r established line-
approximation. The a l g o r i t h m is p a r t i a l l y based on d r a w i n g displays. Shaded r a s t e r i m a g e s have g r e a t
e a r l i e r work by Whitted. A p r i m i t i v e object, called a p o t e n t i a l for use in computer-aided design systems
"curved-edge polygon", is defined, and an a l g o r i t h m because of t h e i r h i g h e r information content and
for b r e a k i n g down a bicubic patch into the p r i m i t i v e m i n i m a l a m b i g u i t y . However, t h e r e is no general
objects is described. A general surface intersection class of a l g o r i t h m s for g e n e r a t i n g such images. The
method is employed to provide a r o b u s t silhouette continued study of methods for generation of r a s t e r
edge detector. Shades are computed by calculating a i m a g e s of smooth surfaces is crucial if designers are to
cubic a p p r o x i m a t i o n to the n o r m a l surface and be able to use t h e full power of h i g h - q u a l i t y computer
performing either a cubic or a l i n e a r interpolation of graphics.
the bounding edge n o r m a l s across the scanline.
Subdivision of p a r a m e t r i c surfaces is used to reduce Scanline r e n d e r i n g methods are an i m p o r t a n t
the complexity of the surfaces being rendered, subset of r e n d e r i n g algorithms for r a s t e r devices
providing d r a m a t i c i m p r o v e m e n t in the results of both because t h e y m a k e use of coherence to produce images
the silhouette detector and the s h a d i n g methods. faster t h a n other r a s t e r methods. M a n y scanline
r e n d e r i n g a l g o r i t h m s for polygons are well known,
b u t t h e r e are few, if any, t r u l y satisfactory methods
for r e n d e r i n g p a r a m e t r i c a l l y defined ~urfaces in
scanline order.
CR Categories and Subject Descriptors: 1.3.3
[Computer Graphics]: Picture/Image G e n e r a t i o n
Display algorithms; 1.3.5 [Computer Graphics]: This p a p e r describes an a l g o r i t h m which
C o m p u t a t i o n a l G e o m e t r y and Object Modeling r e n d e r s bicubic patches in a scanline m a n n e r directly
- Curve, surface, solid and object representations; 1.3.7 from the p a r a m e t r i c surface description and without
[Computer Graphics]: Three-Dimensional Graphics recourse to polygonal approximation. Problems which
and Realism - Color, shading, shadowing and texture. are addressed include:
- deciding w h a t are the characteristics of a
General Term: Algorithms patch which can be rendered "easily" in
scanline order
- d e c i d i n g how more complicated patches
can be subdivided into this simpler type of
patch
*This work was supported in p a r t by the N a t i o n a l - d e v i s i n g a method for tracing out curved
Science F o u n d a t i o n (MCS-8004116) and the U.S. edges in scanline order
A r m y Research Office (DAAG29-81K-0111).
- providing a method for calculating
silhouette edges
- devising a n a l g o r i t h m for assigning
Permission to copy without fee all or part of this material is granted shades at each point on the patch
provided that the copies are not made or distributed for direct
commercial advantage, the ACM copyright notice and the title of the
publication and its date appear, and notice is given that copying is by
permission of the Association for Computing Machinery. To copy 2. Background
otherwise, or to republish, requires a fee and/or specific permission. Some b a c k g r o u n d in the a r e a of scanline
r e n d e r i n g of p a r a m e t r i c surfaces is useful in order to
u n d e r s t a n d t h e r e l a t i o n s h i p between this a l g o r i t h m
@ 1982 ACM0-89791-076-1/82/007/0265 $00.75 and existing ones.

265
2.1. Existing Methods scanlines. The major disadvantage of Whitted's
One of the earliest raster rendering algorithms approach was the lack of generality in finding
for parametric surfaces was that of Catmull [3]. The silhouettes. His silhouette detector would fail to find
algorithm was not scanline oriented, but r a t h e r used silhouettes which did not intersect the boundary of
an extremely fast subdivision technique to subdivide the patch.
the patch until a patch that was smaller than a single
picture element (pixel) was obtained. At this point,
the (small) patch could be rendered easily.
3. Algorithm Overview
The algorithm described in this paper is loosely
Another method, which could conceivably be based on Whitted's algorithm. "Curved-edge
scanline oriented but was not necessarily so, involved polygons" are used as a primitive object type and more
deriving a polygonal approximation to the smooth complex patches are reduced to this primitive type.
surface and rendering the polygons. In order to get a The term "polygon" may be somewhat misleading
smooth-shaded image, this approach involved because it gives the impression that the primitive
approximating surface normals with averaging objects are planar. This is certainly not the case
techniques. Further, deriving the polygonal - p l a n a r curved-edge polygons are a special case of the
approximation was often a tedious task which was objects referred to as curved-edge polygons. The term
performed manually. The A l p h a _ l group at the "curved-edge polygon" is chosen because the methods
University of Utah is developing an experimental which are used to render such an object are quite
CAGD system in which high-quality raster graphics analogous to the methods for rendering polygons.
plays an important role. They currently use a method
of automatically generating a polygonal
approximation to B-spline surfaces to within a We define a curved-edge polygon to be any
specified tolerance using subdivision techniques, bicubic patch which:
producing high-quality smooth shaded renderings -does not contain any silhouette edges
from those polygons using a scanline algorithm [6]. (with respect to the current view)
Their scanline-order subdivision approach is a
modification of the Lane-Carpenter algorithm [5]. - h a s only bounding edges which are
monotonic in y
The advantage of the polygonal approximation -can be represented by univariate cubic
approach to parametric surface rendering is t h a t equations of its bounding edges
polygon rendering is fast and fairly easy to The reasoning behind the first of these restrictions is
implement. One drawback to polygonal quite obvious, because silhouette edges are the places
approximations is the boundary edges of such a where the patch begins to curve behind itself. The
surface. A finer approximation is required to avoid hidden surface problem can be ignored within a single
polygonal edges than is necessary to produce smooth curved-edge polygon if this criterion is met. The
shading on the interior of the patch. Often, the edges second and third requirements have to do with the
of a surface rendered in this manner have visible nature of scanline rendering. Y-monotonicity of
linear segments, even when the shading in the bounding edges insures t h a t the edge only crosses any
interior of the surface appears quite smooth. given scanline a single time, so it is not necessary to
find multiple values of an edge for a scanline. The
expression of the patch in terms of its bounding edges
2.2. Scanline Methods allows the edges to be traced out as the algorithm
In addition to these approaches, there have been progresses up the scanlines. Appropriately shaded
several attempts to render surfaces in scanline order pixels are drawn between pairs of edges which
directly from the parametric description without intersect the current scanline.
generating an approximating polygonal mesh. Blinn's
algorithm [5, 2] was primarily an algebraic approach. The algorithm consists of essentially two parts.
He solved the surface and silhouette equations on The first part is a series of preprocessing steps.
each scanline, creating a list of boundaries for t h a t Bivariate cubic surface descriptions are converted into
scanline. By sorting th6 boundaries in order of x a standard internal form and these patches are
value on the scanline, successive pairs of boundaries processed to derive the curved-edge polygons. This
represented areas that required shading. The involves detection of silhouette edges and edges which
algorithm was very general, but had some numerical are not monotonic in y, as well as piecing of the edges
instabilities. back together into curved-edge polygons. The second
part of the algorithm does the actual rendering of the
Whitted's algorithm [5] developed a primitive curved-edge polygons.
object which will be referred to in this paper as a
"curved-edge polygon", a term which will be defined
shortly. His algorithm detected silhouette edges by 4. Preprocessing Steps
solving the normal equations along each edge for The preprocessing steps consist of:
locations where the z component was zero. A cubic
hermite interpolant was used to describe the -Subdividing the patch to some user-
silhouette between the points along the edge. To specified flatness criterion to improve the
obtain finer resolution, the patch was subdivided prior shading.
to solving for silhouette intersections with the -Converting the patch to the internal
boundaries. Once the silhouettes were determined, power basis representation.
the resulting curved-edge polygons were rendered in a
typical scanline fashion using Newton iteration to - Deriving position coefficients for
solve for successive intersections of the edges with the univariate cubic curves along the

266
boundaries. u n i v a r i a t e description of each b o u n d i n g edge of the
patch. This is easily derived from the s t a n d a r d
- Deriving an a p p r o x i m a t i o n to the n o r m a l b i v a r i a t e coefficient m a t r i x Q = M P MT as follows:
surface and the coefficients for u n i v a r i a t e
cubic n o r m a l curves along the boundaries. C(u,0) = edgeo(t)
-Locating any silhouette edges in the
patch. =[t3t2tl] [Q] [ 0 0 0 1 ] W

- Subdividing edges which are non- C(u,1) = edgel(t)


monotonic in screen-space y value.
=[t3t2tl] [Q] [ l l l l ] T
-Piecing the various b o u n d a r y and
silhouette edges back together into The expressions for C(0,v) and C(1,v) are similar.
coherent "curved-edge polygons."
F o u r coefficients are required to describe a cubic
All of these steps will be described in the curve, and these can easily be computed from the Q
following sections. m a t r i x . The coefficients for edgel(t), for example, are
s u m m a t i o n s of the rows of Q.

5. Subdivision
A quick method for simplifying the complexity 7. Normal Coefficient Calculation
of a p a r a m e t r i c surface is to subdivide the patch until The four edge curves derived in the l a s t section
some flatness criterion is met, and t h e n to e v a l u a t e enable us to r e n d e r a scanline i m a g e for a patch
(render) each r e s u l t i n g patch as an i n d e p e n d e n t without shading. However, s h a d i n g information is
surface. If a Bezier or open B-spline r e p r e s e n t a t i o n is crucial; a r a s t e r r e n d e r i n g is useless without s h a d i n g
used, the desired t a n g e n c y and continuity conditions information. Shades depend on the n o r m a l to the
between patches are m a i n t a i n e d t h r o u g h o u t the surface at each point a n d so a method of d e t e r m i n i n g
subdivision. This subdivision step m a k e s certain or a p p r o x i m a t i n g the n o r m a l a t each point on the
other aspects of the a l g o r i t h m much b e t t e r behaved. surface is required. The development below follows
In p a r t i c u l a r , n o r m a l surfaces to bicubic patches can C a t m u l l [3].
be degenerate, and subdivision m a k e s t h e m more
m a n a g e a b l e because the subdivided pieces have less In order to m a k e the discussion simpler (in
curvature. This in t u r n m a k e s both the silhouette t e r m s of notation), the following a b b r e v i a t i o n s are
detector and the s h a d i n g computations more accurate defined, together with s i m i l a r ones for V:
and the r e s u l t i n g image is significantly improved.
F i g u r e 1 shows a bicubic patch, and F i g u r e 2 shows a U =[u 3 u 2 u 1]
typical subdivision of the same patch.
U ' = [3u2 2u i 0 ]
F l a t n e s s t e s t i n g for a surface defined by Bezier
or B-spline techniques t a k e s a d v a n t a g e of the convex U"= [6u 2 0 0]
hull properties of the surface control mesh. One can
compute the plane defined by t h r e e of the four corner It is easy to obtain expressions for the
vertices of the control mesh very easily. F r o m there, derivatives of the x-component of the surface as
the distance of each point in the mesh to the plane follows (where Mx is t h e x component of the coefficient
m a y be calculated and compared with the user- m a t r i x for the surface):
specified flatness tolerance. If the control mesh lies
w i t h i n this tolerance, t h e n the convex hull p r o p e r t y X = U MxV
g u a r a n t e e s t h a t the surface will also be within the
s a m e tolerance. dX(u,v)/du = X u = U ' Mx V

dX(u,v)/dv = Xv = U Mx V'
6. Bicubic Patches and Boundary Equations
The general form for a b i v a r i a t e p a r a m e t r i c The equations for t h e y and z components are
cubic surface C(u,v) is: analogous to those for the x component.
[u3u2ul] MPMT [v3v2v1]T A n expression can be derived for the surface
which describes the surface n o r m a l at each point (u,v).
where M and P depend on t h e defining d a t a for the This can be achieved by computing the cross-product
surface. P could contain points in a Bezier control of the u and v d e r i v a t i v e s of the surface. Thus,
mesh, the bicubic position, derivative, and cross-
derivative data, or any of several other d a t a forms. [ Xn Yn Zn ]
The M's are chosen appropriately, in order to convert
the convenient d a t a form to b i v a r i a t e power basis = [ X u , Yu, Z u ] X [ X v , Yv, Zv]
representation. The power basis form is the basic
internal surface r e p r e s e n t a t i o n used in this = [ YuZv - YvZu,
algorithm; m a n y other r e p r e s e n t a t i o n s can be
converted easily to this form. Most commonly, the P ZuXv - XuZv,
m a t r i x contains t h r e e components (x, y, and z) and so
C(u,v) is a t h r e e - d i m e n s i o n a l point. X u Y v - YuXv]
For scanline rendering, it is useful to have a The first component of the n o r m a l vector can be

267
r e w r i t t e n as 2-2 1 1
-3 3 -2 -1
Xn(u,v) 0 0 1 0
1 0 0 0
= YuZv - YvZu
transforms the bivariate Hermite data into the
- (U'MyV)(UMzV') - (UMyV')(U'MzV) i n t e r n a l form.

This can be seen to be a quintic expression in u This is the x-component of the m a t r i x of


and v. We chose to approximate the quintic normal coefficients for the cubic approximation to the surface
surface by a cubic in order to simplify the n o r m a l at each point. Similar computations m a y be
computation, and so t h a t the r e n d e r i n g system could used for the y and z components. U n i v a r i a t e edge
t r e a t positional and n o r m a l information in a uniform n o r m a l coefficients are derived in exactly the same
way. Note t h a t this m a y not be appropriate for some m a n n e r as before for the positional data. This
surfaces in which there are major u n d u l a t i o n s in the r e p r e s e n t a t i o n allows edges to be traced and n o r m a l s
s h a d i n g across the patch. This is one of the points to be interpolated between the edges to render
where the preprocessing subdivision step has a smooth-shaded images in scanline order.
profound influence on the quality of the shading in
the r e s u l t i n g image.
8. Silhouette Determination
A cubic approximation can be derived by u s i n g The silhouette edges of a surface, if it contains
the H e r m i t e data (corner positions, derivatives in any, are defined as those curves on the surface along
each direction at the corners, and cross-derivatives at which the z-component of the normal vector is zero
the corners). The m a t r i x for this data is: (assuming the eye is on the z axis). In image space,
this corresponds to the normal vector lying in the
dXn dXn/dv plane of the display screen. The algorithm uses a set
of intersection routines developed by the Alpha _ 1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
group at the U n i v e r s i t y of U t a h for intersecting B-
spline surfaces. The intersection procedure is based
dXn/dv d2Xn/dudv on the Oslo Algorithm [4], which is used to add knots
to B-spline curves. The Oslo Algorithm can be applied
to performing fast subdivision of B-spline surfaces.
where the elements in each q u a d r a n t are evaluations The use of subdivision to produce the intersection
of the functions at the corners of the patch. curve of two B-spline surfaces is outlined as
"Application 3" in [4].
Expressions for Xn(u,v), dXn/du(u,v),
dXn/dv(u,v), and d2Xn/dudv(u,v) are easily derived. To compute a silhouette edge, the cubic
approximation of the normal surface and the z = 0
Xn(u,v) - plane are converted to the spline representation used
by the A l p h a _ l group. This provides a surface
(U'MyV)(UMzV') - (UMyV')(U'MzV) r e p r e s e n t a t i o n of the n o r m a l s at each point on the
surface. E v a l u a t i o n of the normal surface at a
dXn(u,v)/du = p a r a m e t r i c point (u,v) yields the normal vector of the
geometric surface at the point (u,v). The intersection
(U"MyV)(UMzV') + (U'MyV)(U'MzV')
algorithm then uses fast subdivision and the convex
hull property of B-spline meshes to determine a set of
- (U'MyV')(U'MzV) - (UMyV')(U"MzV) points which lie on the intersection line of the two
dXn(u,v)/dv = n o r m a l surfaces. The parametric (u,v) values are t h e n
evaluated with the surface equation to determine a
(U'MyV')(UMzV') + (U'MyV)(UMzV") corresponding set of points on the surface which
represent the actual silhouette in screen space.
- (UMyV")(U'MzV) - (UMyV')(U'MzV') F u r t h e r , connecting these points with straight lines is
g u a r a n t e e d to be w i t h i n a user-specified tolerance of
d2Xn(u,v)/dudv = the true silhouette. Figures 3 and 4 show patches
with silhouette edges.
(U"MyV')(UMzV') + (U"MyV)(UMzV")

+ (U'MyV')(U'MzV') + (U'MyV)(U'MzV") 9. Curved-Edge Polygon Creation


After the silhouette edges are determined, it is
(U'MyV")(U'MzV) - (U'MyV')(U'MzV') necessary to organize the collection of cubic edges into
closed "curved-edge polygons" for rendering.
- (UMyV")(U"MzV) - (UMyV')(U"MzV') I n t u i t i v e l y , this involves dividing the patch into
separate pieces which are single valued in the z
If these equations are evaluated at the points component. Practically, the problem of p a i r i n g edges
(0,0), (0,1), (1,0) and (1,1), t h e n the components of the into closed sections is more difficult t h a n one m i g h t
m a t r i x listed above can be filled in. Computing C P first suppose.
CT where C is
The algorithm used to accomplish this grouping
is a n "edge chasing" method which joins edges
together u n t i l they form a closed curved-edge polygon

268
and t h e n outputs t h a t polygon. One edge of the determined. Since the y v a l u e of the edge is known
b o u n d a r y or silhouette is selected first to s t a r t the (ie. it is j u s t the v a l u e of the scanline), the cubic
curved-edge polygon. Then t h e edge (silhouette or equation can be solved for the y-component to discover
boundary) which joins it next is added to the polygon. the p a r a m e t r i c value (t) of the edge for t h a t y. As in
If the first edge were a b o u n d a r y edge, the succeeding W h i t t e d ' s algorithm, a Newton i t e r a t i o n is used for
edge m i g h t be the next b o u n d a r y edge, or a silhouette this. A l t h o u g h in g e n e r a l Newton i t e r a t i o n m a y be
edge t h a t intersects the b o u n d a r y edge. The edge- unstable, it is quite effective for cubic edges which a r e
chasing continues until all the b o u n d a r y edges and monotonic in y. Also, if the p a r a m e t r i c (t) value which
silhouette edges have been added to closed polygons. was discovered on the l a s t scanline is saved, then the
This method is a d a p t e d from the philosophy t h a t one i n i t i a l value can be a v e r y good approximation.
can always get t h r o u g h a maze by keeping one's r i g h t
h a n d on a wall and m a k i n g t u r n s accordingly Once the p a r a m e t r i c (t) value of the edge on the
(assuming the maze has only one e n t r y and exit). scanline is obtained, e v a l u a t i o n of the x value of the
Similarly, by a l w a y s m a k i n g "right" t u r n s w h e n e v e r edge on the scanline is performed by using the
a new curve is encountered, the a l g o r i t h m is p a r a m e t r i c value w i t h the stored edge coefficients.
g u a r a n t e e d to produce closed polygons. The definition The s a m e p a r a m e t r i c value yields the x, y, and z
of a "right" t u r n is dependent on which b o u n d a r y edge components of the n o r m a l vector to the surface at t h a t
one is t u r n i n g on (e.g. on the v = 0 boundary, a point.
"right" t u r n is toward the end with the l a r g e r u
value). The b e g i n n i n g and ending positions of the
curved-edge polygon on the c u r r e n t scanline have
One a s s u m p t i o n made in this approach is t h a t been d e t e r m i n e d , as have the n o r m a l s at each
all silhouettes intersect b o u n d a r y curves on both ends. endpoint. A simple method of d r a w i n g the scanline
As s t a t e d earlier, this is a poor assumption to m a k e s e g m e n t is to i n t e r p o l a t e the n o r m a l vectors across
for the general case. However, because the silhouette the covered a r e a of the scanline and e v a l u a t e the
detector finds all intersecting and non-intersecting s h a d i n g value at each pixel. Both a l i n e a r and a cubic
silhouettes, the silhouette list can be preprocessed to interpolation scheme have been implemented. The
create artificial intersections for the non-intersecting l i n e a r n o r m a l i n t e r p o l a t i o n between two edges of a
silhouettes. An artificial intersection is an extension curved-edge polygon t u r n e d out to be unsatisfactory in
of the silhouette in an a p p r o p r i a t e direction until a m a n y cases, because the n o r m a l of a curved-edge
b o u n d a r y is crossed. These artificial edges have no polygon does not necessarily change l i n e a r l y across a
effect on the final image, but do provide a m e a n s of scanline. The preprocessing subdivision of the patch
a c c u r a t e l y subdividing a patch with i n t e r n a l until it reaches some specified flatness criterion
silhouettes. reduces the problem to a s m a l l e r scale b u t does not
solve it. However, using a cubic r a t h e r t h a n l i n e a r
n o r m a l i n t e r p o l a t i o n improved the shading of the
10. Monotonicity of Edges in Y surface considerably. The required information for
One final preprocessing step r e m a i n s to be performing a cubic H e r m i t e interpolation across the
performed on the set of edges which form the curved- scanline between two edges of the curved-edge
edge polygons. Each edge in the curved-edge polygon polygon is fairly easily computed. Once a n o r m a l is
is tested for y-monotonicity by t a k i n g the derivative of d e t e r m i n e d for each pixel, it is converted to an
the cubic edge equation and solving the q u a d r a t i c i n t e n s i t y value using Blinn's l i g h t i n g model [1].
formula for the r e s u l t i n g coefficients. The results a r e
p a r a m e t r i c values of m i n i m a and m a x i m a on the F i g u r e s 5 and 6 show a surface shaded with
edge. If the r e s u l t i n g values lie within the p a r a m e t r i c l i n e a r and cubic n o r m a l interpolation. Each shows
r a n g e of the edge, the edge is subdivided. The both a top view and a side view to b e t t e r i l l u s t r a t e
subdivision is e x t r e m e l y simple. The cubic positional how the patch curves in z. L i n e a r interpolation
and n o r m a l coefficients of the edge are merely copied a s s u m e s a constant change in the n o r m a l direction.
and the p a r a m e t r i c r a n g e of the two r e s u l t i n g edges Thus F i g u r e 5 (with t h e light source from the right)
are adjusted so t h a t the two edges together cover the has the h i g h l i g h t in the wrong position since the
entire r a n g e of the original edge, b u t each new edge is n o r m a l is not c h a n g i n g l i n e a r l y across the patch.
monotonic in y. Cubic interpolation m a k e s use of derivative
information along the edge, and so it b e t t e r
a p p r o x i m a t e s the n o r m a l change. This can be seen by
11. Rendering Steps the position of the h i g h l i g h t in F i g u r e 6.
In this section, the basic r e n d e r i n g method for
the simplified patch described above is discussed. The
patch has no silhouette edges and the edges are 12. Miscellaneous Implementation Remarks
monotonic in y. As mentioned before, the hidden surface
problem m a y be ignored w i t h i n each curved-edge
In order to r e n d e r curved-edge polygon objects polygon because it contains no silhouette edges.
on a p a r t i c u l a r scanline, a s t a n d a r d scanline However, the hidden surface problem m u s t still be
a l g o r i t h m places the edges on the s t a r t - l i s t s and solved between i n d i v i d u a l curved-edge polygons.
active-list. Then, the edges on the active list are Because an entire i m a g e is rendered in one pass
p a i r e d off from the left of the screen to the r i g h t of the t h r o u g h the scanlines, a scanline z-buffer is used to
screen and the pixels between t h e m are drawn. d e t e r m i n e which surface is visible.

In order to d r a w between two edges, the The c u r r e n t i m p l e m e n t a t i o n uses bicubic Bezier


intersection with the c u r r e n t scanline m u s t be surfaces as the e x t e r n a l interface to the system.

269
There are several reasons for selecting the Bezier References
representation. The Bezier control mesh provides a
rough approximation to the surface, and thus makes
designing test cases relatively simpler and more 1. Blinn, J. F. "Models of Light Reflection for
intuitive than if some other representation had been Computer Synthesized Pictures". In Proceedings of
chosen. A second factor is that the subdivision process SIGGRAPH '77, ACM, July 1977, pp. 192-198.
which was described is very easily implemented for
Bezier patches. Further, the Bezier representation is 2. Blinn, J. F. Computer Display of Curved Surfaces,
actually a special case of cubic B-splines. Extension of Ph.D. Thesis, University of Utah, Salt Lake City,
the algorithm to bicubic B-spline surfaces would only Utah, December 1978. Also Tech. Report No.
involve converting the control mesh to the internal 1060-126, Jet Propulsion Laboratory, Pasadena,
power basis representation. California.
3. Catmull, E. E. A Subdivision Algorithm for
13. Conclusion Computer Display of Curved Surfaces, Ph.D. Thesis,
University of Utah, Salt Lake City, Utah, December
One disadvantage to the rendering algorithm 1974. Also Tech. Report No. UTEC-CSc-74-133,
described is that it is limited to bicubic patches. This Department of Computer Science, University of Utah.
would not be a particularly serious constraint,
because much design work is done with cubics (or 4. Cohen, E.; Lyche, T.; and Riesenfeld, R. F.
even quadratics), except for the fact that the normal "Discrete B-splines and Subdivision Techniques in
surface to a cubic surface is quintic. A cubic Computer-Aided Geometric Design and Computer
approximation to the normal surface may be Graphics", Computer Graphics and Image Processing,
unsuitable in some cases, but subdivision alleviates Vol. 14, No. 2, October 1980, pp. 87-111. Also Tech.
the problem to a great extent. Report No. UUCS-79-117, Department of Computer
Science, University of Utah, October 1979.
A second disadvantage is that the silhouette
detection is complicated by the fact that the normal 5. Lane, J. M.; Carpenter, L. C.; Whitted, J. T.; and
surface of the patch is often degenerate, but again, the Blinn, J. F. "Scan Line Methods for Displaying
subdivision step is quite effective in minimizing this Parametrically Defined Surfaces", Communications of
problem. the ACM, Vol. 23, No. 1, January 1980, pp. 23-34.
Advantages of the implemented algorithm are 6. Riesenfeld, R. F.; Cohen, E.; Fish, R. D.; Thomas,
of two types: those concerning the use of a scanline S. W.; Cobb, E. S.; Barsky, B. A.; Schweitzer, D. L.;
algorithm, and those dealing with the rendering of and Lane, J. M. "Using the Oslo Algorithm as a Basis
curved edges rather than polygonal approximations. for CAD/CAM Geometric Modelling". In NCGA '81
Scanline algorithms are generally faster than other Conference Proceedings, National Computer Graphics
techniques by making use of scanline coherence to Association, Inc., June 1981, pp. 345-356.
quickly calculate position and shading information.
The previous scanline position is used as a first
approximation for the Newton iteration solution.

Curved edge rendering eliminates the polygonal


boundary problem which plagues man.y surface
rendering schemes. The problem arises from
approximating curved edges with polygons, resulting
in visible "corners" appearing along patch boundaries.
The patches rendered with this algorithm do not have
this problem. Another advantage of curved-edge
polygons is the relative size of the patch that can be
rendered without subdivision. In a polygonal
approximation, it is necessary to attempt to model the
surface as several flat pieces, often resulting in an
extremely large number of objects for a highly curved
area. Since the algorithm described in this paper uses
a cubic to approximate the normal for shading, a
single curved-edge polygon can represent a relatively
large area with significant curvature.

14. Acknowledgement
We wish to thank Spencer W. Thomas for the
use of his B-spline surface intersector. His
implementation of that algorithm comprises the
essential part of our silhouette edge detector.

270
Figure 1. Bicubic patch. Figure 2. Subdivided bicubic patch.

Figure 3. Patch with simple silhouette edge. Figure 4. Patch with complex silhouette edge.

Figure 5. Example of linear normal interpolation. Figure 6. Example of cubic normal interpolation.

271

You might also like