Unformatted text preview:

Lecture 18: Surfaces I -- The General TheoryThou hast set all the borders of the earth: Psalm 74:171. Surface RepresentationsRecursive ray tracing is a technique for displaying realistic images of objects bordered by surfaces. To render surfaces via ray tracing, we require two essential procedures: we must be able to compute surface normals and we need to calculate ray-surface intersections. There are four standard ways to represent surfaces in Computer Graphics: implicit equations, parametric equations, deformations of known surfaces, and specialized procedures. In this lecture we shall review each of these general surface types and in each case explain how to compute surface normals and how to calculate ray-surface intersections. To facilitate further analysis, at the end of this lecture we shall also provide explicit formulas for mean and Gaussian curvature.1.1 Implicit Surfaces. Planes, spheres, cylinders, and tori are examples of implicit surfaces. An implicit surface is the collection of all points P satisfying an implicit equation of the form € F(P) = 0. Typically, the function F is a polynomial in the coordinates € x, y,z of the points P. For example, a sphere can be represented by the implicit equation€ F(x, y,z) ≡ x2+ y2+ z2−1 = 0.Generating lots of points along an implicit surface may be difficult because for complicated expressions F it may be hard to find points € P for which € F(P) = 0. On the other hand, determining if a point € P lies on an implicit surface is easy, since we need only check if € F(P) = 0. Moreover points on different sides of an implicit surface are distinguished by the sign of F; for closed surfaces € F(P) < 0 may indicate points on the inside, whereas € F(P) > 0 may indicate points on the outside. This ability to distinguish inside from outside is important in solid modeling applications. 1.2 Parametric Surfaces. Planes, spheres, cylinders, and tori are also examples of parametric surfaces. A parametric surface is a surface represented by parametric equations -- that is, to each point P on the surface, we assign a pair of parameter values € s,t so that there is a formula € P = P(s,t) for computing points along the surface. In terms of rectangular coordinates, the equation € P = P(s,t) is equivalent to three parametric equations for the coordinates: € x = p1(s,t), y = p2(s,t), z = p3(s,t). In Computer Graphics, the functions € p1(s,t), p2(s,t), p3(s,t) are typically either polynomials or rational functions -- ratios of polynomials -- in the parameters € s,t. For example, a sphere can be represented by the parametric equations€ x(s,t) =2 s1+ s2+ t2 y( s,t) =2t1+ s2+ t2 z(s,t) =1− s2− t21+ s2+ t2since it is easy to verify that€ x2(s,t) + y2(s,t) + z2(s,t) = 1.Generating lots of points along a parametric surface is straightforward: simply substitute lots of different parameter values € s,t into the expression € P = P(s,t). Thus parametric surfaces are easy to display, so parametric surfaces are a natural choice for Computer Graphics. However, determining if a point € P is on a parametric surface is not so simple, since it may be difficult to determine whether or not there are parameters € s,t for which € P = P(s,t).1.3 Deformed Surfaces. An ellipsoid is a deformed sphere; an elliptical cone is a deformed circular cone. Any surface generated by deforming another surface is called a deformed surface. The advantage of deformed surfaces is that deformations often permit us to represent complicated surfaces in terms of simpler surfaces. This device can lead to easier analysis algorithms for complicated shapes. For example, we shall see in the next lecture that ray tracing an ellipsoid can be reduced to ray tracing a sphere.If the original surface has an implicit representation € Fold(P) = 0 or a parametric representation € P = Sold(s,t), then the deformed surface also has an implicit representation € Fnew(P) = 0 or a parametric representation € P = Snew(s,t); moreover, we can compute € Fnew(P) and € Snew(s,t) from € Fold(P) and € Sold(s, t). In fact, if M is a nonsingular transformation matrix that maps the original surface into the deformed surface, then€ Fnew(P) = Fold(P ∗ M−1)(1.1)€ Snew(s,t) = Sold(s,t) ∗ M. (1.2)Equation (1.2) is easy to understand because M maps points on € Sold to points on € Snew. Equation (1.1) follows because P is a point on the deformed surface if and only if € P ∗ M−1 is a point on the original surface. Thus€ Fnew(P) = 0 ⇔ Fold(P ∗ M−1) = 0.Equations (1.1) and (1.2) are valid for any affine transformation M of the original surface. Thus the map M can be a rigid motion -- a translation or a rotation -- so we can use Equations (1.1) and (1.2) to reposition as well as to deform a surface.1.4 Procedural Surfaces. Fractal surfaces are examples of procedural surfaces. Typically fractals are not represented by explicit formulas; instead fractals are represented either by recursive procedures or by iterated function systems. Any surface represented by a procedure instead of a formula is called a procedural surface. Often surfaces that blend between other surfaces are 2represented by procedures for generating the blend rather than by explicit formulas, so blends are another important class of procedural surfaces. Though procedural surfaces are important in Computer Graphics, ray tracing procedural surfaces requires specialized algorithms that depend on the particular procedure used to generate the surface. Since we are interested here in general ray tracing algorithms, we shall not have much to say about ray tracing for procedural surfaces.2. Surface NormalsFor implicit, parametric, and deformed surfaces there are straightforward, explicit formulas for calculating normal vectors. We present these general formulas below.2.1 Implicit Surfaces. For an implicit surface € F(x, y,z) = 0, the normal vector N is given by the gradient -- that is,€ N = ∇F =∂F∂x,∂F∂y,∂F∂z      . (2.1)The proof that the gradient is normal to the surface is just the chain rule. Suppose that € P(t) = x( t),y(t), z(t)( ) is a parametric curve on the


View Full Document

Rice COMP 360 - The General Theory

Documents in this Course
Radiosity

Radiosity

42 pages

Radiosity

Radiosity

22 pages

Load more
Download The General Theory
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view The General Theory and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view The General Theory 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?