Least-squares circle fitting: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<jsxgraph width="600" height="600"> | <jsxgraph width="600" height="600"> | ||
var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-5,5,5,-5], keepaspectratio:true}); | var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-5,5,5,-5], keepaspectratio:true}); | ||
var i p = [], angle, co, si; | |||
for (i=0;i<50;i++) { | |||
angle = Math.Random()*2*Math.PI; | |||
co = 4*Math.cos(angle); | |||
si = 4*Math.sin(angle); | |||
p.push(brd.create('point',[co, si], {withLabel:false}); | |||
} | |||
</jsxgraph> | </jsxgraph> |