Jaxgraph demo the sum of distances from any point on elllipse to the two focal points is constant

						JXG.Options.text.useKatex = true;
JXG.Options.axis.ticks.majorHeight = 10;
JXG.Options.axis.ticks.insertTicks = false;
JXG.Options.axis.ticks.ticksDistance = 100;
var board = JXG.JSXGraph.initBoard('box1', {
boundingbox:[-10, 10, 10, -10],showNavigation:false, showcopyright: false, axis: true,
});

 var F1 = board.create('point', [-6,0],{name:'F1',fixed:true, label:{offset:[-40,10]}});
var F2 = board.create('point', [function(){return -F1.X()},function(){return F1.Y();}],{name:'F2',label:{offset:[15, 10]}});
var p1 = board.create('point', [1,3],{name:'',size:0,fixed:true});
var el = board.create('ellipse',[F1,F2,p1],{strokeColor:'red'});
var g1 = board.create('glider', [2.0, 1.5, el],{name:'P'});
var l1 = board.create('segment', [F1, g1],{strokeWidth:1});
var l2 = board.create('segment', [F2, g1],{strokeWidth:1});
 board.create('text',[1,9.5, function(){ return "PF1 = "+ l1.L().toFixed(2);}],{fontSize: 10});
  board.create('text',[1,7.5, function(){ return "PF2 = "+ l2.L().toFixed(2);}],{fontSize: 10});
  board.create('text',[1,5.5, function(){ return "PF1+ PF2 = "+(l1.L()+ l2.L()).toFixed(1);}],{fontSize: 10});
 					

Triangle posted 13 hours ago

Scroll to Top