CurveFitting - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Numerical Computations : Interpolation and Curve Fitting : CurveFitting Package : CurveFitting/BSplineCurve

CurveFitting

  

BSplineCurve

  

compute a B-spline curve

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

BSplineCurve(xydata, v, opts)

BSplineCurve(xdata, ydata, v, opts)

Parameters

xydata

-

list, Array, or Matrix of the form [[x1,y1], [x2,y2], ... , [xn,yn]]; data points

xdata

-

list, Array, or Vector of the form [x1, x2, ..., xn]; independent values

ydata

-

list, Array, or Vector or the form [y1, y2, ..., yn]; dependent values

v

-

name

opts

-

(optional) one or more equations of the form order=k or knots=knotlist

Description

• 

The BSplineCurve routine computes a B-spline curve based on the control points {x1,y1,x2,y2,...,xn,yn}.  The resulting curve is in parametric form xfv,yfv,v=a..b, where xfv and yfv are piecewise functions of v, and a..b is the range over which the B-spline curve is defined.

• 

The BSplineCurve routine can be called in two ways.

  

The first form accepts a list, Array, or Matrix, [[x1,y1],[x2,y2],...,[xn,yn]], of data points.

  

The second form accepts the input data as two lists, two Arrays, or two Vectors. In this form, the first set of data contains the independent values, [x1,x2,...,xn], and the second set of data contains the dependent values, [y1,y2,...,yn].  Each element must be of type algebraic.

• 

A cubic (order 4) B-spline curve is produced, unless the order=k (where 0<k<=n+1 ) option is provided. An order k B-spline curve has polynomial pieces of degree less than k.

• 

A uniform knot list is used by the procedure, but a different knot list can be specified using the knots=knotlist option.  The list knotlist must contain exactly n&plus;k values.  These values must be in nondecreasing order; otherwise, unexpected results may be produced.  If the knots=knotlist option is the only option provided, then an order 4 B-spline is assumed.  Knots can have a multiplicity up to k1.  If the multiplicity of a knot is m, then the continuity at that knot is Ckm1.

• 

The B-spline curve is defined only on the range v=knotlistk...knotlistn+1.  For any value of v in this range, all k blending functions are present in the B-spline curve.  These blending functions are computed by the CurveFitting[BSpline] procedure.

• 

This function is part of the CurveFitting package, and so it can be used in the form BSplineCurve(..) only after executing the command with(CurveFitting).  However, it can always be accessed through the long form of the command by using CurveFitting[BSplineCurve](..).

Examples

The following example produces a cubic (order 4) B-spline curve using a uniform knot list.

withCurveFitting&colon;

xydata0&comma;0&comma;1&comma;1&comma;4&comma;9&comma;6&comma;10&comma;8&comma;5&comma;8&comma;3

c1BSplineCurvexydata&comma;v

Use the plot command to see the resulting curve on the defined range, along with the boundary defined by the input points.

plotc1&comma;xydata

The next example produces a quadratic (order 3) B-spline from the same input points, but with multiply-defined knot values.

c2BSplineCurvexydata&comma;v&comma;order&equals;3&comma;knots&equals;0&comma;0&comma;1&comma;2&comma;3&comma;3&comma;4&comma;5&comma;6

plotc2&comma;xydata

See Also

CurveFitting

CurveFitting[BSpline]

plot

type/algebraic

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam