Making Smooth Curves
 | Cubic polynomials offer variety and flexibility |
 | Goals when defining and editing, i.e., small changes to input cause small
changes in output
 | local control of shape |
 | stability |
 | smoothness and continuity when combining |
 | ease of rendering |
|
 | Degrees of smoothness, i.e., continuity
 | parametric: differentiability of parametric representation (C0, C1,
C2, ...) |
 | geometric: smoothness of resulting displayed shape (G0=C0,
G1=tangent-cont., G2=curvature-cont. ) |
|
Control Points
 | Provide degrees of freedom, DOF, in specifying curve |
 | Levels of flexibility
 | must be points on curve |
 | start and end of curve plus tangents at start and end |
 | no points on curve, instead curve is interpolated through points using
blending functions |
|
Splines
 | Originally used in ship building to bend wood into hull shape |
 | Also used in model
railroads |
 | Modeled in OpenGL using evaluators to generate vertices from array
of control points |
 | Modeled in GLU using NURBS object |
Rendering Curves
 | Can be expensive for high-quality approximation if simply evaluate at each
point |
 | Evaluate using Horner's rule for factoring reduces multiples to O(n) |
 | Approximate by sub-dividing control points based on de Casteljau's
geometric construction |
 | Approximate using forward differencing reduces to adding pre-computed
constants each step |
Example
 | teapot.cpp
rendering the Utah teapot using spline patches |
References
|