Secant and tangent: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 37: Line 37:


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,-3],[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.01);},
       function(){ return polynomial(q.X()+Math.max(s.X(),0.01));}], {style:7});
       function(){ return polynomial(q.X()+Math.max(s.X(),0.01));}], {style:7});
Line 60: Line 60:


         qf = board.createElement('glider', [0,0,graph], {style:6});
         qf = board.createElement('glider', [0,0,graph], {style:6});
         sf = board.createElement('slider', [0,-3,4,-1,1,1],{name:' '});
         sf = board.createElement('slider', [[0,-3],[4,-3],[0.001,1,1]],{name:' '});
         qf2 = board.createElement('point', [function(){ return qf.X()+sf.X();},
         qf2 = board.createElement('point', [function(){ return qf.X()+sf.X();},
                             function(){ return f(qf.X()+sf.X());}], {style:7});
                             function(){ return f(qf.X()+sf.X());}], {style:7});
Line 83: Line 83:


         qg = board.createElement('glider', [0,0,graph], {style:6});
         qg = board.createElement('glider', [0,0,graph], {style:6});
         sg = board.createElement('slider', [0,-3,4,0,1,1],{name:' '});
         sg = board.createElement('slider', [[0,-3],[4,-3],[0.001,1,1]],{name:' '});
         qg2 = board.createElement('point', [function(){ return qg.X()+sg.X();},
         qg2 = board.createElement('point', [function(){ return qg.X()+sg.X();},
                             function(){ return g(qg.X()+sg.X());}], {style:7});
                             function(){ return g(qg.X()+sg.X());}], {style:7});

Revision as of 15:36, 21 January 2009