Circular arc approximation by cubic Bezier curve: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 24: | Line 24: | ||
}; | }; | ||
var P1 = brd.create('point', [ | var P1 = brd.create('point', [ | ||
function(){ return | function(){ return A.X()-k(M,A,B)*(A.Y()-M.Y()); }, | ||
function(){ return | function(){ return A.Y()+k(M,A,B)*(A.X()-M.X()); } | ||
], {}); | ], {}); | ||
var P2 = brd.create('point', [ | var P2 = brd.create('point', [ | ||
function(){ return | function(){ return B.X()+k(M,A,B)*(B.Y()-M.Y()); }, | ||
function(){ return | function(){ return B.Y()-k(M,A,B)*(B.X()-M.X()); } | ||
], {}); | ], {}); | ||