1.12k likes | 1.16k Views
V. Space Curves. Types of curves Explicit Implicit Parametric. Modeling with curves. interpolating data point. data points. approximating curve. Curves with explicit representation. p (t). p (t 2 ). p (t 1 ). Curves with implicit representation Intersect two surface to get a curve.
E N D
V. Space Curves • Types of curves • Explicit • Implicit • Parametric
Modeling with curves interpolating data point data points approximating curve • Curves with explicit representation
p(t) p(t2) p(t1) • Curves with implicit representation • Intersect two surface to get a curve • Parametric space curves • , • Example: The parametric equations of the circular helix are given by
Selecting Functions • Usually we can select “good” functions • not unique for a given spatial curve • Approximate or interpolate known data • Want functions which are easy to evaluate • Want functions which are easy to differentiate • Computation of normals • Connecting pieces (segments) • Want functions which are smooth
p(1)= p1 p(0) = p0 p(1)= p0 +d d p(0) = p0 Parametric Lines • We can normalize t to be over the interval (0,1) • Line connecting two points p0 and p1 p(t)=(1-t)p0+tp1 • Ray from p0 in the direction d p(u)=p0+td
Parametric Polynomial Curves • If N=M=L, we need to determine 3N coefficients • Equivalently we need 3N independent conditions • Noting that the curves for x, y and z are independent, we can define each independently in an identical manner • We will use the form where P can be any of x, y, z
Cubic Splines • N=M=L=3:
Four coefficients to determine for each of x, y and z • Seek four independent conditions for various values of t resulting in 4 equations in 4 unknowns for eachof x, y and z • Boundary conditions: , and let t1= 0
Piecewise cubic spline through n given position vectors , , with end tangent vectors and • The internal tangent vectors can be determined by imposing the continuity conditions at the internal joints, i.e., the second derivatives or the curvature are continuous across the joints.
In matrix form: , where is a blending function, and contains the geometric information. • Any point on a cubic spline segment is a weighted sum of the end position and tangent vectors
Normalized cubic spline: segment parameter values is normalized to unity, i.e., Blending functions become:
The internal tangent vectors required in , now becomes
Bezier Curves • Mathematically a parametric Bezier curve is defined by where is the position vectors of the vertices of the defining polygon, and is the ith nth-order Bezier or Bernstein basis or blending function. Here n, the degree of the defining Bernstein basis function and thus of the polynomial curve segment, is one less than the number of points in the defining Bezier polygon.
The vertices of the Bezier polygon are numbered from 0 to n. • Properties of Bezier curve • - The basis functions are real. • - The degree of the polynomial defining the curve segment is one less than the number of defining polygon points.
- The curve generally follows the shape of the defining polygon. - The first and last points on the curve are coincident with the first and last points of the defining polygon. - The tangent vectors at the ends of the curve have the same direction as the first and last polygon spans, respectively. - The curve is contained within the convex hull of the defining polygon, i.e., within the largest convex polygon obtainable with the defining polygon vertices - The curve is invariant under an affine transformation.
The maximum value of each blending function occurs at , and is given by
For any given value of the parameter t, the summation of the basis functions is precisely one; i.e.,
For example, considering four defining polygon points ( ), the cubic Bezier curve is given by • The first and second derivatives of a Bezier curve
Two characteristics of the Bernstein basis limit the flexibility of the Bezier curves • - First the number of specified polygon vertices fixes the order of the resulting polynomial which defines the curve. • - Second the global nature of the Bernstein basis limits the ability to produce a local change within a curve. Since the value of the blending function is nonzero for all parameter values over the entire curve and any point on a Bezier curve is a result of blending the values of all defining vertices, a change in one vertex is felt throughout the entire curve
B-spline Curves • B-spline basis function is generally nonglobal. The nonglobal behavior of B-spline curves is due to the fact that each vertex is associated with a unique basis function. • The B-spline basis also allows the order of the basis function and hence the degree of the resulting curve to be changed without changing the number of defining polygon vertices. • A B-spline Curve is given by
where Bi are the position vectors of the defining polygon vertices and are the normalized B-spline basis functions. For the ith normalized B-spline basis function of order k (degree ), the basis functions are defined by the Cox-deBoor recursion formulas: The value of xi are elements of a knot vector satisfying the relation
The parameter t varies from tmin to tmax along the curve P(t) The convention is adopted. • Formally a B-spline curve is defined as a polynomial spline function of order k (degree ) since it satisfies the following two conditions: - The function P(t) is a polynomial of degree on each interval - P(t) and its derivatives of order 1, 2, are all continuous over the entire curve. . • Properties of B-spline curves: - The sum of the B-spline basis functions for any parameter value t can be shown to be
- Each basis function is positive or zero for all parameter values, i.e., - Except for each basis function has precisely one maximum value. - The maximum order of the curve is equal to the number of defining polygon vertices. - The curve generally follows the shape of the defining polygon. - Any affine transformation can be applied to the curve by applying it to the defining polygon vertices; i.e., the curve is transformed by transforming the defining polygon vertices. - The curve lies within the convex hull of its defining polygon.
Convex hull property: For a B-spline curve of order k (degree ) a point on the curve lies within the convex hull of k neighboring points
Colinear polygon vertices make the resulting B-spline curve to be a straight line
If at least coincident defining polygon vertices occur, then the convex hull of these vertices is the vertex itself, the resulting B-spline curve must pass through the vertex.
The only requirement for a knot vector is that it satisfy the relation ; , i.e., it is a monotonically increasing series of real numbers. • The number of knot values is . • Fundamentally three types of knot vector are used: uniform, open uniform (or open) and nonuniform. - Uniform knot vector: Individual knot values are evenly spaced, for example: [0 1 2 3 4]; [-0.2 -0.1 0 0.1 0.2]; [0 0.25 0.5 0.75 1.0]. For a given order k, uniform knot vectors yield periodic uniform basis functions for which .