Chapter 22. Optimal Quaternion Frames

In this chapter we continue to study the nature of orientation frames on curves and surfaces and their corresponding quaternion structures. Our visualizations again exploit the fact that quaternions are points on the three-sphere or hypersphere S3 embedded in 4D. The methods in this section follow closely techniques introduced in Hanson and Ma [78,80] and Hanson [70,71] for analyzing families of coordinate frames on curves and surfaces using quaternion maps.

Background

General questions involving the specification of curve framings have been investigated in many contexts. For a representative selection of approaches see, for example, Bloomenthal [21], Klock [114], Max [121], and Shani and Ballard [147]. The quaternion Gauss map is a logical extension of the quaternion frame approach to visualizing space curves introduced by Hanson and Ma [78,80]. The formulation of the quaternion form of the differential equations for frame evolution was apparently introduced by Tait [160].

For basic information on orientation spaces and their relationship to quaternions see, for example, Altmann [4], Kuipers [115], and Pletincks [139]. Additional background on the differential geometry of curves and surfaces may be found in sources such as the classical treatise of Eisenhart [46] and in Gray’s Mathematicabased text [61].

Our main task is to work out a general framework for selecting optimal systems of coordinate frames that can be applied to the study of curves and surfaces in 3D space. We will see that our preferred optimizations contain minimal-turning parallel transport framings of curves as a special case and extend naturally to situations in which parallel transport is not applicable.

Motivation

Many graphics problems require techniques for effectively displaying the properties of curves and surfaces. The problem of finding appropriate representations can be quite challenging. Representations of space curves based on single lines are often inadequate for graphics purposes. Significantly better images result from choosing a tubing to display the curve as a graphics object with spatial extent. Vanishing curvature invalidates methods such as the Frenet frame, and alternative approaches such as those based on parallel transport involve arbitrary heuristics to achieve such properties as periodicity. Similar problems occur in the construction of suitable visualizations of complex surfaces and oriented particle systems on surfaces. If a surface patch is represented by a rectangular but nonorthogonal mesh, for example, there is no obvious local orthonormal frame assignment. If the surface has regions of vanishing curvature, methods based on directions of principal curvatures break down as well.

Although we emphasize curves and surfaces to provide intuitive examples, there are several parallel problem domains that can be addressed with identical techniques. Among these are extrusion methods and generalized cones in geometric modeling, the imposition of constraints on a camera-frame axis in keyframe animation, and the selection of a 2D array of camera-frame axis choices as a condition on a constrained-navigation environment (e.g., see Hanson and Wernert [83]).

Figure 22.1 summarizes the basic class of problems involving curves that will concern us here. The line drawing (a) of a (3, 5) torus knot provides no useful information about the 3D structure. Improving the visualization by creating a tubing involves a subtle dilemma that we attempt to expose in the rest of the figure. We cannot use a periodic Frenet frame as a basis for this tubing because inflection points or near-inflection points occur for many nice-looking torus knot parameterizations, and in such cases the Frenet frame is undefined or twists wildly. The parallel transport tubing shown in (b) is well behaved but not periodic. By looking carefully at the magnified portion next to the arrow in Figure 22.1c, one can see a gross mismatch in the tessellation (due to the nonperiodicity) that would, for example, preclude the assignment of a consistent texture. Although it would be possible in many applications to ignore this mismatch, it has been the subject of a wide variety of previous papers (e.g., see Bloomenthal [21], Klock [114], and Shani and Ballard [147]), and must obviously be repaired for many other applications, such as those requiring textured periodic tubes.

The (3, 5) torus knot, a complex periodic 3D curve. (a) The line drawing is nearly useless as a 3D representation. (b) A tubing based on parallel transporting an initial reference frame produces an informative visualization, but is not periodic. (c) The arrow in this close-up exposes the subtle but crucial nonperiodic mismatch between the starting and ending parallel transport frames. This would invalidate any attempt to texture the tube. Quaternion methods provide robust parameterization-invariant principles for resolving such problems.

Figure 22.1. The (3, 5) torus knot, a complex periodic 3D curve. (a) The line drawing is nearly useless as a 3D representation. (b) A tubing based on parallel transporting an initial reference frame produces an informative visualization, but is not periodic. (c) The arrow in this close-up exposes the subtle but crucial nonperiodic mismatch between the starting and ending parallel transport frames. This would invalidate any attempt to texture the tube. Quaternion methods provide robust parameterization-invariant principles for resolving such problems.

Figure 22.2 illustrates a corresponding problem for surface patches. Although the normals to the four corners of the patch are always well defined (a), one finds two different frames for the bottom corner, depending on whether one parallel transports the initial frame around the left-hand path (b) or the right-hand path (c). There is no immediately obvious right way to choose a family of frames covering this surface patch. Our goal is to propose a systematic family of optimization methods for resolving problems such as these.

Optimal quaternion framesmethodological overview(a) A smooth 3D surface patch having a nonorthogonal parameterization, along with its geometrically fixed normals at the four corners. No unique orthonormal frame is derivable from the parameterization. If we imitate parallel transport for curves to evolve the initial frame at the top corner to choose the frame at the bottom corner, we find that the paths shown in b and c result in incompatible final frames at the bottom corner. Our goal is to address the problem of systematically choosing a compatible set of surface frames in situations such as this.

Figure 22.2. (a) A smooth 3D surface patch having a nonorthogonal parameterization, along with its geometrically fixed normals at the four corners. No unique orthonormal frame is derivable from the parameterization. If we imitate parallel transport for curves to evolve the initial frame at the top corner to choose the frame at the bottom corner, we find that the paths shown in b and c result in incompatible final frames at the bottom corner. Our goal is to address the problem of systematically choosing a compatible set of surface frames in situations such as this.

Methodology

We focus on unit quaternion representations of coordinate frames as points on the three-sphere S3, which admits a natural distance measure for defining optimization problems and supports in addition a variety of regular frame-interpolation methods (e.g., see Kim et al. [111], Nielson [132], Schlag [145], Shoemake [149], and Chapter 25). We do not directly address the related question of optimal freely moving frames treated by the minimal-tangential-acceleration methods (e.g., see Barr et al. [15], Kajiya [106], and Ramamoorthi and Barr [140]). We are instead concerned with closely spaced points on curves and surfaces where one direction of the frame is already fixed and the chosen functional minimization in quaternion space must obey the additional constraint imposed by the fixed family of directions. Additional references of interest, especially regarding the treatment of surfaces, include [106,138]. Figure 22.3 provides a visualization of the difference between the general interpolation problem and our constrained problem. A typical spline minimizes the bending energy specified by the chosen anchor points. Requiring intermediate points to slide on constrained paths during the minimization modifies the problem. In particular, 3D spline curves need not intersect any of the constraint paths. In addition, we note that we typically have already sampled our curves and surfaces as finely as we need to, and thus piecewise linear curves are generally sufficient for the applications we discuss.

(a) The camera frame interpolation problem is analogous to the problem of finding a minimal-bending spline curve through a series of fixed key points. (b) The optimal curve frame assignment problem is analogous to fixing the end points of a curve segment and choosing in addition a family of lines along which the intermediate points are constrained to slide during the optimization process. In 3D, the spline path need not pass through the constraint lines. (c) In typical practical situations, the sample points are generally close enough together that we can apply the constraints to piecewise linear curves analogous to those shown here.

Figure 22.3. (a) The camera frame interpolation problem is analogous to the problem of finding a minimal-bending spline curve through a series of fixed key points. (b) The optimal curve frame assignment problem is analogous to fixing the end points of a curve segment and choosing in addition a family of lines along which the intermediate points are constrained to slide during the optimization process. In 3D, the spline path need not pass through the constraint lines. (c) In typical practical situations, the sample points are generally close enough together that we can apply the constraints to piecewise linear curves analogous to those shown here.

The Space of Possible Frames

Our solution to the problem is to transform the intrinsic geometric quantities (such as the tangent field of a curve and the normal field of a surface) to quaternion space and to construct the quaternion manifold corresponding to the one remaining degree of rotational freedom in the choice of coordinate frame at each point. Curves and surfaces in these spaces of possible frames correspond to specific choices of the quaternion Gauss map, a subspace of the space of possible quaternion frames of the object to be visualized.

For space curves, specifying a frame assignment as a quaternion path leads at once to tubular surfaces that provide a “thickened” representation of the curve that interacts well with lighting and rendering models. For surface patches, the approach results in a structure equivalent to that of an anisotropic oriented particle system (a species of texture) whose pairs of tangent vector fields in the surface produce natural flow fields that characterize the local surface properties and are easy to display. We will see that certain complex features of surfaces that are well known in manifold theory arise naturally and can be clearly visualized using the quaternion Gauss map.

We will typically exploit our standard S3 method of visualizing the geometry of the space of quaternions in which quaternion Gauss maps and the spaces of possible quaternion frames are represented. We show how to compute the required subspaces of allowed frames in practice, and how to express this information in a form that can be used to optimize an energy measure, thereby leading to optimal frame choices.

Parallel Transport and Minimal Measure

Our approach is to constrain each quaternion frame with one degree of freedom to its own circular quaternion path (the axial degree of rotational freedom), and then to minimize the quaternion length of the frame assignment for curves and the quaternion area of the frame assignment for surfaces to achieve an optimal frame choice. This choice reduces to the parallel transport frame for simple cases. Our justification for choosing minimal quaternion length for curves is that there is a unique rotation in the plane of two neighboring tangents that takes each tangent direction to its next neighbor along a curve. This is the geodesic arc connecting the two frames in quaternion space, and is therefore the minimum distance between the quaternion points representing the two frames. The choice of minimal area for surface frames is more heuristic, basically a plausibility argument that the generalization of minimal length is minimal area(no doubt this could be made more rigorous).

By imposing other criteria, such as end-point derivative values and minimal bending energy (see Barr et al. [15] and Ramamoorthi and Barr [140]), the short straight line segments and polygons that result from the simplest minimization could be smoothed to become generalized splines passing through the required constraint rings. Because in practice our curve and surface samplings are arbitrarily dense, we will typically work directly with the unique quaternion rings giving the degrees of freedom at each sample point.

The Space of Frames

We are now ready to introduce the details of our key concept, the space of possible frames. Suppose at each sample point x(t) of a curve we are given a unit tangent vector, The Space of Frames, computed by whatever method one likes (two-point sampling, five-point sampling, analytic, and so on). Then one can immediately write down a one-parameter family describing all possible choices of the normal plane orientation. This is simply the set of rotation matrices The Space of Frames, or quaternions The Space of Frames, that leave The Space of Frames fixed.

For surfaces, the analogous construction follows from determining the unit normal The Space of Frames at each point x(u, v) on the surface patch. The needed family of rotations The Space of Frames, or quaternions The Space of Frames, now leaves The Space of Frames fixed and parameterizes the space of possible tangent directions completing a frame definition at each point x(u, v).

However, there is one slight complication: the family of frames The Space of Frames leaving The Space of Frames fixed does not have The Space of Frames as one column of the 3 × 3 rotation matrix, and thus does not actually describe the desired family of frames. Therefore, we proceed as follows.

We define The Space of Frames to be a quaternion describing the family of frames for which the direction The Space of Frames is a preferred fixed axis of the frame, such as the tangent or normal vector. The orthonormal triad of three-vectors describing the desired frame is

Equation 22.1. 

where one column of our choice is picked to be , the fixed direction.

The standard rotation matrix leaves fixed but does not have as one column of the 3 × 3 rotation matrix, and thus we have more work to do. To compute , we need the following.

  • A base reference frame that is guaranteed to have one column exactly aligned with a chosen vector , which is either the tangent to a curve or the normal to a surface.

  • A one-parameter family of rotations that leaves a fixed direction invariant.

The latter family of rotations is given simply by the standard quaternion

Equation 22.2. 

for 0 ≤ θ < 4π. The base frame can be chosen as

Equation 22.3. 

for a curve frame with the tangent in the first column,

and as

Equation 22.4. 

for a surface frame with the normal in the last column:

We have already introduced the frame , which we will refer to as the geodesic reference frame because it tilts the reference vector (e.g., , , or ) along a geodesic arc until it is aligned with (see Figure 22.4). If (or or ), there is no problem, in that we simply take to be the quaternion (1, 0). If , we may choose any compatible quaternion (such as (0, 0, 0, 1), and so on). We escape the classic difficulty of being unable to assign a global frame to all of S2 because we need a parameterization of all possible frames, not any one particular global frame. If one wants to use a reference frame that is not the identity frame, one must premultiply ) on the right by a quaternion rotating from the identity into that reference frame. This is important when constructing a nonstandard geodesic reference frame such as that required to smoothly describe a neighborhood of the southern hemisphere of S2.

Example of the geodesic reference frame: (a) On the northern hemisphere of a two-sphere, the geodesic reference frame tilts the axis of the North Pole’s identity frame along the shortest arc to align with a specified reference direction. (b) The quaternion map has just a single possible plane for the tilt axes allowed by this procedure.

Figure 22.4. Example of the geodesic reference frame: (a) On the northern hemisphere of a two-sphere, the geodesic reference frame tilts the Example of the geodesic reference frame: (a) On the northern hemisphere of a two-sphere, the geodesic reference frame tilts the axis of the North Pole’s identity frame along the shortest arc to align with a specified reference direction. (b) The quaternion map has just a single possible plane for the tilt axes allowed by this procedure. axis of the North Pole’s identity frame along the shortest arc to align with a specified reference direction. (b) The quaternion map has just a single possible plane for the tilt axes allowed by this procedure.

We can thus write the full family of possible quaternion frames keeping Example of the geodesic reference frame: (a) On the northern hemisphere of a two-sphere, the geodesic reference frame tilts the axis of the North Pole’s identity frame along the shortest arc to align with a specified reference direction. (b) The quaternion map has just a single possible plane for the tilt axes allowed by this procedure. as a fixed element of the frame triad to be the quaternion product

Equation 22.5. 

where * denotes quaternion multiplication and all possible frames are described twice (in that 0 ≤ θ < 4π). To summarize, if we specify a frame axis to be fixed then the variable θ in serves to parameterize a ring in quaternion space, each point of which corresponds to a particular 3D frame and each frame of which has a diametrically opposite twin.

We argue that because optimization will typically be done in the full quaternion space the fact that two opposite-sign quaternions map to the same physical three-space rotation is not a detriment. In fact, it potentially permits an additional stability in the variational process because rotations by +π and –π are not close to each other in quaternion space (as they are in ordinary rotation matrices). In principle, any quaternion Gauss map can be replaced by its exact negative, and the variational process could converge from an ambiguous starting point to either one; the frames would be the same. In our standard (vector-part-only) projection, the two reflection-equivalent maps are inversions of each other about the 3D origin. Their unseen opposite q0 values can of course cause an additional large separation of the maps in 4D space.

Full Space of Curve Frames

We can now construct the space of frames step by step using the previously described method. As an illustrative example, we show in Figure 22.5 the trefoil knot with its Frenet-frame tubing and its (doubled) quaternion Frenet frame. Each point on the quaternion Frenet frame map in Figure 22.5b must lie on the quaternion ring Full Space of Curve Frames, where Full Space of Curve Framesi is the (local) tangent direction at some point xi on the curve and θ parameterizes the ring of possibilities. What we see in Figure 22.5 is one set of the values {θi} corresponding to the frame uniquely determined by the Frenet formulas. Next, we examine what happens when we release θ in Full Space of Curve Frames from its Frenet values at the first few sample points of the curve.

(a) A trefoil torus knot. (b) Its quaternion Frenet frame projected to 3D. For this trefoil knot, the frame does not close on itself in quaternion space unless the curve is traversed twice, corresponding to the double-valued “mirror” image of the rotation space that can occur in the quaternion representation. Observe the longer segments in (b). These correspond to the three high-torsion segments observable in (a).

Figure 22.5. (a) A trefoil torus knot. (b) Its quaternion Frenet frame projected to 3D. For this trefoil knot, the frame does not close on itself in quaternion space unless the curve is traversed twice, corresponding to the double-valued “mirror” image of the rotation space that can occur in the quaternion representation. Observe the longer segments in (b). These correspond to the three high-torsion segments observable in (a).

Figure 22.6 shows the steps in the construction of the space of frames for the trefoil knot, beginning with a few tangent vectors and the quaternion basis frames corresponding to quaternions that tilt the reference axis into this tangent direction. The circular curve of quaternions representing the space of normal frames is drawn for each tangent. Each basis frame touches this curve once, modulo quaternion doubling. Then the family of these circular curves sweeps out a cylindrical two-manifold, the full space of invariant frames for a 3D curve.

(a) The first several pieces of the construction of the invariant quaternion space for the frames of the trefoil knot. The red fan of vectors shows the first several elements of the tangent map, represented as vectors from the origin to the surface of the two-sphere and connected by a line. Each green vector points from the origin to the geodesic reference element of the quaternion space q(arccos guaranteed to produce a frame with the tangent . The black curves are the first several elements of the one-parameter space of quaternions representing all possible quaternion frames with the tangent . (b) This piece of the space of possible frames is represented as a continuous surface, where a circle on the surface corresponds to the space of frames for one point on the curve. All quaternions are projected to 3D using only the vector part.

Figure 22.6. (a) The first several pieces of the construction of the invariant quaternion space for the frames of the trefoil knot. The red fan of vectors shows the first several elements of the tangent map, represented as vectors from the origin to the surface of the two-sphere and connected by a line. Each green vector points from the origin to the geodesic reference element of the quaternion space q(arccos(a) The first several pieces of the construction of the invariant quaternion space for the frames of the trefoil knot. The red fan of vectors shows the first several elements of the tangent map, represented as vectors from the origin to the surface of the two-sphere and connected by a line. Each green vector points from the origin to the geodesic reference element of the quaternion space q(arccos guaranteed to produce a frame with the tangent . The black curves are the first several elements of the one-parameter space of quaternions representing all possible quaternion frames with the tangent . (b) This piece of the space of possible frames is represented as a continuous surface, where a circle on the surface corresponds to the space of frames for one point on the curve. All quaternions are projected to 3D using only the vector part. guaranteed to produce a frame with the tangent (a) The first several pieces of the construction of the invariant quaternion space for the frames of the trefoil knot. The red fan of vectors shows the first several elements of the tangent map, represented as vectors from the origin to the surface of the two-sphere and connected by a line. Each green vector points from the origin to the geodesic reference element of the quaternion space q(arccos guaranteed to produce a frame with the tangent . The black curves are the first several elements of the one-parameter space of quaternions representing all possible quaternion frames with the tangent . (b) This piece of the space of possible frames is represented as a continuous surface, where a circle on the surface corresponds to the space of frames for one point on the curve. All quaternions are projected to 3D using only the vector part.. The black curves are the first several elements of the one-parameter space of quaternions representing all possible quaternion frames with the tangent (a) The first several pieces of the construction of the invariant quaternion space for the frames of the trefoil knot. The red fan of vectors shows the first several elements of the tangent map, represented as vectors from the origin to the surface of the two-sphere and connected by a line. Each green vector points from the origin to the geodesic reference element of the quaternion space q(arccos guaranteed to produce a frame with the tangent . The black curves are the first several elements of the one-parameter space of quaternions representing all possible quaternion frames with the tangent . (b) This piece of the space of possible frames is represented as a continuous surface, where a circle on the surface corresponds to the space of frames for one point on the curve. All quaternions are projected to 3D using only the vector part.. (b) This piece of the space of possible frames is represented as a continuous surface, where a circle on the surface corresponds to the space of frames for one point on the curve. All quaternions are projected to 3D using only the vector part.

This full space, shown in Figure 22.7, has several nontrivial properties. One is that, given one circular ring of frames, a neighboring ring that is a parallel-transported version of the first ring is a so-called “Clifford parallel” of the first ring, meaning that the distance from any point on one ring to the nearest point on the second ring is the same. This is nontrivial to visualize and is a feature of the 4D space we are working in. Another property is that the intervals between rings in the quaternion space directly indicate the curvature. This comes about because the magnitude of (a) The first several pieces of the construction of the invariant quaternion space for the frames of the trefoil knot. The red fan of vectors shows the first several elements of the tangent map, represented as vectors from the origin to the surface of the two-sphere and connected by a line. Each green vector points from the origin to the geodesic reference element of the quaternion space q(arccos guaranteed to produce a frame with the tangent . The black curves are the first several elements of the one-parameter space of quaternions representing all possible quaternion frames with the tangent . (b) This piece of the space of possible frames is represented as a continuous surface, where a circle on the surface corresponds to the space of frames for one point on the curve. All quaternions are projected to 3D using only the vector part.′ is related to the parallel transport transition between any two sample points, given by Equation 20.12. Because the parallel transport frames are legal frames, and because the starting frame is arbitrary, each full ring is a parallel transport of its predecessor, with the angular distance of the transition rotation providing a measure of the curvature relative to the sampling interval.

Full surface of the invariant quaternion frame space for the frames of the trefoil knot. All quaternions are projected to 3D using only the vector part.

Figure 22.7. Full surface of the invariant quaternion frame space for the frames of the trefoil knot. All quaternions are projected to 3D using only the vector part.

Full Space of Surface Maps

The full space of frames for a surface patch is even more complex to visualize, because it is a hypercylindrical three-manifold formed by the direct product of patches of surface area with the rings of possible frames through each surface point.

As a very simple case of a surface, consider the patch shown in Figure 22.2a. The coordinate system used does not provide a unique tangent frame, and thus one cannot immediately determine a logical frame choice.

Figure 22.8 shows spaces of possible frames for the four corners as four rings of quaternion values compatible with the normals at the patch corners. Recall that parallel transporting the initial frame along two different routes (Figures 22.2b and 22.2c) produces incompatible frames at the final corner. We represent this situation in Figure 22.8 by drawing the routes in quaternion space between the initial frame (the degenerate circle appearing as a central vertical line) and the final frame. The mismatch between the two final frames is illustrated by the fact that the two paths meet at different points on the final ring specifying the frame freedom for the bottom corner’s frame.

Rotational freedom, and surface map spaceSliding rings, and surface map spaceA different viewpoint of the mismatch problem of Figure 22.2. (a) Choosing different routes to determine the frame at the bottom point results in the incompatible frames shown here in 3D space. (b) The same information is presented here in the quaternion space-of-frames picture. We use throughout a quaternion projection that shows only the three-vector part of the quaternion, dropping q0. This is much like projecting away z in a polar projection of the two-sphere. Each heavy black curve is a ring of possible frame choices that keeps the normals in a fixed. The labels mark the point in quaternion space corresponding to the frames at the corners in a, and thus the gap between the labels C and C′ represents the frame mismatch in quaternion space on the same constraint ring. (The apparent vertical line is the result of drawing a squashed circle of frames at vertex A in this projection.) (c) The method proposed to resolve this conflict is to fix one point (say A), divide the polygon ABCB′ into triangles, and slide B, C, and B′ along the constraint rings until the total triangle areas are minimized and some compromise with C = C′ is reached.

Figure 22.8. A different viewpoint of the mismatch problem of Figure 22.2. (a) Choosing different routes to determine the frame at the bottom point results in the incompatible frames shown here in 3D space. (b) The same information is presented here in the quaternion space-of-frames picture. We use throughout a quaternion projection that shows only the three-vector part of the quaternion, dropping q0. This is much like projecting away z in a polar projection of the two-sphere. Each heavy black curve is a ring of possible frame choices that keeps the normals in a fixed. The labels mark the point in quaternion space corresponding to the frames at the corners in a, and thus the gap between the labels C and C′ represents the frame mismatch in quaternion space on the same constraint ring. (The apparent vertical line is the result of drawing a squashed circle of frames at vertex A in this projection.) (c) The method proposed to resolve this conflict is to fix one point (say A), divide the polygon ABCB′ into triangles, and slide B, C, and B′ along the constraint rings until the total triangle areas are minimized and some compromise with C = C′ is reached.

Sliding rings and overall rotational freedom: In Figure 22.9a, we go one step further and first show how the quaternion Gauss map of an entire patch is situated relative to the ring space. Keeping one corner fixed and sliding the rest of the frames around the circular rings takes us to distinct families of frames, which obviously have different areas in the quaternion space. Finally, in Figure 22.9b we keep the fundamental space of frames the same but exercise the freedom to choose the single parameter describing the basis for the overall orientation. Rotating the basis sweeps out both the three-manifold describing the space of frames for this patch and the family of equivalent frames differing by an insignificant orientation change in the basis vector.

(a) A more complete picture of the space of frames for this surface patch. The surface shown is a sparse quaternion frame choice for the surface, and we show a subset of the rings of constraints. Each ring passes through one quaternion point on the frame map, the point specifying the current frame choice. Variations must keep each vertex on its ring. (b) An equivalent set of frames is formed by applying a rotation to the entire set of frames. All points follow their own ring of constraints to keep the same normal. These pictures represent the three-manifold in quaternion space swept out by the possible variations.

Figure 22.9. (a) A more complete picture of the space of frames for this surface patch. The surface shown is a sparse quaternion frame choice for the surface, and we show a subset of the rings of constraints. Each ring passes through one quaternion point on the frame map, the point specifying the current frame choice. Variations must keep each vertex on its ring. (b) An equivalent set of frames is formed by applying a rotation to the entire set of frames. All points follow their own ring of constraints to keep the same normal. These pictures represent the three-manifold in quaternion space swept out by the possible variations.

To resolve the frame choice ambiguity, one needs a systematic approach. We propose in the next section to accomplish this by optimizing appropriate quantities, e.g., by minimizing the area of the quaternion Gauss map in quaternion space.

We remark that the general features of the surface curvature can in principle be noted from the space of possible frames in a manner similar to that for curves. The family of curves through any point spanning the surface’s tangent space at that point possesses a family of rings parallel to the space of frames at the point, allowing estimates of the rates of change in different directions. The principal curvatures then correspond to the maxima and minima.

Choosing Paths in Quaternion Space

We have now seen that the space of possible frames at any point of a curve or surface thus takes the form of a great circle on the unit three-sphere representing the unit quaternions in 4D Euclidean space. Although diametrically opposite points on this circle represent the same frame in 3D space, the twofold redundancy can actually be an advantage, in that it helps avoid certain types of wraparound problems encountered when trying to find paths in the space. Our task then is to select a set of values of the parameter on each of these great circles.

The advantage of looking at this entire problem in the space of quaternions is that one can clearly compare the intrinsic properties of the various choices by examining such properties as length and smoothness in the three-sphere. We note the following issues.

  • Frame–frame distance: Suppose we are given two neighboring tangents, Frame–frame distance: and Frame–frame distance:2, and two corresponding candidate frame choices parameterized by θ1 and θ2. What is the “distance” in frame space between these? The simplest way to see how we should define the distance is by observing that by Euler’s fundamental theorem there is a single rotation matrix Frame–frame distance: or quaternion Frame–frame distance: that takes one frame to the other. If Frame–frame distance: and Frame–frame distance: are the two frames, one can write R= (R2 · (R1)-1) (or q= (q2* (q1)–1) and solve for θ and Frame–frame distance:. Clearly, the value of θ gives a sensible measure of the closeness of the two frames.

  • Quaternion distance: We remark that essentially the same procedure is required to obtain the parameters of R directly or to find the value of the equivalent quaternion. If we work in quaternion space, we compute Quaternion distance: and Quaternion distance: and then find rather more straightforwardly an equivalent result by noting that the zeroth component of q = q2 * (q1)–1 is identical to the rotation-invariant scalar product of the two quaternions, q1 · q2, and thus provides the needed angle at once:

    θ = 2 arccos(q1 · q2).

  • Approximation by Euclidean distance: Using the methods previously discussed, one can in principle compute precise arc-length distances among frames when dealing with fine tessellations of smoothly varying geometric objects. In this case, it may be sufficient for numerical purposes to estimate frame-to-frame distances using the Euclidean distance in 4D Euclidean space, in that the chord of an arc approximates the arc length well for small angles.

Optimal Path Choice Strategies

Why would one want to choose one particular set of values of the frame parameters over another? The most obvious reason is to keep a tubing from making wild twists such as those that occur for the Frenet frame of a curve with inflection points. In general, one can imagine wanting to minimize the total twisting, the aggregate angular acceleration, and so on subject to a variety of boundary conditions. A bewildering variety of energy functions to minimize can be found in the literature (e.g., see Brakke [22]). The following summarize a selection of such criteria for choosing a space of frames, with the caveat that one certainly may think of others!

  • Minimal length and area: The most obvious criterion is to minimize the total turning angle experienced by the curve frames. Fixing the frames at the ends of a curve may be required by periodicity or external conditions, and thus a good solution would be one that minimizes the sum total of the turning angles needed to get from the starting to the ending frame. The length to minimize is simply the sum of the angles rotated between successive frame choices (as noted previously), either exact or approximate. Similar arguments apply to the area of a surface’s quaternion Gauss map.

  • Parallel transport along geodesics: Given a particular initial frame, and no further boundary constraints, one may also choose the frame that uses the minimum local distance to get between each neighboring frame. Because the parallel transport algorithm corresponding to the Bishop frame uses precisely the smallest possible rotation to get from one frame to the next, this gives the minimal free path that could be computed frame by frame. On a surface, the resulting paths are essentially geodesics, but (as noted in Figure 22.2) there is no obvious analog of a global parallel transport approach to surface framing.

  • Minimal acceleration: Barr, Currin, Gabriel, and Hughes [15] proposed a direct generalization of the no-acceleration criterion of cubic Euclidean splines for quaternion curves constrained to the three-sphere. The basic concept was to globally minimize the squared tangential acceleration experienced by a curve of unit quaternions. Although the main application of that paper was animation, the basic principles can be adopted and used to numerically compute optimal frames for curves and surfaces in our context as well.

  • Keyframe splines and constraints: If for some reason one must pass through or near certain specified frames with possible derivative constraints, a direct spline construction in the quaternion space may actually be preferred (e.g., see Kim et al. [111], Nielson [132], Schlag [145], Shoemake [149,152], and Chapter 25). Most splines can be viewed in some sense as solving an optimization problem with various constraints and conditions, and thus the keyframe problem essentially reverts again to an optimization.

General Remarks on Optimization in Quaternion Space

For both curves and surfaces, there is a single degree of freedom in the frame choice at each point where we can determine the tangent or normal direction, respectively. This degree of freedom corresponds to a relatively common sliding ring constraint that occurs in such minimization problems. General packages for solving systems with constraints are mentioned in Barr et al. [15], who chose MINOS [131]. For our own experiments, we have chosen Brakke’s Surface Evolver package [22], which has a very simple interface for handling parametric constraint conditions and can be used for a wide variety of general optimization problems. See Appendix G for more details on the use of Surface Evolver. Alternatively, one can in principle construct one’s own custom optimization packages.

Numerical optimization remains a bit of an art, requiring patience and resourcefulness on the part of the investigator. We found, for example, that curve optimization was relatively more stable than surface optimization because single curve outliers add huge amounts to the length, whereas single surface points stuck in a faraway crevice may contribute only a tiny amount to the area of a large surface. Although Surface Evolver in principle handles spherical distances, we used the default 4D Euclidean distance measure as an approximation. This generally corresponded well to explicit area calculations using solid angle performed on the same data sets. However, we did find that extremely random initial conditions (unrealistic for most applications) could produce isolated points stuck in local minima diametrically across quaternion space, at q → –q, from where they should be. This type of problem can be largely avoided simply by running a consistency pre-processor to force nearby neighbors to be on the same side of the three-sphere. Another useful technique is to organize the data into hierarchies and optimize from the coarse scale down to the fine scale. In other cases, when things seem unreasonably stuck a manual “simulated annealing” procedure like that afforded by Surface Evolver’s jiggle option often helps.

Examples

We now present some examples of frame choices computed by minimizing the length of the total path among sliding ring constraints for selected curves, and the total area spanned by analogous sliding rings for surfaces. One interesting result is that there appear to be families of distinct minima. If the initial data for a periodic surface, for example, are set up to return directly to the same point in quaternion space after one period, one has two disjoint surfaces (one the q → (–q) image of the other). If the data do not naturally repeat after one cycle, they must after two, because there are only two quaternion values that map to the same frame. The family of frame surfaces containing their own reflected images has a minimum distinct from the disjoint family.

Minimal Quaternion Frames for Space Curves

The helix provides a good initial example of the procedure we have formulated. We know that we can always find an initial framing of a curve based on the geodesic reference algorithm. However, suppose we wish to impose minimal length in quaternion space on the framing we select, and we do not know whether this frame is optimal with respect to that measure. Then, as illustrated in Figure 22.10, we can send the ring constraints on the possible quaternion frames at each sample point to our chosen optimizer and let it automatically find the optimal framing. The results and energies for several stages of this evolution are shown in the figure. The final configuration is indistinguishable from the parallel transport frame, confirming experimentally our theoretical expectation that parallel transport produces the minimal possible twisting.

Starting from the geodesic reference quaternion frame for a single turn of the helix (the very dark gray circle), the optimization produces these intermediate steps while minimizing the total quaternion curve length subject to the constraints in the space of frames. The final result is the white curve, which to several decimal points is identical to the parallel transport quaternion frame for the same helix. The numerical energies of the curves, from dark to light in color, are 3.03, 2.91, 2.82, and 2.66 for the parallel transport frame. The individual tubings used to display these curves are created using the parallel transport frame for each curve.

Figure 22.10. Starting from the geodesic reference quaternion frame for a single turn of the helix (the very dark gray circle), the optimization produces these intermediate steps while minimizing the total quaternion curve length subject to the constraints in the space of frames. The final result is the white curve, which to several decimal points is identical to the parallel transport quaternion frame for the same helix. The numerical energies of the curves, from dark to light in color, are 3.03, 2.91, 2.82, and 2.66 for the parallel transport frame. The individual tubings used to display these curves are created using the parallel transport frame for each curve.

In Figure 22.1, we introduced the question of finding an optimal framing of a particular (3, 5) torus knot whose almost-optimal parallel transport framing was not periodic. In Figure 22.11, we show the solution to this problem achieved by clamping the initial and final quaternion frames to coincide, and then letting the optimizer pick the shortest quaternion path for all other frames. It would be possible, as in the case of the (2, 3) torus knot framing shown in Figure 22.5, to have different conditions produce a framing solution containing its own reflected image rather than having a distinct reflected image (as is the case in Figure 22.11).

Optimization of the nonperiodic parallel transport frame of the (3, 5) torus knot introduced in Figure 22.1 to produce a nearby periodic framing. (a) The original quaternion parallel transport frame used to produce the tubing in Figures 22.1b and 22.1c. (b) The frame mismatch, repeated for completeness. (c) The result of fixing the final frame to coincide with the initial frame, leaving the other frames free to move on the constraint rings and minimizing the resulting total length in quaternion space. The length of the original curve was 13.777, and that of the final was 13.700—not a large difference, but noticeable enough in the tube and the quaternion space plot. (d) Close-up of the corresponding framing of the knot in ordinary 3D space, showing that the mismatch problem has been successfully resolved. This tube can now be textured, because the frames match exactly.

Figure 22.11. Optimization of the nonperiodic parallel transport frame of the (3, 5) torus knot introduced in Figure 22.1 to produce a nearby periodic framing. (a) The original quaternion parallel transport frame used to produce the tubing in Figures 22.1b and 22.1c. (b) The frame mismatch, repeated for completeness. (c) The result of fixing the final frame to coincide with the initial frame, leaving the other frames free to move on the constraint rings and minimizing the resulting total length in quaternion space. The length of the original curve was 13.777, and that of the final was 13.700—not a large difference, but noticeable enough in the tube and the quaternion space plot. (d) Close-up of the corresponding framing of the knot in ordinary 3D space, showing that the mismatch problem has been successfully resolved. This tube can now be textured, because the frames match exactly.

The types of solutions we find are remarkable in that they should be essentially the same for all reparameterizations of the curve. Regardless of the spacing of the sampling, the continuous surface of possible frames is geometrically the same in quaternion space, and thus paths that are minimal for one sampling should be approximately identical to paths for any reasonable sampling. On the other hand, if we want special conditions for certain parameter values it is easy to fix any number of particular orientations at other points on the curve, just as we fixed the starting points previously mentioned. Derivative values and smoothness constraints leading to generalized splines can be similarly specified (see Barr et al. [15]).

Minimal-quaternion-area Surface Patch Framings

A classic simple example of a surface patch framing problem was presented in the discussion of Figures 22.2 and 22.8. This problem can also be handled by numerical optimization. We choose an initial quaternion frame for the mesh corresponding to one of the arbitrary choices noted, and minimize the area in quaternion space subject to the constraint that the normals remain unchanged, and hence the frame choices may only slide around the rings as depicted in Figure 22.8b. The results are shown in Figures 22.12 and 22.13. As a test, we started one case with a random initial state with a range of 2 π in the starting values. All converged to the same optimal final framing. A heuristic observation is that although none of the standard guesses appeared optimal, the geodesic reference frame is very close to optimal for patches that do not bend too much.

(a) The initial geodesic reference quaternions for the small patch shown in Figure 22.2. (b) Initial quaternions from parallel transporting the vertex frame down one edge, and then across line by line. (c) A random starting configuration with the single same fixed corner point as in a and b, and a range of –π to +π relative to the geodesic reference frame. (d) The result of minimization of the quaternion area is the same for all starting configurations. The relative areas are 0.147, 0.154, 0.296, and 0.141, respectively. Thus, the geodesic reference is very close to optimal.

Figure 22.12. (a) The initial geodesic reference quaternions for the small patch shown in Figure 22.2. (b) Initial quaternions from parallel transporting the vertex frame down one edge, and then across line by line. (c) A random starting configuration with the single same fixed corner point as in a and b, and a range of –π to +π relative to the geodesic reference frame. (d) The result of minimization of the quaternion area is the same for all starting configurations. The relative areas are 0.147, 0.154, 0.296, and 0.141, respectively. Thus, the geodesic reference is very close to optimal.

The 3D frame configurations corresponding to the quaternion fields shown in Figure 22.12. (a) The geodesic reference frame. (b) Two-step parallel transport frame. (c) Random frames. (d) The frame configuration resulting from minimizing area in quaternion space.

Figure 22.13. The 3D frame configurations corresponding to the quaternion fields shown in Figure 22.12. (a) The geodesic reference frame. (b) Two-step parallel transport frame. (c) Random frames. (d) The frame configuration resulting from minimizing area in quaternion space.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.181.66