Graphics Reference
In-Depth Information
Figure 9.37. Control point equation shown visually.
The six control points along the edge are computed using the tangent plane defined
by each control point's nearest vertex. Identifying the location of the edge mid-point is a
trivial linear interpolation along the edge based on the corresponding vertices, as shown in
Equation (9.3). Defining the tangent plane using the vertex and its normal, Equation (9.4),
is a stock formula used throughout computer graphics. Combining these two elements into
Equation (9.5) will generate the appropriate control point. Figure 9.37 shows how these
three equations work together to generate the control points introduced in Figure 9.36:
Q=p i +
τ{p j -p i );
(93)
P = (P x ,P y ,P z ),
N=(N,N,N),
(9-4)
0 = xN x + yN y + zN z + (-N*P);
Q' =
Q-N×((Q-P)*N).
(9.5)
This still leaves the center control point to be generated. Computing the six control
points along the edges actually forms a ring around this remaining location, a property that
can be used to our advantage. Raising the midpoint from its position on the original triangle
(Equation (9.6)) relative to this ring of surrounding control points (Equation (9.7)) using
simple linear interpolation yields a desirable result. Choosing the halfway point between
these keeps the final tessellated surface close to the original triangle geometry, leading to
more predictable outputs with respect to their original coarse triangulations. Equation (9.8)
shows the final position for this control point:
Search WWH ::




Custom Search