This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Solution - InterpolationDefine a small number of pointsUse a technique called “interpolation” to invent the extra points for us.Join the points with a series of (short) straight lines
Interpolation CurvesCurve is constrained to pass through all control pointsGiven points P0, P1, ... Pn, find lowest degree polynomial which passes through the points
An alternative to interpolation splinesM. Bezier was a French mathematician who worked for the Renault motor car company.He invented his curves to allow his firm’s computers to describe the shape of car bodies.
Curves & Control PointsBezier curves are used in computer graphics to produce curves which appear reasonably smooth at all scales.Bezier curves use a construction due to Sergei Bernstein, in which the interpolating polynomials depend on certain control points.
Each set of four points P0, P1, P2, P3 we associate a curve with the following properties: It starts at p0 and ends at p3. When it starts from p0 it heads directly towards p1, and when it
arrives at p3 it is coming from the direction of p2. The entire curve is contained in the quadrilateral whose corners
Bezier Curves- PropertiesNot all of the control points are on the line– Some just attract it towards themselvesPoints have “influence” over the course of the line
“Influence” (attraction) is calculated from a polynomial expression
Write 1 = t + (1-t) and raise 1 to the third power for cubic splines (2 for quadratic, 4 for quartic, etc…)1^3 = (t + (1-t))^3 = t^3 + 3t^2(1-t) + 3t(1-t)^2 + (1-t)^3
The basis functions are the four terms:B0(t) = (1-t)^3
Bernstein PolynomialsGiven a set of control points {Pi}N
i=0, where Pi = (xi, yi). A Bezier curve of degree N is:
P(t) = Ni=0 PiBi,N(t),Where Bi,N(t), for I = 0, 1, …, N, are the Bernstein
polynomials of degree N.P(t) is the Bezier curve
Since Pi = (xi, yi)x(t) = Ni=0xiBi,N(t) and y(t) = Ni=0yiBi,N(t)The spline goes through (x0,y0) and (x3,y3)The tangent at those points is the line connecting (x0,y0) to (x1,y1) and (x3,y3) to (x2,y2).The positions of (x1,y1) and (x2,y2) determine the shape of the curve.
Find the Bezier curve which has the control points (2,2), (1,1.5), (3.5,0), (4,1). Substituting the x- and y-coordinates of the control points and N=3 into the x(t) and y(t) formulas on the previous slide yields
Properties of Bezier CurvesThe degree of the bezier curve is one less than the number of control point defining it.N=control point-1The curve generally follows the shape of the defining polygon (i.e. polygon formed by connecting the control points.)
The Bezier Curve is always contained within the convex hull of its control points. This is extremely useful for collision detection, because a bounding box to the Bezier curve’s control points can be created very fast.
More About BezierIf we map every point on the Bezier curve with an affine map, the resulting points also form a Bezier curve. This is extremely useful in computer graphics, because if we have a curve in 3D-space and need to project it on a surface, the only thing we have to do is to project each control point. The same goes for rotation, mirroring, skewing etc.
More About Bezier (Cont’d)If we change a control point, the curve will mostly change around that control point. The other parts of the curve will change very little. This is one reason Bezier curves are used in CAD.If you change one control point a little, you don’t want the whole
The word “spline” comes from the ship building industry, where it originally meant a thin strip of wood which draftsmen would use like a flexible French curve.Metal weights (called “ducks”) were placed on the drawing surface and the spline was threaded between the ducks as in Figure .
A B-spline is defined by an ordered set of control points which determines what path the curve will follow and consequently how the curve will look. A longer B-spline is actually made up of several curve segments, each one of which is defined by some number of control points inits vicinity
A point on a particular curve segment is calculated by simply adding up the coordinate values of its defining control points after they have been multiplied by a weighting factor. The weighting factor is calculated using a set of parametric basis or blending functions.
Spline NotationA B-spline curve P(t), is defined by
Where • the {Pi : i = 0, 1, ..., n} are the control points• k is the order of the polynomial segments of the B-spline curve.
Order k means that the curve is made up of piecewise polynomial segments of degree k − 1
• The Ni, k(t) are the “normalized B-spline blending functions”. They are described by the order k and by a non-decreasing sequence of real numbers {ti : i = 0, ..., n + k}normally called the “knot sequence”.
For n+1 control points the curve is described with n +1 blendingfunctions.Each blending function Bk,d is defined over d subintervals of the total range of u, starting at knot value uk.The range of parameter u is divided into n + d ,subintervals by the n + d + 1 values specified in the knot vector.
Properties (Cont’d..)Each section of the spline curve ( between 2 successive knot values) is influenced by d control points.Any one control point can affect the shape of at most d curve sections.
Knot VectorA knot vector is a list of parameter values, or knots, that specify the parameter intervals for the individual Bezier curves that make up a B-spline.
The knot vector can, by its definition, be any sequence of numbers provided that each one is greater than or equal to the precedingone.
Example: 5 Control PointsThe picture below shows a set of 5 control points (so n+1=5), and two separate B-Spline curves through them. The red curve has k=3, while the blue curve has k=4. The knot vector used was uniform. In the case with k=3, there are n+k+1=8 knots: 0,1,2,3,4,5,6,7, while in the case with k=4, there are 9 knots: 0,1,2,3,4,5,6,7,8.
Why use BsplinesB-spline curves require more information (i.e., the degree of the curve and a knot vector) and a more complex theory than Bezier curves. But, it has more advantages:B-spline curve can be a Bézier curve.B-spline curves satisfy all important properties that Bézier curves have.B-spline curves provide more control flexibility than Bézier curves can do. For example, the degree of a B-spline curve is separated from the number of control points. More precisely, we can use lower degree curves and still maintain a large number of control points.
SummaryA Curve is specified by set of points called the control point.The shape of the curve should not get affected when the control points are measured.The control points control the shape interactively and hence a designer tries to manipulate the shape of the curve by moving the control points in a neighborhood.Most shapes are simply too complicated to define using a single
Bezier curve. A spline curve is a sequence of curve segments that are connected
together to form a single continuous curve. Blending functions are a set of functions which are used to
represent curve.Knot Vector specify the parameter intervals for the individual Bezier curves that make up a B-spline.
Exercise (Cont’d..)Q.2 Attempt all questions:a.‘Bezier Curve do not allow for local control of the curve shape’.
Justify.b. Give the blending functions for uniform quadratic B-spline with
knot vectors [0, 1, 2, 3, 4, 5, 6]
c. What are the boundary conditions for periodic cubic splines with four control points?
d. What do you understand by C1 and C2 continuity between two cubic Bezier segments? Derive the conditions for the same in terms of control point of the two cubic Bezier curve segments.
e. Define B-spline. What do you mean by knot vector?