Secant and tangent: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 38: Line 38:
q = board.createElement('glider', [4.5,0,graph], {style:6});
q = board.createElement('glider', [4.5,0,graph], {style:6});
s = board.createElement('slider', [0,-3,4,0.001,1,1],{name:' '});
s = board.createElement('slider', [0,-3,4,0.001,1,1],{name:' '});
q2 = board.createElement('point', [function(){ return q.X()+Math.max(s.X(),0.01);},
q2 = board.createElement('point', [function(){ return q.X()+Math.max(s.X(),0.001);},
       function(){ return polynomial(q.X()+Math.max(s.X(),0.01));}], {style:7});
       function(){ return polynomial(q.X()+Math.max(s.X(),0.001));}], {style:7});


line = board.createElement('line',[q,q2],{strokeColor:'#ff0000'});
line = board.createElement('line',[q,q2],{strokeColor:'#ff0000'});

Revision as of 14:07, 12 January 2009