Secant and tangent: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 56: | Line 56: | ||
b1axisy = board.createElement('axis', [[0,0], [0,1]], {}); | b1axisy = board.createElement('axis', [[0,0], [0,1]], {}); | ||
var f = function(x) { return (Math.abs(x)); }; | var f = function(x) { return (Math.abs(x)); }; | ||
graph = board.createElement('curve', ['x', f, 'x', -10, 10], {curveType:'graph'}); | graph = board.createElement('curve', ['x', f, 'x', -10, 10], {curveType:'graph'}); | ||
qf = board.createElement('glider', [4.5,0,graph], {style:6}); | |||
sf = board.createElement('slider', [0,-3,4,-1,1,1],{name:' '}); | |||
qf2 = board.createElement('point', [function(){ return qf.X()+sf.X();}, | |||
function(){ return f(qf.X()+sf.X());}], {style:7}); | |||
ef = board.createElement('point', [function(){ return qf2.X()-qf.X();}, | |||
function(){ return (qf2.Y()-qf.Y())/(qf2.X()-qf.X());}], {style:7,name:'Sekantensteigung',trace:true}); | |||
line = board.createElement('line',[ | line = board.createElement('line',[qf,qf2],{strokeColor:'#ff0000'}); | ||
board.unsuspendUpdate(); | board.unsuspendUpdate(); | ||
</script> | </script> |
Revision as of 13:06, 16 January 2009