Secant and tangent: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 15: | Line 15: | ||
p[1] = board.createElement('point', [-0.5,1], {style:4}); | p[1] = board.createElement('point', [-0.5,1], {style:4}); | ||
p[2] = board.createElement('point', [2,-1], {style:4}); | p[2] = board.createElement('point', [2,-1], {style:4}); | ||
p[3] = board.createElement('point', [ | p[3] = board.createElement('point', [5,3], {style:4}); | ||
var polynomial = function(x) { | var polynomial = function(x) { | ||
var i; | var i; | ||
Line 40: | Line 40: | ||
q2 = board.createElement('point', [function(){ return q.X()+s.X();}, | q2 = board.createElement('point', [function(){ return q.X()+s.X();}, | ||
function(){ return polynomial(q.X()+s.X());}], {style:7}); | function(){ return polynomial(q.X()+s.X());}], {style:7}); | ||
line = board.createElement('line',[q,q2],{strokeColor:'#ff0000'}); | |||
board.unsuspendUpdate(); | board.unsuspendUpdate(); | ||
</script> | </script> |
Revision as of 17:32, 10 January 2009