Circle approximation: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 7: | Line 7: | ||
var circ = brd.createElement('circle',[p0,p1]); | var circ = brd.createElement('circle',[p0,p1]); | ||
var rot = brd.createElement('transform', [function() {return Math.PI*2.0/n.Value();},p0], {type:'rotate'}); // angle, rotation center | var rot = brd.createElement('transform', [function() {return Math.PI*2.0/n.Value();},p0], {type:'rotate'}); // angle, rotation center | ||
var ptmp = brd.createElement('point',[0,0],{visible:false,withLabel:false}); | var ptmp = brd.createElement('point',[0,0],{visible:false,withLabel:false}); // dummy point for the rotation | ||
var c = brd.createElement('curve',[[],[]]); | var c = brd.createElement('curve',[[],[]]); | ||
Line 21: | Line 21: | ||
} | } | ||
} | } | ||
c.update(); | |||
</jsxgraph> | </jsxgraph> | ||