1

I am trying to draw a circle using 4 Quadratic Bézier curves. By referring https://www.degruyter.com/document/doi/10.1515/math-2016-0012/html.

$$C(t) = (1-t)^2P_0 + 2(1-t)tP_1 + t^2P_2.$$

enter image description here

If the arc is like this, the $t = 0.5$ and $C(t) = Radius$, so I can get the an equation:

$$Radius = (1-0.5)^2cos(\theta)Radius + 2(1-0.5)0.5P_1 + t^2cos(\theta)Radius$$

then I can get the control point, and use these to draw a $1/4$ arc and rotate it to make a circle.

$$P_1 = 2Radius - cos(\theta)Radius$$

but the circle I drew looks like, is there anything I did wrong? How to make the circle round?

enter image description here

JustWe
  • 111
  • For circles, and other conic sections, you may wish to consider rational Bezier curves. I have used these for various problems with great success. See, for example, https://pages.mtu.edu/~shene/COURSES/cs3621/NOTES/spline/NURBS/RB-conics.html. – Cye Waldman Sep 04 '23 at 18:29

1 Answers1

1

The Quadratic Bezier curve with control points $P_{0}$, $P_{1}$, and $P_{2}$ is initially tangent (i.e., at $P_{0}$) to the segment $P_{0}P_{1}$, and terminally tangent (i.e., at $P_{2}$) to $P_{1}P_{2}$. To get a "smooth" closed curve from four parabolas it's necessary to take the control points to be corners and side midpoints of a square:

Approximation to a circle made of four quadratic splines

This curve is also visibly not round. If you must use quadratic splines, the "optimal curve" may need to be determined qualitatively, balancing corners against over-extension along the axes.

Cubic splines can do better, but ultimately the problem is that a circle is not a union of splines.