Conic sections: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 11: Line 11:
var brd2=JXG.JSXGraph.initBoard('jxgbox2',{boundingbox:[-3,3,3,-3], keepaspectration:true});
var brd2=JXG.JSXGraph.initBoard('jxgbox2',{boundingbox:[-3,3,3,-3], keepaspectration:true});


var A = brd2.create('point',[-1,2]);
var A = brd2.create('point',[-1,0]);
var B = brd2.create('point',[1,2]);
var B = brd2.create('point',[1,0]);
var s = brd2.create('slider',[[-1,-2],[1,-2],[0,5,10]]);
var s = brd2.create('slider',[[-1,-2],[1,-2],[0,5,10]]);
var ell = brd2.create('ellipse',[A,B,function(){return s.Value();}]);
var ell = brd2.create('ellipse',[A,B,function(){return s.Value();}]);
</jsxgraph>
<jsxgraph width="600" height="400" box="jxgbox3">
var brd3=JXG.JSXGraph.initBoard('jxgbox1',{boundingbox:[-3,3,3,-3], keepaspectration:true});
var A = brd3.create('point',[-1,1]);
var B = brd3.create('point',[1,1]);
var C = brd3.create('point',[0,-1]);
var hyp = brd3.create('hyperbola',[A,B,C]);
</jsxgraph>
<jsxgraph width="600" height="400" box="jxgbox4">
var brd4=JXG.JSXGraph.initBoard('jxgbox2',{boundingbox:[-3,3,3,-3], keepaspectration:true});
var A = brd4.create('point',[-1,0]);
var B = brd4.create('point',[1,0]);
var s = brd4.create('slider',[[-1,-2],[1,-2],[0,5,10]]);
var hyp = brd4.create('hyperbola',[A,B,function(){return s.Value();}]);
</jsxgraph>
<jsxgraph width="600" height="400" box="jxgbox5">
var brd5=JXG.JSXGraph.initBoard('jxgbox1',{boundingbox:[-3,3,3,-3], keepaspectration:true});
var A = brd5.create('point',[-1,1]);
var B = brd5.create('point',[1,1]);
var line = brd5.create('line',[A,B]);
var C = brd5.create('point',[0,-1]);
var hyp = brd5.create('parabola',[line,C]);
</jsxgraph>
</jsxgraph>

Revision as of 12:59, 21 March 2010