Difference between revisions of "Arc length"

From JSXGraph Wiki
Jump to navigationJump to search
Line 3: Line 3:
 
var n = brd.createElement('slider',[[1,3],[5,3],[1,10,50]],{name:'n'});
 
var n = brd.createElement('slider',[[1,3],[5,3],[1,10,50]],{name:'n'});
 
var f = function(x){ return 0.2*x*x+2.0*Math.sin(x); }
 
var f = function(x){ return 0.2*x*x+2.0*Math.sin(x); }
var plot = brd.createElement('functiongraph',[f]);
+
var plot = brd.createElement('functiongraph',[f], {strokeWidth:1);
 
var start = -3.0;
 
var start = -3.0;
 
var end = 5.0;
 
var end = 5.0;
var sc = brd.createElement('curve',[[0],[0]]);
+
var sc = brd.createElement('curve',[[0],[0]],{dash:1,strokeWidth:1,strokeColor:'red'});
 
sc.updateDataArray = function() {
 
sc.updateDataArray = function() {
 
   var i;
 
   var i;

Revision as of 17:33, 11 June 2009

The underlying JavaScript code