7 vertices star geometric shape
var board = JXG.JSXGraph.initBoard('box1', {
boundingbox: [-10, 10, 10, -10],showNavigation:false, showcopyright: false, axis: false,
});
var p1 = board.create('point', [-1, 2.0],{name:' ',face:'',label:{offset:[-20,0]}});
var p2 = board.create('point', [6.5, 2.0],{name:'',face:'',});
var c1 = board.create('circle', [p1, p2],{visible:false});
var l = [];
var updateshape=function(){
var s=[];
var n = 7;
if (/\d*/.test(n)&&n<101){
if(l.length > 0){
for(var i=0;in){
var l2 = board.create('segment', [s[i],s[i+2-n]]);
}else
var l2 = board.create('segment', [s[i],s[i+2]]);
l.push(l2);
}
}
};
updateshape();
Triangle posted 1 year ago