Reuleaux pentagon

From JSXGraph Wiki
Revision as of 07:03, 30 September 2010 by A WASSERMANN (talk | contribs)

The underlying JavaScript code

var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-5,5,5,-5]});
var A = brd.create('point',[-2,-2]);
var B = brd.create('point',[2,-2]);
var pol = brd.create('regularpolygon',[A,B,5], {withLines:false});

for (var i=0;i<5;i++) {
    brd.create('arc',[pol.vertices[i],pol.vertices[(i+2)%5],pol.vertices[(i+3)%5]]);
}


var C = brd.create('point',[-1,-1]);
var D = brd.create('point',[1,-1]);
var pol3 = brd.create('regularpolygon',[C,D,3], {withLines:false});

for (i=0;i<3;i++) {
    brd.create('arc',[pol3.vertices[i],
                      pol3.vertices[(i+1)%3],
                      pol3.vertices[(i+2)%3]]);
}