Five Circle Theorem: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 13: | Line 13: | ||
p[4] = brd.createElement('point',[4,0],{name:''}); | p[4] = brd.createElement('point',[4,0],{name:''}); | ||
for (k=0;k<5;k++) { | |||
l[ | l[k] = brd.createElement('segment',[p[k],p[(k+1)%5]],{}); | ||
} | |||
i[0] = brd.createElement('point',[brd.intersection(l[0],l[2],0)],{name:''}); | i[0] = brd.createElement('point',[brd.intersection(l[0],l[2],0)],{name:''}); | ||
Line 30: | Line 28: | ||
c[3] = brd.createElement('circumcircle',[p[3],i[3],i[0]],{}); | c[3] = brd.createElement('circumcircle',[p[3],i[3],i[0]],{}); | ||
c[4] = brd.createElement('circumcircle',[p[4],i[4],i[1]],{}); | c[4] = brd.createElement('circumcircle',[p[4],i[4],i[1]],{}); | ||
for(k=0;k<5;k++) { | for (k=0;k<5;k++) { | ||
c[k][1].setProperty({strokeColor:'gray',strokeWidth:1}); | c[k][1].setProperty({strokeColor:'gray',strokeWidth:1}); | ||
c[k][0].setProperty({visible:false}); | c[k][0].setProperty({visible:false}); |
Revision as of 19:39, 16 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:''});
l[0] = brd.createElement('segment',[p[0],p[1]],{});
l[1] = brd.createElement('segment',[p[1],p[2]],{});
l[2] = brd.createElement('segment',[p[2],p[3]],{});
l[3] = brd.createElement('segment',[p[3],p[4]],{});
l[4] = brd.createElement('segment',[p[4],p[0]],{});
i[0] = brd.createElement('point',[brd.intersection(l[0],l[2],0)],{name:''});
i[1] = brd.createElement('point',[brd.intersection(l[1],l[3],0)],{name:''});
i[2] = brd.createElement('point',[brd.intersection(l[2],l[4],0)],{name:''});
i[3] = brd.createElement('point',[brd.intersection(l[3],l[0],0)],{name:''});
i[4] = brd.createElement('point',[brd.intersection(l[4],l[1],0)],{name:''});
c[0] = brd.createElement('circumcircle',[p[0],i[0],i[2]],{});
c[1] = brd.createElement('circumcircle',[p[1],i[1],i[3]],{});
c[2] = brd.createElement('circumcircle',[p[2],i[2],i[4]],{});
c[3] = brd.createElement('circumcircle',[p[3],i[3],i[0]],{});
c[4] = brd.createElement('circumcircle',[p[4],i[4],i[1]],{});
for(k=0;k<5;k++) {
c[k][1].setProperty({strokeColor:'gray',strokeWidth:1});
c[k][0].setProperty({visible:false});
l[k].setProperty({strokeColor:'gray',strokeWidth:1});
}
j[0] = brd.createElement('point',[brd.intersection(c[0][1],c[2][1],0)],{style:4,name:''});
j[1] = brd.createElement('point',[brd.intersection(c[0][1],c[3][1],1)],{style:4,name:''});
j[2] = brd.createElement('point',[brd.intersection(c[3][1],c[1][1],1)],{style:4,name:''});
j[3] = brd.createElement('point',[brd.intersection(c[1][1],c[4][1],1)],{style:4,name:''});
j[4] = brd.createElement('point',[brd.intersection(c[4][1],c[2][1],1)],{style:4,name:''});
cc = brd.createElement('circumcircle',[j[0],j[2],j[3]],{strokeColor:'red'});
cc.setProperty({strokeColor:'red',strokeWidth:2});