Difference between revisions of "Bezier curves II"

From JSXGraph Wiki
Jump to navigationJump to search
Line 14: Line 14:
 
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
  
l.push(brd.createElement('segment',[p[0],p[1]]{strokeOpacity:0.5}));
+
l.push(brd.createElement('segment',[p[0],p[1]],{strokeOpacity:0.5}));
  
 
var c = brd.createElement('curve', JXG.Math.Numerics.bezier(p), {strokecolor:'blue', strokeOpacity:0.6, strokeWidth:5});  
 
var c = brd.createElement('curve', JXG.Math.Numerics.bezier(p), {strokecolor:'blue', strokeOpacity:0.6, strokeWidth:5});  

Revision as of 13:14, 28 September 2009

The red points are connected by a cubic Bezier curve. The blue points are the control points.

The underlying JavaScript code