Five Circle Theorem: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 27: Line 27:
}
}
for (k=0;k<5;k++) {
for (k=0;k<5;k++) {
   j[k] = brd.createElement('point',[brd.intersection(c[k][1],c[(k+2)%5][1],0)],{style:4,name:''});
   j[k] = brd.createElement('point',[brd.intersection(c[k][1],c[(k+2)%5][1],0)],{name:'',strokeColor:'#EA0000',fillColor:'#EA0000'});
}
}


cc = brd.createElement('circumcircle',[j[0],j[2],j[3]],{strokeColor:'red'});
cc = brd.createElement('circumcircle',[j[0],j[2],j[3]],{});
cc[1].setProperty({strokeColor:'red',strokeWidth:2});
cc[1].setProperty({strokeColor:'red',strokeWidth:2});
cc[0].setProperty({strokeColor:'#000000',fillColor:'#000000',style:3});


</jsxgraph>
</jsxgraph>

Revision as of 14:31, 17 September 2009

The underlying JavaScript code

var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-5,5,5,-5]});
var p = [];
var l = [];
var i = [];
var c = [];
var j = [];

p[0] = brd.createElement('point',[-2.5,-3],{name:''});
p[1] = brd.createElement('point',[-0,4],{name:''});
p[2] = brd.createElement('point',[2.5,-3],{name:''});
p[3] = brd.createElement('point',[-4,0],{name:''});
p[4] = brd.createElement('point',[4,0],{name:''});

for (k=0;k<5;k++) {
   l[k] = brd.createElement('segment',[p[k],p[(k+1)%5]],{});
}

for (k=0;k<5;k++) {
   i[k] = brd.createElement('point',[brd.intersection(l[k],l[(k+2)%5],0)],{name:''});
}

for (k=0;k<5;k++) {
   c[k] = brd.createElement('circumcircle',[p[k],i[k],i[(k+2)%5]],{});
   c[k][1].setProperty({strokeColor:'gray',strokeWidth:1});
   c[k][0].setProperty({visible:false});
   l[k].setProperty({strokeColor:'gray',strokeWidth:1});
}
for (k=0;k<5;k++) {
   j[k] = brd.createElement('point',[brd.intersection(c[k][1],c[(k+2)%5][1],0)],{style:4,name:''});
}

cc = brd.createElement('circumcircle',[j[0],j[2],j[3]],{strokeColor:'red'});
cc[1].setProperty({strokeColor:'red',strokeWidth:2});