Graphics Reference
In-Depth Information
representations for simulation. This may be related to GPUs, where polygonal
representations are strongly supported, or it may be related to the fact that having
an artist build a function on all of space to get a surface that occupies just a tiny
part of it is somewhat awkward. This awkwardness is partly avoidable by using
the signed distance from the shape (positive outside, negative inside). To be useful
in an implicit definition, this signed distance function need only be represented
close to the zero-set: Its values far away cannot matter. The same is true for the
volumetric texture functions described earlier in the chapter. Perhaps methods like
this will rejuvenate the use of implicitly defined models.
One charm of implicit surfaces is that their geometry (i.e., tangent planes,
curvature, etc.) is completely determined by the defining implicit function, and
can be computed analytically. The web material for this chapter describes the
computation of curve and surface curvature, for instance.
24.12 Exercises
Exercise 24.1: Explain why the formula of Equation 24.14 gives a function with
the property that for any point ( x , y ) where x and y are both nonintegers, the value
F ( x , y ) lies between the minimum and maximum values of v at the corners of the
square containing ( x , y ) if h has the property that when all the v ( i , j ) are 1, the
function F is everywhere 1.
Exercise 24.2: In the marching squares algorithm, we chose one of two pos-
sible ways to connect vertices in the case where the signs at the corner of a grid
square alternated; the choice we made was independent of the values at the four
corners.
(a) Explain why, if we drew a diagonal from the northeast to the southwest corner
of each grid square, and treated the resultant collection of triangles as a mesh with
values at vertices, the piecewise-linear interpolation of those values has a graph
whose level-zero slice is consistent with our choice.
(b) Explain why, if we'd chosen the alternate diagonal for each grid square, it
would be equivalent to making the other choice.
(c) Devise an algorithm in which we add a new vertex to the center of each grid
square, with edges from this vertex to the four corners, and we assign a value to
the new vertex that's the average of the four corner values. Use this new mesh (and
these new values) to generate an isocurve for the piecewise linearly interpolated
function. (Your new isocurve will have vertices both on the original grid edges
and on the new edges you added from each center vertex to the corners.
(d) Explain how this revised approach can lead to either of the two possible ways
of connecting the edge vertices in the +
+
case.
 
 
Search WWH ::




Custom Search