I need to programatically generate two-dimensional circles of various dimensions, knowing only their radius and position. The circles will be drawn by employing 4 cubic Bezier curves. How should I calculate the Cartesian coordinates of the two intermediary control points of each arc?
Calculate intermediary control points in Cubic Bezier Curves
1
$\begingroup$
bezier-curve
1 Answers
2
Wikipedia has it all worked out.
The control points between $(1,0)$ and $(0,1)$ are at $(1,k)$ and $(k,1)$ with $k=\frac43(\sqrt2-1)$.
-
0@ElisevanLooij: No, they're coordinates. Your $p_0$ and $p_3$ don't define a unique arc; even if I assume that you want a quarter-circle, there are two different quarter-circles with those two endpoints. Find a linear transformation that maps the quarter-circle about the origin through $(1,0)$ and $(0,1)$ to the quarter-circle you want, then apply that transformation to $(1,k)$ and $(k,1)$ to get the control points. – 2016-07-09