The way I worked on this problem completely reduced my own implementation of the circular curve approximation using Bezier curves. Detailed implementation information can be found here http://www.tinaja.com/glib/ellipse4.pdf .
function magic_circle(ctx, x, y, r){ m = 0.551784 ctx.save() ctx.translate(x, y) ctx.scale(r, r) ctx.beginPath() ctx.moveTo(1, 0) ctx.bezierCurveTo(1, -m, m, -1, 0, -1) ctx.bezierCurveTo(-m, -1, -1, -m, -1, 0) ctx.bezierCurveTo(-1, m, -m, 1, 0, 1) ctx.bezierCurveTo( m, 1, 1, m, 1, 0) ctx.closePath() ctx.restore() }
Only with these four segments was I able to get closer to the circle much better than building google chrome canvas implementations.
source share