Usage (signatures)
board.create('cardinalspline', [...point, tau, typeopt]);
Parameters are the points for the spline interpolation.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
point |
PointLike |
<repeatable> |
Unspecified number of points |
|
tau |
NumberLike | Tension parameter |
||
type |
String |
<optional> |
'uniform'
|
Type of the cardinal spline, may be 'uniform' (default) or 'centripetal' |
Example
// Create a cardinal spline out of an array of points with adjustable tension
// Create array of points
var p = [];
p.push(board.create('point',[0,0]));
p.push(board.create('point',[1,4]));
p.push(board.create('point',[4,5]));
p.push(board.create('point',[2,3]));
p.push(board.create('point',[3,0]));
// tension
var tau = board.create('slider', [[-4,-5],[2,-5],[0.001,0.5,1]], {name:'tau'});
var c = board.create('cardinalspline', [p, function(){ return tau.Value();}], {strokeWidth:3});
Attributes
Own
createPoints
- Description
Controls if the data points of the cardinal spline when given as arrays should be converted into JXG.Points.
- Type
- Boolean
- Default Value
- true
- See
- Source
- options.js, line 4795
isArrayOfCoordinates
- Description
If set to true, the supplied coordinates are interpreted as [[x_0, y_0], [x_1, y_1], p, ...]. Otherwise, if the data consists of two arrays of equal length, it is interpreted as [[x_o x_1, ..., x_n], [y_0, y_1, ..., y_n]]
- Type
- Boolean
- Default Value
- true
- Source
- options.js, line 4810
points
- Description
Attributes for the points generated by Cardinalspline in cases createPoints is set to true
- Type
- Object
- See
- Source
- options.js, line 4825
Inherited
Members
Own
none
Inherited
Events
Own
none