Parametric or Implicit: Which Is Better?
Two of the most common ways to present a geometric object X is via a parameterization or implicitly as the zeros of an equation. It is natural to ask which is better. The advantages and disadvantages of these two representations are seen best in the context of the following two tasks:
Task 1: Generate some points that belong to X. Task 2: Determine if a point q belongs to X.
is a parameterization of X, whereSuppose also that
where
Advantage of a parameterization: |
Task 1 is easy because all one has to do is to evaluate the function p in (6.40) at different values. |
Disadvantage of a parameterization: |
Task 2 is hard because one has to find a value t that satisfies the equation p (t) = q. |
Advantage of an implicit definition: |
Task 2 is easy because all one has to do is check if f(q) = 0 for the f in equation (6.41). |
Disadvantage of an implicit definition: |
Task 1 is hard because one has to find values q for which f(q) = 0. Solving equations is usually not easy. |
Since both Tasks 1 and 2 are usually handy to be able to carry out in a modeler, it would be nice if one could maintain both a parametric and an implicit representation for an object. The implicit function theorem implies that locally a smooth manifold in Rn has both a parametric and implicit representation, at least in terms of C“ functions. On the other hand, in computer graphics, for computability reasons, one prefers polynomial functions (sometimes rational functions are acceptable) and then the question becomes harder. With the exception of a few well-known spaces, such as conics, finding such representations is difficult in general and falls into the domain of algebraic geometry.
Transforming Entities
This section makes two simple but useful observations about transformations. The first has to do with how vectors transform.
Letbe an affine map. The map M can be written uniquely in the form
where T is a translation and M0 is linear transformation withLet
where we think of v as a vector. Let v be the vector to which v is transformed by the map M. Then
Mapping a vector is different from mapping a point. The justification of equation (6.42) is that to map a vector one really should map its two “endpoints." To put it another way, if p and q are two points in Rn, then the direction vector pq transforms to the direction vector
It follows that translations leave vectors unchanged. For example, if M is defined by equations
then to transform a vector we can drop the translational part and it will transform using the equations
Next, we look at how parameterizations and implicit representations of a space X in Rn change under a transformation
Let Y = T(X). Assume that X is defined by a parameterization and is the set of zeros of
Clearly, Y is parameterized by the composition T°p. If T has an inverse, then Y can also be defined implicitly. In fact,
Figure 6.25 explains the validity of equation (6.43). The point q’ belongs to Y if and only if the pointlies in X and satisfies the equation f(q) = 0.
Figure 6.25. Transforming an implicit representation.
Figure 6.26. Transforming a line.
Example. Let L be the line in the plane defined by
and let T be the rotation about the origin through the angle of ninety degrees. The equations for T and T-1 are
If L’ = T (L), then from what we just said above, the equation for L’ is gotten from equation (6.44) by substituting y and -x for x and y, respectively. This gives
That this is the correct answer can easily be checked. See Figure 6.26. Simply take two points on L and find the equation of the line through the image of these two points under T. For example, the points (0,-1) and (1,0) map to (1,0) and (0,1), respectively, and equation (6.45) contains these two points.