The best uniform quadratic approximation of circular arcs with high accuracy

Abstract In this article, the issue of the best uniform approximation of circular arcs with parametrically defined polynomial curves is considered. The best uniform approximation of degree 2 to a circular arc is given in explicit form. The approximation is constructed so that the error function is the Chebyshev polynomial of degree 4; the error function equioscillates five times; the approximation order is four. For θ = π/4 arcs (quarter of a circle), the uniform error is 5.5 × 10−3. The numerical examples demonstrate the efficiency and simplicity of the approximation method as well as satisfy the properties of the best uniform approximation and yield the highest possible accuracy.


Introduction
Bézier curves and surfaces are the most widely used mathematical modelling tools in CAD/CAM systems, see [1][2][3]. One of the main concerns in representing Bézier curves is to keep the degree as low as possible. This simplifies the evaluation, manipulation and determination of a small number of Bézier points. These and other factors encourage us to consider approximating circular arcs using quadratic Bézier curves. Besides many other applications, quadratic Bézier curves are commonly used in encoding and rendering of type fonts and HTML techniques by many companies. Circular arcs are commonly used in the fields of Computer Aided Geometric Design CAGD, Computer Graphics, and many other applications. Since circular arcs are represented by rational Bézier curves and cannot be represented by polynomial curves in explicit form, circular arc representations using polynomial Bézier curves have been developed by many researchers, see for example [4][5][6][7][8][9][10][11][12][13][14].
In this paper, a novel approach to represent a circular arc using quadratic Bézier curves with high accuracy is proposed. The method leads to the solution that minimizes a variation of the Euclidean error.
We want to represent the longest arc of the circle, i.e. the angle Â as large as possible. At the same time, the resulting Bézier curve has to satisfy the Chebyshev error. It is known that the angle Â can not be greater than 2 . So, we consider the circular arc c W t 7 ! .cos.t /; sin.t // ; Â Ä t Ä Â , where Â 2 OE 2 ; 2 . Later, we will find out the largest value for Â that satisfies the Chebyshev error. An illustrative choice for the Bézier points with Â D 4 is shown in Fig. 1.
It is not possible to exactly represent a circle with a polynomial curve. While a circle can be represented exactly using rational Bézier curves, a polynomial approximation is preferred in many applications. The ability to represent a primitive circle is a must, especially in computer graphics and data and image processing. Thus, there is a demand to find a parametrically defined polynomial curve p W t 7 ! .x.t /; y.t // ; 0 Ä t Ä 1, where x.t /; y.t / are polynomials of degree n. The degree of p has to be as small as possible, and p has to approximate c within tolerable error. Having the degree n low makes the software very fast, convenient, obviates complications of high degree, and reduces the cost. In this paper, degree 2 curves are considered, and it is shown that it works well and produces results that are as good as the results of higher degrees. This makes the method competitive. Namely, quadratic Bézier curves are constructed to represent circular arcs with the best quadratic uniform approximation and the highest accuracy.
A possible function to measure the error between p and c is the Euclidean error function: The square root complicates the analysis. Thus to avoid radicals, we find the square of the p components of the circular arc. So, E.t / is replaced by the following error function Note that both e.t/ and E.t / attain their roots and extrema at the same parameters. In this paper, we are interested in finding the quadratic best uniform approximation that has the highest order of approximation and the minimum error. This research is motivated by the conjecture in [11] which states that it is possible to approximate a curve by a polynomial of degree n with order 2n, rather than the classical order n C 1. In quadratic case, the associated error function has to equioscillate five times. Consequently, the approximation problem can be formulated as follows.
The solution to this problem is shown in Section 3 to be as follows: It represents the largest circular arc that can satisfy the Chebyshev error. This solution covers almost half of the circle and is presented in Fig. 3; the corresponding error is shown in Fig. 4. This paper is organized as follows. Section 1 introduces some preliminaries and defines the Bézier points for the best solution (the Bézier curve). The main result is given in Theorem 3.1 in Section 3. In Section 4, the properties of the best solution are presented. Section 5 states all other possible solutions. Section 6 presents comparisons between the quarter of the circle using this method and other existing methods. Conclusions and suggested open problems are given in Section 7.

Preliminaries
Throughout this paper, we use the notations .x.t /; y.t // and x.t / y.t / ! to represent parametric equations, and similarly points, because no ambiguity can appear. In this paper, the curve p.t / is given in Bézier form, see Fig. 2. The Bézier curve p.t / of degree 2 is given by where p 0 ; p 1 ; p 2 are the Bézier points, and the Bernstein polynomials of degree 2. The Bernstein polynomials of degree 2 form a basis for quadratic curves. A quadratic Bézier curve is a linear combination of quadratic Bernstein polynomials and thus every quadratic curve can be written as a quadratic Bézier curve. To represent a whole circle, the circular arc between the points .cos.Â /; sin.Â // and .cos.Â /; sin.Â // is approximated in the first step, see Fig. 1. Thereafter, the rest of the circle is represented by rotation of this segment.
Since it is intended to represent the whole circle with piecewise polynomial curve with minimum error, it is not important where the errors occur, at the end points or elsewhere; it is important to keep this error as small as possible than where the error occurs. Other methods may require continuity conditions, see [15,16].
To represent a circular arc, the Bézier points are chosen to explore symmetry properties of the circle. So, let p 0 D .˛0 cos.Â /; ˇ0 sin.Â //, then by the symmetry of the circular arc the point p 2 should have the form p 2 D .˛0 cos.Â /;ˇ0 sin.Â //. Also, because of the symmetry, p 1 must be on the positive x-axis and thus p 1 D . ; 0/. By making the substitution˛D˛0 cos.Â /;ˇDˇ0 sin.Â /, then the proper choice for the Bézier points should be To have the Bézier curve p in the first and fourth quadrants as the circular arc c, the following conditions should be satisfied˛;ˇ> 0; > 1: Thus, the Bézier polynomial curve p.t / is given by There are three parameters˛;ˇ; that will be used to have the polynomial curve p comply with the conditions of the approximation problem; this is done in the following section.

The best quadratic uniform approximation
The values of˛;ˇ; that minimize the uniform error and satisfy the conditions of the approximation problem are given in the following theorem.
Theorem 3.1. The Bézier curve in (6) with the Bézier points in (4), wherę D˛ WD satisfies the following three conditions: p minimizes the uniform error max t 2OE0;1 je.t /j and approximates c with order four, and the error function e.t / equioscillates five times in OE0; 1. More precisely, the error functions satisfy: Proof. Substituting the components of p.t / into equation (2) for the error function e.t / gives The last equality for e.t / is a polynomial of degree 4. To satisfy the approximation conditions, the values of˛;ˇ; have to be chosen so that the error function e.t / coincides with the monic Chebyshev polynomial of degree 4, see [17]. Substituting the values of˛D˛ ;ˇDˇ ; D from (7) and simplifying gives Making the substitution t D uC1 2 yields The last polynomial is the monic quartic Chebyshev polynomial Q T 4 .u/; u 2 OE 1; 1, which is the unique polynomial of degree 4 that minimizes je.u/j over OE 1; 1 and equioscillates five times between˙1 2 3 for all u 2 OE 1; 1, see [17]. Consequently, p has fourth order of contact with c. The error function e.t / minimized is related to the Euclidean error E.t/ by the following formula Thus Substituting the bounds of e.t / gives jE.t /j: This proves Theorem 3.1.
Conditions (2) and (3) given in Theorem 3.1 are the consequences of the fact that the conditions were imposed on the error function to make it coincide with the monic quartic Chebyshev polynomial. In particular, condition (2) assures the improvement of the order of approximation over the standard order (from 3 to 4). The function of condition (3) is to assure that the approximation is the best uniform approximation which is clear from Fig. 4. Fig. 3 shows the circular arc and the approximating Bézier curve, and Fig. 4 shows the corresponding error. One would not expect a quadratic Bézier curve to approximate almost half a circle more precisely than this. Remarks.
1. The Bézier curve in Theorem 3.1 corresponds to the angle Â D 86:5 ı . In this case, the Bézier curve is the longest circular arc that can satisfy the Chebyshev error. It is almost half of the circle.

The Bézier curve with˛D˛ ;ˇDˇ ;
D represents the circular arc in the first and fourth quadrants generated counter clockwise, see Fig. 3. 3. For programming purposes, the parameters˛;ˇ; are given in terms of each other, for example if˛is given as a constant, then the other parameters are given in terms of˛as follows: In the following section, the properties of the approximating quadratic Bézier curve are given.

Properties of approximating quadratic Bézier curve
In addition to the properties mentioned in the remarks after Theorem 3.1, some other properties are given in this section. The first is about the roots of the error functions e.t / and E.t / that are given in the following proposition.
Because of symmetry, we have To get the solution in Theorem 3.1, some conditions were imposed on˛;ˇ; in (5). However, if the conditions on ;ˇ; are removed, there will be other possible solutions. In the following section, all the possible (real) quadratic Bézier curves are listed.

All quadratic Bézier curves
If the conditions imposed on˛;ˇ; in (5) are removed, then the other solutions are given in the following theorem.

Remarks.
1. Table 1 lists all the (real) possible solutions to the approximation problem; fortunately, four out of the eight solutions are real, make sense, satisfy the three approximation conditions, and are related in being reflections to each other around the xor y-axis. The second solution coincides with the first solution, but generated clockwise. The third and fourth solutions are reflections of the first solution around the y-axis, generated counter clockwise and clockwise, respectively. 2. Sign of˛is the same as the sign of . If sign ofˇis positive then the curve is generated counter clockwise and if it is negative then the curve is generated clockwise. If sign of˛is positive then the curve lies in the first and fourth quadrants, and if it is negative then the curve lies in the second and third quadrants. 3. The roots of the error functions e.t / and E.t / for all of the solutions in Table 1 are the same as in Proposition 4.1. Table 1 occur at the same parameters that are given in Proposition 4.2. 5. The third and the fourth solutions are reflections of the first and second solutions around the y-axis, respectively. 6. The first solution is chosen because it is generated in the same direction as the circle is generated.

The extreme values of e(t) and E.t / for all of the solutions in
As a consequence of Theorems 3.1 and 5.1, we have the following proposition regarding the error at any t 2 OE0; 1.
Proposition 5.2. For every t 2 OE0; 1, the errors of approximating the circular arc using the Bézier curves in Theorems 3.1 and 5.1 are given by: In the following section, examples and comparisons are given.

Examples and comparisons
Theorem 3.1 gives the best uniform approximation for Â D cos 1 . 1/ D 86:5 ı . To get other angles, the subdivision algorithm is usually used, but the error is not altered accordingly. To take advantage of the small error of Theorem 3.1, we divide the error function in equation (9) by a constant and apply the method. By trial and test, we get the constant s D 11:227225575 that corresponds to the quarter of the circle. Dividing equation (9) with s and solving it, then we get the Bézier points corresponding to the quarter of the circle with the parameters˛D 0:707106781, D 0:714936116, D 1:30399605. By rotating this Bézier curve we get the whole circle as shown in Fig. 5.
We compare our method in this paper with the other existing methods. All of the following methods are based on cubic Bézier curve representation of quarter of circle, except the work of Mørken [10].
In [4], a cubic parametric curve is represented; the end points and a point in the middle of the circular arc are interpolated; the error is 2:7 10 4 for a quarter of circle. A quarter of a circle is approximated by a cubic curve in [5] using the values and tangents at the end points with error 4:2 10 4 . A general cubic scheme of order six is presented in [6] using values of positions, tangents, and curvatures at the endpoints. For a quarter of a circle, they got an error of 1:4 10 3 . A cubic approximation for the circle of order six with error for a quarter of 1:4 10 4 is given in [7]. In [9], different types of cubic approximations of circular arcs of order six are considered; best error of a quarter is 2 10 4 . In [12], the conjecture of high order approximation is illustrated; representation of a circular arc is given as an example with error about 2 10 3 for a circle quarter, see also [11,13]. Quadratic splines are used in [8] to represent conic sections with high order. Quadratic methods are given in [10] to represent circular arcs with best error of 1 10 2 .
The scheme in this paper represents a circular arc in an easy way while satisfying the approximation conditions of the best uniform approximation. The resulting error between the circle and the quadratic Bézier curve is 5:5 10 3 . This example shows that the quadratic Bézier representation of circular arc competes with the other existing cubic Bézier representations of circular arcs. It has additional advantage that it is represented using three Bézier points making it affordable in all applications. Fig. 5 and Fig. 6 illustrate the facts that were proved in the theorems and propositions. In particular, the approximating Bézier curves satisfy conditions of the approximating problem: p minimizes the uniform error max t 2OE0;1 jE.t/j and approximates c with order four, and the error function E.t / equioscillates five times over the interval OE0; 1.

Conclusions
It is a challenging issue and is still an open problem to find the best quadratic uniform approximation of a function with the following properties: the error function equioscillates four times, the approximation order is three, and the curve and the approximation intersect three times.
Despite these challenges, we are able to find in this article the best quadratic uniform approximation of circular arcs with parametrically defined polynomial curve in explicit form. Fortunately, we did get better results than expected: the error function equioscillates five times (rather than four times); the approximation order is four (rather than three); the curve and the approximation intersect four times (rather than three times). Numerical examples are given in section 6 demonstrated the efficiency and simplicity of the approximation method. Representing circular arcs using quadratic Bézier curves is needed in many applications. It is interesting to further investigate the following related issues: 1. Study quadratic approximation with G 1 continuity using equioscillating error functions and constrained Chebyshev polynomials. 2. Find a way to write the Bézier points in terms of the angle Â . It would be very important to have the best approximation available for any Â perhaps by employing a semi-numerical method. 3. Apply these results in this paper to perform degree reduction of Bézier curves to get the best approximation with the minimum uniform error. 4. Moreover, it will also be interesting to approximate other kinds of curves using best uniform quadratic approximation that has order four, and the error function equioscillates five times. Even though it is a tough subject to find the best quadratic uniform approximation of a function with error that equioscillates four times, has approximation order three, and the function and the approximation intersect three times.