 New Approach to Approximate Circular Arc by Quartic Bezier Curve Azhar Ahmad1, Rohaidah Masri, Nor’ashiqin Mohd Idrus Department of Mathematics Universiti Pendidikan Sultan Idris Tanjung Malim, Perak, Malaysia 1azhar.ahmad@fsmt.upsi.edu.my Jamaluddin M. Ali School of Mathematical Science Universiti Sains Malaysia Penang, Malaysia Abstract—This paper presents a result of approximation an arc circles by using a quartic Bezier curve. Based on the barycentric coordinates of two and three combination of control points, the interior control points are determined by forcing the curvature at median point as similar as the given curvature at end points. Hausdorff distance is used to investigate the order of accuracy compare to the actual arc circles through central angle of 0TSd. We found that the optimal approximation order is eight which is somewhat similar to preceding methods in the literatures. Keywords- arc circle, barycentric coordinate, Hausdorff distance, quartic Bezier 1. Introduction Parametric representations of curves and surfaces are essential to the field of Computer Aided Geometric Design (CAGD). Representing of an arc circles using parametric curves is one of an important study in related to design conic sections in geometric modeling. The important of arc circles in geometric modeling are undeniable, along with the used of the others primitive elements, such as a straight line, conic curves and spiral. Arc circles are widely used in CAD/CAM and can be found in industrial as well as in product manufacture; the aircraft and the automobile industries where surfaces are frequently constructed from curves involving circular arcs using lofting or skinning technique . Furthermore it is used in solving communication problem between CAD/CAM systems when working with curve representations in different data formats . Generally, these significant uses of parametric polynomial curve are concentrated on the aesthetical and functional purposes. Since NURBS form is the standard form in most of geometric software systems so the used of the curve that based on parametric polynomial representation became more important. A considerable amount of work has been done on approximating circular arc by polynomial curves. We consider that most of the previous work related to the used of the low degrees of Bezier curve modeling. Although a circle arc can be exactly represented by rational parametric curve of low degree, such the rational quadratic Bezier, some CAD/CAM systems require a polynomial representation of circular segments. Also, some important algorithms, such as lofting and blending cannot be directly applied to rational curves . Previous work showed that we can only representing an arc circle by polynomials curve with a small acceptable tolerance. The cubic approximation was proposed by de Boor et al.  and Dokken et al. . Goldapp  presented the best kG cubic approximations for 0,1, 2k , whose approximation orders are six. Ahn and Kim  gave the quartic 3G approximation to arc of angle 0TSd. Their approach has the optimal approximation of order eight. And they also find the quintic 4G approximation with order ten. Kim and Ahn  presented the quartic Bezier approximations of circular arcs with approximation of order eight by using subdivision scheme with equi-distance of the circular arc. The approximation proposed by them has a smaller error than other previous results. By using quintic, Fang  presented a scheme with different boundary conditions that yields approximation curves with kG, 2,3,4k continuities at the circular arc’s ends. In our method, we consider the barycentric coordinate with positive ratio to locate the interior control points of the quartic form and suggest the symmetrical position of first two points against the last two points respect to the middle point. From this assumption, we can automatically avoid the existence of cusp, loop and the inflexion point. We suggest a simple and direct method to obtain those approximations which facilitate to designers. In practice, designers or users usually do not concern about the underlying mathematics and related equations. This paper only discusses the curves with second order of geometric continuity and not extended on higher order since it is adequate for our objective. Since it involved the manipulation of quartic form, this will involve a long and difficult mathematical computation, so the use of CAS manipulator such as MATEMATICA will make a great help. The remaining part of this paper is organized as follows. We start with some preliminary background and notation in Section II. We prescribe the method that used to construct an arc circles in the given range of the central angle [0, )TS in Section III. In Section IV, we discuss the radial approximation error and approximation order which based on Hausdorff distance. The Open Journal of Applied Sciences Supplement：2012 world Congress on Engineering and Technology132 Copyright © 2012 SciRes. result is compared to the others best known methods. We present the result of a numerical example in Section V. Finally, we conclude our results in the final section. 2. Some Preliminary The following notations and conventions are used. We write the dot product of two vectors, A and B as ABx. The notation of AB represents the outer product of two plane vectors A and B. Note that the dot and outer products are scalar which are written as cosAB ABTx and sinABABT , respectively, where T is the turning angle from A to B. Positive angle is measured anti-clockwise. The Euclidean norm or length of vector A is A. Planar quartic Bezier curve >@2:0,1Zo\ is represented as 4404() 1iiiiiZtP tt §·¨¸©¹¦ , 01tdd, (1) where iP, 0,1, 2, 3,4i are the control points, 441iiitt§·¨¸©¹ is the Bernstein polynomial and t is global parameter. We denote the end points as 0P and 4P, also jP, 1,2, 3 j as the interior points. As a planar parametric curve, the signed curvature of Zt is defined as in : 3'( )"( )() '( )ZtZttZtN (2) The signed radius is the reciprocal of (2). It is known that ()tN is positive sign when the curve segment bends to the left and it is negative sign if it bends to the right at t. '( )Zt and ''( )Zt are first and second derivatives of (1). 3. Prescribing Methods In this section, we describe an approach for approximating the given data. The problem that we considered can be expressed in following problem statement; Let 0P and 4P be the two points on the circumference of circle with radius r, and 0T and 1T be the unit tangent vectors, respectively. The central angle of this two point is in the interval of 0TSd . Find an approximation of a circular arc that satisfies this given data by using a single Bezier quartic curve. Firstly, we denote sP as the intersection point between two tangent lines parallel to unit vector ,iT 0,1i , that pass through endpoints 0P and 4P, respectively. Here, we only consider the construction of curve segment that is negative curvature, whereby for approximation of arc circle with positive curvature is in the similar manner. According to Grandine and Hogan , SP can be achieved by 41000101()()SPTTT PTPTT  (3) If we denoted 0B as the centre of the circle, so the circular arc is divided symmetrically by line 0SPB . By using the barycentric coordinate, the interior points 123,,PPP may now be written in the terms of 04,,SPPP as 101SPPPUU , 341SPPPUU , (4) 21312 SPPP PDD D . Point 1P and 3P are in barycentric form of 2 points, where their barycentric coordinates were ,1UUand 1,UU, respectively. While 2P is a barycentric combination of 3 points with coordinate ,,12DD D. All of those coefficients satisfy 0,1DU. Without any loss of generality in terms of translation, rotation, reflection and uniform scaling, we can allocate 0P, 4P on same ordinate, while SP on y-axis and the center of the circle 0B on the origin. Fig. 1, shows the position of these control points and their interior points 123,,PPP with respect to the canonical positions. P4P0P1P2P3PSǂǂ1ǂ2ǂǂ1ǂǂ1ǂǂǂ Fig. 1 Position of control points and their barycentric coordinates Secondly, since our objective is to obtain the sufficient condition of a single segment of Bezier quartic to approximate arc circle with 2G continuity condition, hence we fix 011/rNN  and forced the curvature at median point as 0.51/rN . Furthermore, we apply 0(0,0)B and Copyright © 2012 SciRes.133 1r since this do not give any effect on U and D in general on curvature analysis. The following procedure shows in detail how the curvature is obtained. It starts by letting 00100 0401(-),-,-,SPB TTPBrNPBrNQ  (5) where Q is a constant. 0N and 1N are unit normal vectors of 0T and 1T at 0P and 4P, respectively. Since we considering the arc circular of negative curvature then 000TN and 110TN. Substituting (4), (5) into (1) give Zt in the terms of unit vectors as 10 2130 41ZtaNaNaTaT  (6) where 2121. 1361424artttDUU U  , 22236 14, 614131tarttDUUDUD U§·¨¸ ¨¸ ©¹ (7)  2336 14221 , 3614tatttDUUUQDUU§·¨¸ ¨¸©¹ 43.aa  The first derivative of Ztis 10 2130 41'''''ZtaNaNaTaT . (8) And the second derivative of Zt is 10 2130 41'''''''''' .ZtaNaNaTaT  (9) Here, 'ja and ''ja are first and second derivatives of ja, 1, 2,3,4j , respectively. By using the prior conventions, several product vectors and the related coefficient Q is obtained as follow  00 001111001 100 1100001 11100100 101010 0011041 1101 01 1 0sin ,cos ,sinNN TTNNTTNTN TNTNTNNTTN NTTNTNTTTNNTT NNNT NTPT rNTrTT TTTTQT             <<<<<<<<<< (10) By applying (8), (9) and (10) onto (2), the numerator and denominator of curvature, N can be write as  13 24 423121 12233243 341441''''''''''''' '' ''''''sin''''''cos ''''''sin''''''cos,ZZ aaaa aaaaaa aaaaaaaa aaaaaaTTTT    (11) 2222123414 2312 34''''''2''''sin 2''''cosZZ aaaaaa aaaa aaTT  <. (12) Since as fixed earlier that 011NN , we achieve 3231cossin csc22 1TTDU TU . (13) And as 1/2t , so for 1/2 1N , simplification yield to 312 12132sincsc2132TDU UTU  . (14) From (13), D can be write in the terms of U and /2T) as 222sec31UDU) . (15) Substituting (15) into (14), we get the quadratic equation in the terms of U as follows 2348sec12 96sec0UU)) . (16) It is clear from (16) that if 2cos 3)t then we get two positive values of U. The result is obtained from 96sec0 )d which come directly from Descartes’s Rule of Signs. And from the discriminate of (16) we prove that there exist two real values as shown below 2961 sec12secsec0)))t . (17) 134 Copyright © 2012 SciRes. If we name 12,UU as the solutions of (16), we obtain 213361 sec12secsec,24secU))) ) (18) 223361 sec12secsec.24secU))) ) (19) Finally, by substituting each of these solutions into (15), we obtain the values of D that satisfies (13) and (14). As the result, 11,UD and 22,UDare two possible values that give us the necessary condition to approximate the given problem. Fig. 2 shows the function of 1U and 2U given in plain and dashed curves, respectively, which referred to 0/2Sd) . Positive value of 1U is >@0,0.5 since interval of ) is 10,cos (2/3)ªº¬¼. ǂ1ǂ20.5 1.0 1.5ǂ0.10.10.20.30.40.5 Fig. 2 Value of 1Uand 2U for 0/2Sd) Since 2U has bigger range of ) compare to his counterpart 1U, so for further discussion we only consider 2U where we obtain an approximate curve which satisfies the given problem in high order of accuracy. The explicit approximate quartic form which is easy to use can been stated as follows. An approximation quartic Bezier of circular arc can be found by using (1), with control points as (4) and (3), where U as (19), D from (15) and the central angle is 101 0101 0sinif 0sinif 0TT TTTT TTTSt° ® °¯<< (20) It is clear that the parameters D and U are depend on the central angle that has been created by the end points. Here, T as specified in (20) satisfy the acute and obtuse angle. 4. Approximation Accuracy Analysis In this section we discuss the accuracy of the approximation that make by the quartic Bezier form which introduced in the previous section. The approximation accuracy is obviously considered as a distance between set of points on given curves, i.e., a circular arc and a quartic curve in this case. Here we will consider Hausdroff distance as proposed by Ahn and Kim , where it is most reliable scheme to measures how far two subsets of a Euclidean space are from each other. The Hausdorff distance can be described as the longest distance between two ste of points. First, let us consider b as the arc circle, so the Hausdroff distance between the arc circle and the approximation arc can be derived as follows >@0,1,max,HtdbZ tH (21) where  221txtytH . (22) The function in (22) is known as the radical error, and another alternative error function that has been used for the analysis is 221txtyt\ . (23) Function (22) and (23) have their zero sets and extreme values at the same locations, however using (23) is preferable since there is no square root term involved. It can be shown that when t\ is small, then 2tt\H| as in . We use those two error functions in order to determine the approximate errors and for comparisons manner. We locate the end points of arc circle at 11, 0P , 4cos,sinP )) with center of the unit circle is 00,0B . Since we consider the minor arc circle with positive curvature therefore the unit tangent vectors at 04,PP are 00, 1T and 1sin ,cosT )), respectively. As a result of substituting 01(-)/sin2SPrTT ) and (4) into (1), the components of quartic curve ()Zt is simplified as 434223()(-1 )-4(-1 )cos2 -6(-1)-1(-1)cos2 4(1-)cos2-cos2,xttt ttttttDDUDUUU )))) (24) and 3322()sin 2- 4(-1)tan-6(-1)-1(-1)cos 2tan4(-1)sin2 - cos2 tanyttttttttUDDUD UU §·))¨¸ ))¨¸¨¸¨¸) ))©¹. (25) So t\ and it’s derivative't\, respectively are 23223 111 2xyBttt k§·§· ¨¸¨¸¨¸©¹©¹, (26) Copyright © 2012 SciRes.135 and  22222 11'11 22xyBtttth§·§· ¨¸¨¸¨¸©¹©¹ (27) where 22 4sec tanBW )), 2228cos4kWZW) , 2226cos4hWZW) , 234834 cos2WUU U ) , (28) 2323(3 1516 1641444cos2 (-1)cos4.ZUUUUUUU  ) ) As 0t\ , we have zeros with multiplicity 3 at 0t , 1t , and each at 1/2tk r with total zeros are 8 . While as '0t\ , the zeros is obtained at 0t and 1t with multiplicity 2, 1/2t and 1/2th r with total zeros are 7. Therefore, the extremum value of t\ happen at 1/2t , since both 1/2th r and 1/2tk r are complex roots due to negative values of h and k. This conjecture can be show from the limits analysis as below. 01lim 2U)o ,0limh)o f, and lim0SU)o ,0lim h)o f. In the similar manner, k is negative because 1/16(112 )hk . Hence, (26) is negative which geometrically means the approximation arc lies inside the circle. Fig. 3 shows the alternative function t\ of arc Z for varies values of ). It clears that the error is increasing as ) increase. = 0.7 = 0.6ǂ = 0.50.2 0.4 0.6 0.8 1.0ǂ0.00001ǂ8.ǂ10ǂ6ǂ6.ǂ10ǂ6ǂ4.ǂ10ǂ6ǂ2.ǂ10ǂ60 Fig. 3 t\for 0.45, 0.5, 0.6, 0.7.) Now, if we let the uniform norm of t\ on [0,1] which is denoted by >@0,1maxttt\\f then at 1/2t we have .64Bkt\f  (29) Finally, the Hausdroff distance ,HdbZ can be simplified as  2224,1 11 8cotsectan11256HdbZ t\WZf  ))) . (30) Next, by using MATHEMATICA, we obtain that the approximation order of Z for the circular arc b from Taylor expansion at 0T is 81017 1,98304 4096 2HdbZTT§·ªº 2¨¸¬¼©¹ (31) Compare to previous best known methods, our proposed method also have the approximation of order eight. Fig. 4 illustrates the Hausdorff distance for 0/2TSdd . At /2TS we get 5,1.2510HdbZ  u. 0.20.40.6 0.8ǂ7.ǂ106ǂ6.ǂ106ǂ5.ǂ106ǂ4.ǂ106ǂ3.ǂ106ǂ2.ǂ106ǂ1.ǂ106dH Fig. 4 ,HdbZ for 0/2TSdd . For a unit quarter of a circle, /2TS , other researchers such as Goldapp  obtained 41.96 10uby using a cubic Bezier curve, while Ahn and Kim  got 53.50 10u. While using quartic approximation, Ahn and Kim  got 63.55 10uand And Kim and Ahn  obtained 62.03 10u. Since all those results are acceptable for most practical cases, so our result can also be considered. The following is a numerical example of the approximation by the method. 136 Copyright © 2012 SciRes. I. NUMERICAL EXAMPLE Given the following data, 013,22P§· ¨¸¨¸©¹, 413,22P§· ¨¸¨¸©¹, 031,22T§· ¨¸¨¸©¹, 131,22T§· ¨¸¨¸©¹, 1r . Substituting the given data into (20), (19), (15), (3) and followed by (4), we have the following results 0.3451D , 0.4585U , 0,1.1547SP , 10.2707,0.9984P , 20,1.0468P , 30.2707,0.9984P So from (1), we obtained the quartic Bezier that satisfies the given data. We illustrate this approximation curve as shown in Fig. 5, where the approximate curve is in plain arc and the standard arc circle is in dashed arc. Note that the approximation arc is coinciding with the standard arc circle. P4P0P1P2P3PS Fig. 5 An approximate curve and a standard circular arc 5. Conclusion We present a method that give quick finding of an approximate curve to circular arcs by a single segment of quartic Bezier curve. An approximate curve can be straightforward blended on given two points with prescribed locations and directions on the circumference of a circle. The setting of interior control points of quartic Bezier curve is defined from a set of barycentric coordinate which geometrically understandable by users and give the curvature continuous approximation of degree two. Compared to the other previous methods, the approximation order of this proposed method is also eight. Although the order of accuracy of the proposed method is less than the best previous known results, our introduced quartic Bezier form has the advantage of easily counter the constrained 2G Hermite interpolation problem by combination through S,C-shape of a single cubic or quartic transition curve. Also we can easily extend the result to find the spline arc, which will reduce the error of the approximation or to construct an arc of central angle 2ST Sdd . 6. Acknowledgment The authors are very grateful to the anonymous referees for their valuable suggestions. This work was supported by the Ministry of Higher Education of Malaysia FRGS (2010-0066-102-02). REFERENCES  Ahn Y.J. and Kim H.O. Approximation of circular arcs by Bezier curves. Computer Aided Geometric Design, 81:145-163, 1997.  deBoor C., Hollig K. and Sabin M. High accuracy geometric Hermite interpolation. Computer Aided Geometric Design, 4:269–278, 1987.  Dokken T. , Dehlen M., Lyche T and Morken K. Good approximation of circles by curvature-continuous Bezier curves. Computer Aided Geometric Design, 7:33-41, 1990.  Fang L. Circular arc approximation by quintic polynomial curves. Computer Aided Geometric Design, 15:843-861, 1998.  Goldapp M., Approximation of circular arcs by cubic polynomial. Computer Aided Geometric Design, 3:227-238, 1991  Grandine T.A and Hogan T.A. A parametric quartic spline interpolant to position, tangent and curvature. Computing (DOI), 72:65-78, 2004.  Kim S.H. and Ahn Y.J. An approximation of circular arcs by quartic Bezier curves. Computer Aided Geometric Design, 30:490-493, 2007.  Riskus A. Approximation of a cubic Bezier curve by circular arcs and vice versa. Information Technology and control, Vol 35, 4:371-378, 2006.  Yamaguchi F. Curves and surfaces in computer aided geometric design. Springer-Verlag 1988  Žagar, Emil, Jakliþ, Gašper, Kozak, Jernej, Krajnc, Marjeta. Approximation of circular arcs by parametric polynomial curves . Annali Dell'Universita' di Ferrara, 53;2:271-279, 2007. Copyright © 2012 SciRes.137