views:

593

answers:

2

we have some x, y start point and some circle radius. We have some engen that can create path from bezier curve points. How to create circle with Bézier curves?

+1  A: 

Unfortunately you can not, but yes you can approximate to a circle by using bezier curves. Here is a nice explanation. And this one is much more close to circle, but uses more than 4 curve segment.

bhups
+2  A: 

It is not possible. A Bezier is a cubic (at least... the most commonly used is). A circle cannot be expressed exactly with a cubic, because a circle contains a square root in its equation. As a consequence, you have to approximate.

To do this, you have to divide your circle in n-tants (e.g.quadrants, octants). For each n-tant, you use the first and last point as the first and last of the Bezier curve. The Bezier polygon requires two additional points. To be fast, I would take the tangents to the circle for each extreme point of the n-tant and choose the two points as the intersection of the two tangents (so that basically your Bezier polygon is a triangle). Increase the number of n-tants to fit your precision.

Stefano Borini