Bezier curves: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 1: Line 1:
<jsxgraph width="600" height="600">
<jsxgraph width="600" height="600">
var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-4,4,4,-4],keepaspectratio:true});
var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-4,4,4,-4],keepaspectratio:true,axis:true});


var p = [];
var p = [];
Line 7: Line 7:
p.push(brd.createElement('point',[2,1],{strokeColor:col,fillColor:col}));        // data point
p.push(brd.createElement('point',[2,1],{strokeColor:col,fillColor:col}));        // data point
col = 'blue';  
col = 'blue';  
p.push(brd.createElement('point',[0.75,2.5,1],{strokeColor:col,fillColor:col})); // control point
p.push(brd.createElement('point',[0.75,2.5],{strokeColor:col,fillColor:col})); // control point
p.push(brd.createElement('point',[-0.3,0.3],{strokeColor:col,fillColor:col}));  // control point
p.push(brd.createElement('point',[-0.3,0.3],{strokeColor:col,fillColor:col}));  // control point


Line 13: Line 13:
p.push(brd.createElement('point',[-3,1],{strokeColor:col,fillColor:col}));      // data point
p.push(brd.createElement('point',[-3,1],{strokeColor:col,fillColor:col}));      // data point
col = 'blue';  
col = 'blue';  
p.push(brd.createElement('point',[-0.75,-2.5,1],{strokeColor:col,fillColor:col})); // control point
p.push(brd.createElement('point',[-0.75,-2.5],{strokeColor:col,fillColor:col})); // control point
p.push(brd.createElement('point',[1.5,-2.8],{strokeColor:col,fillColor:col}));    // control point
p.push(brd.createElement('point',[1.5,-2.8],{strokeColor:col,fillColor:col}));    // control point



Revision as of 08:53, 28 September 2009