Five Circle Theorem: Difference between revisions

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


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


cc = brd.create('circumcircle',[j[0],j[2],j[3]],{});
cc = brd.create('circumcircle',[j[0],j[2],j[3]],{strokeColor:'red',strokeWidth:2,point:{strokeColor:'#000000',fillColor:'#000000',size:1}});
cc[1].setProperty({strokeColor:'red',strokeWidth:2});
brd.update();
cc[0].setProperty({strokeColor:'#000000',fillColor:'#000000',style:3});
</jsxgraph>
</jsxgraph>


Line 52: Line 49:


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


cc = brd.create('circumcircle',[j[0],j[2],j[3]],{});
cc = brd.create('circumcircle',[j[0],j[2],j[3]],{strokeColor:'red',strokeWidth:2,point:{strokeColor:'#000000',fillColor:'#000000',size:1}});
cc[1].setProperty({strokeColor:'red',strokeWidth:2});
brd.update();
cc[0].setProperty({strokeColor:'#000000',fillColor:'#000000',style:3});
</source>
</source>


[[Category:Examples]]
[[Category:Examples]]
[[Category:Geometry]]
[[Category:Geometry]]

Revision as of 14:26, 7 June 2011

The underlying JavaScript code

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

p[0] = brd.create('point',[-2.5,-3],{name:'',strokeColor:'#7355ff',fillColor:'#7355ff'});
p[1] = brd.create('point',[-0,4],{name:'',strokeColor:'#7355ff',fillColor:'#7355ff'});
p[2] = brd.create('point',[2.5,-3],{name:'',strokeColor:'#7355ff',fillColor:'#7355ff'});
p[3] = brd.create('point',[-4,0],{name:'',strokeColor:'#7355ff',fillColor:'#7355ff'});
p[4] = brd.create('point',[4,0],{name:'',strokeColor:'#7355ff',fillColor:'#7355ff'});

for (k=0;k<5;k++) {
   l[k] = brd.create('segment',[p[k],p[(k+1)%5]],{strokeColor:'black',strokeWidth:1});
}

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

for (k=0;k<5;k++) {
   c[k] = brd.create('circumcircle',[p[k],i[k],i[(k+2)%5]],{strokeColor:'gray', strokeWidth:1, point: {visible: false}});
}
for (k=0;k<5;k++) {
   j[k] = brd.create('point',[brd.intersection(c[k],c[(k+2)%5],0)],{name:'',strokeColor:'#EA0000',fillColor:'#EA0000'});
}

cc = brd.create('circumcircle',[j[0],j[2],j[3]],{strokeColor:'red',strokeWidth:2,point:{strokeColor:'#000000',fillColor:'#000000',size:1}});
brd.update();