# Difference between revisions of "Circular arc approximation by cubic Bezier curve"

From JSXGraph Wiki

Jump to navigationJump to searchA WASSERMANN (talk | contribs) |
A WASSERMANN (talk | contribs) |
||

Line 16: | Line 16: | ||

r = M.Dist(A); | r = M.Dist(A); | ||

d = Math.sqrt((ax+bx)*(ax+bx) + (ay+by)*(ay+by)); | d = Math.sqrt((ax+bx)*(ax+bx) + (ay+by)*(ay+by)); | ||

− | + | return 0.5; | |

− | if ( | + | if (Math.abs(by-ay)>JXG.Math.eps) { |

return (ax+bx)*(r/d-0.5)*8.0/3.0/(by-ay); | return (ax+bx)*(r/d-0.5)*8.0/3.0/(by-ay); | ||

} else { | } else { |