**The Construction of Cubic Bezier Curve**

**Siti Sarah bt Raseli<sup>1</sup>\*, Nur Ain bt Mohd Khusairy Faisal<sup>2</sup>, Norpah Mahat<sup>3</sup>**

*<sup>1,2,3</sup>Faculty of Computer and Mathematical Sciences, Universiti Teknologi MARA Perlis Branch, Arau Campus,  
Malaysia.*

*Corresponding author*: *\*sitisarahraseli@uitm.edu.my*

Received Date: 8 August 2022

Accepted Date: 14 September 2022

Published Date: 30 September 2022

**HIGHLIGHTS**

  - Focus on cubic Bezier curves with four control points.

  - The properties of cubic Bezier curve.

  - The constructions of cubic Bezier curve.

ABSTRACT

*The construction of Bezier curves is one of the curves that are commonly discussed in Computer-Aided Geometric Design (CAGD). This study* *focuses on cubic Bezier curve. The objectives in this study are to review the properties of cubic Bezier curve and construct the cubic Bezier curves. In this study, the expanding equations from the basis function of the curve is used to construct the cubic Bezier curve. Future researchers can expand the degree of the Bezier curves, which is more useful in Computer-Aided Design (CAD), CAGD and engineering. The next studies in Bezier curve are recommended as a contribution for further research.*

*Keywords: Bezier curves,* *cubic Bezier curve, properties of cubic Bezier curve, construction of cubic Bezier curves.*

# INTRODUCTION

This study is focused on a brief description of the construction of cubic Bezier curve. Bezier curves were studied in 1962 by Pierre Bezier, a French engineer, who started to use them in designing bodies of an automobile. However, the first study of these curves was developed in 1959 by a mathematician named Paul de Casteljau, using de Casteljau's algorithm, a numerically stable curve to evaluate Bezier curves (Kilicoglu & Senyurt, 2020). The Casteljau's algorithm evaluates and subdivides the Bezier curve as shown in Figure 1. Curve subdivision is necessary to divide the curve into several segments which is very useful for another studies in Bezier curves such as curve fitting, segmentation, and interpolation (Fitter et al., 2014).

![Diagram Description automatically generated](633b9e768814c_media/media/image1.png)

**Figure 1:** Subdivision by De Casteljau's algorithm

(Source: Fitter et al., 2014)

Curve fitting is a crucial task in image extraction, in which the extracted object contours are identified into number of small segments that are further described using lines and curves, and the extracted object regions are fitted using surface fitting techniques such as triangular patches, least squares, multistage methods and many others (Fitter et al., 2014).

A Bezier curves is widely used in computer graphics, animation, Computer-Aided Geometric Design (CAGD) and many other related fields (Kilicoglu & Senyurt, 2020). Additionally, satellite path planning, robotics, highway or railway designing, creation of 3D tensor product surface models, image compression or font designing and shape preserving curves and surfaces are extensively used in the fields of engineering and technology (Bashir et al., 2013). Bezier curves are commonly used in Computer-Aided Geometric Design (CAGD) because of their numerical and geometric properties (Abbas et al., 2011). In addition, there are a lot of properties in the Bezier curves because it employs a special class of polynomial basis functions (Bashir et al., 2013).

In this study, cubic Bezier curve is the curve that is presented to perform the study. By referring to the review in Bezier curves, this study presented the properties of cubic Bezier curve and the construction of cubic Bezier curves.

**Problem Statement**

Nowadays, technology is advancing with time. The same goes in the geometric field, and the designers play an essential role to build the system that can improve the research in that field. In the area of computer graphics, many techniques in CAGD are used to construct the curves or surfaces. The system can build a mathematical equation with a lot of curves, such as Bezier curves. Most researchers commonly discuss this topic because it has various curves and equations that can be used. Many types of construction of a curve can be done under the Bezier curves. This study focuses on the properties of cubic Bezier curve and the construction of cubic Bezier curve.

**Objectives**

The objectives in this study are to review the properties of cubic Bezier curve and construct the cubic Bezier curves.

**Scope**

The construction of a curve is focused on the cubic Bezier curves. This study is conducted to discuss the cubic Bezier curve’ properties and construct a cubic Bezier curve with four control points, which is particularly useful in CAGD.

**Significance of the Study**

The construction of a curve is applied to conduct a study on the approximation of a curve by using cubic Bezier. This study will bring benefits to other researchers that desire to carry out similar research on this topic. It can give good benefits for future researchers as references in conducting similar research. The findings and results in this study can contribute the information and guidance to the researchers.

Furthermore, the designers may also have the benefits as this curve are frequently used in the CAGD. CAGD gives advantages to the designers in related fields such as engineering, science and technology, and geometric fields in their future design studies. Finally, the study contributes to the body of existing literature and knowledge in this field of research and provide information for further research.

**LITERATURE REVIEW**

The main element in Computer-Aided Geometric Design (CAGD) is the study of curves and surfaces in many years. The necessity for effective computer representation of practical curves and surfaces used in engineering design prompted the development of CAGD techniques (Bashir et al., 2013). The most basic modelling tools in CAD/CAM systems are the Bezier curves (Bashir et al., 2013).

A set of independent variables is known as Bezier curves representing the coordinates of some points in curved lines between two or more points (Rizal & Kim, 2015). A Bezier curves has a set of control points which is \(P_{0}\) through \(P_{n}\), where n is the order (Kilicoglu & Senyurt, 2019). The end points of the curve always use the first and last control points. However, the intermediate control points (if any) it does not lie on the curve (Kilicoglu & Senyurt, 2019). The Bezier polygon or control polygon is the polygon to connect the points with lines, starting with \(P_{0}\) and finishing with \(P_{n}\). Bézier curves is located inside the convex hull of the Bezier polygon (Kilicoglu & Senyurt, 2019).

Most of the researchers used Bezier curves for curve fitting, which has become one of the essential things in computer graphics illustration programs and CAD systems. The curve can be applied in many applications, such as designing the curves and surfaces of automobiles and defining the shape of letters or characters in type fonts (Rusdi & Yahya, 2015). Bezier curves are the most stable of all the polynomial-based curves because it is the ideal standard for complex piecewise polynomial curves (Rusdi & Yahya, 2015). Thus, the Bezier curves can always be used when generating smooth curves because it can produce high quality results (Rusdi & Yahya, 2015).

There are several types of Bezier curves to construct a curve which are quadratic Bezier curves, cubic Bezier curves, quartic Bezier curves and quintic Bezier curves. This study focuses on the cubic Bezier curves. According to Figure 2, there are four control points in the cubic Bezier curve, which are \(P_{0},\ P_{1},\ P_{2}\) and \(P_{3}\). The curves start from \(P_{0}\), moves away to \(P_{1}\) and \(P_{2}\) before end with \(P_{3}\). The describing convex hull of its control points contains the cubic Bézier curve (Rusdi & Yahya, 2015).

![](633b9e768814c_media/media/image2.png)

**Figure 2:** Cubic Bézier curves

(Source: Rusdi & Yahya, 2015)

Based on Bashir, Abbas, and Ali (2013), constructing a curve or surfaces is represented in CAGD. Although cubic B-splines and Bezier curves are mostly used in CAD and CAGD, Bashir et al. (2013) mentioned it is challenging to acquire the desired shape because of their polynomial nature. Therefore, it will bring a problem to the researchers in designing the curves or surfaces. Some researchers developed an alternative using shape parameters to have a better shape of the curves.

Rizal and Kim (2015) conducted a study using the Bezier curves to reconstruct images to interpolate data between sampling points to reduce the error. Using the cubic Bezier curve, the result shows that the curve proposed has better quality and higher similarity levels than the other image reconstruction methods (Rizal & Kim, 2015). The work presented by Rusdi and Yahya (2015) suggested the cubic Bezier curve to reconstruct generic shapes using Least Square Method (LSM). Moreover, Sum Square Error (SSE) was used to find the best fit curve and minimize error calculation. The curve of cubic Bezier curve is easily applied to the data extracted by bitmap images to obtain the best optimal curve. They conclude that the cubic Bezier curve is suitable for other applications in the future (Rusdi & Yahya, 2015).

This literature review presented the previous study on applications that used the cubic Bezier curve. At first, Abbas, Jamal and Ali (2011) proposed a study of Bezier curves interpolation constrained by a line. Then, they developed an algorithm for the quadratic and cubic Bezier curve constrained interpolation. The changing shape comes from the middle control points of the quadratic and cubic Bezier curve constrained by a line. There are two types of a constrained line, which is the x-axis and any straight line. For that, they developed simpler constraints on the middle Bezier ordinates (Abbas et al., 2011). As a result, they approximated a C-shape and S-shape curves in the middle cubic Bezier, which may benefit path planning, highway or railway route designing or car-like robot path planning (Abbas et al., 2011). This interpolation also may be helpful in robotic motion studies.

The work presented by Rusdi and Yahya (2015) proposed four images: Fork, At, Plane and Love to obtain the outline of the bitmap images and to minimize the distance between the boundary of the original image and parametric curve. In this paper, Least Squares Method is used to present an efficient algorithm for the construction of the boundary of bitmap images. The error given by those two curves is calculated using SSE. The boundary of the bitmap image can detect using the Matrix Laboratory (MATLAB) function. They conclude that LSM is an efficient algorithm for constructing the image boundary since the result shows Fork bitmap image produces the least SSE. In conclusion, the cubic Bezier curve is used to find the best optimal curve for the data extracted by bitmap images (Rusdi & Yahya, 2015). Meanwhile, LSM is a suitable method and also can be used for other applications in future (Rusdi & Yahya, 2015).

Hence, Rizal and Kim (2015) conducted a study using the Bezier curves to reconstruct images to interpolate data between sampling points to reduce the error. They compare the reconstructed images using compressive sampling, Discrete Fourier transform (DFT), and Bezier curves in this paper. Four sampling points in the cubic Bezier curve is used to interpolate and reconstruct five values of the image (100×100 pixels) (Rizal & Kim, 2015). Moreover, to compare the time to reconstruct the image, they used MATLAB and Open-Source Computer Vision Library (OpenCV) software. This study found that the Bezier curves is the best curve for image reconstruction because it has a closer quality to the original image than compressive sampling and DFT. At the same time, it also can maintain the small size of reconstructed images without harming their quality (Rizal & Kim, 2015). Furthermore, the result found that the proposed curve has better quality and higher similarity levels than the other image reconstruction methods (Rizal & Kim, 2015).

Du, Liu, and Xun (2019) proposed a curve for beautifying Chinese characters and evaluating the beautification result. This study seeks to incorporate handwritten Chinese character beautifying with machine learning and makes a preliminary evaluation of handwritten Chinese characters by identifying handwritten Chinese characters with a high recognition rate, thereby overcoming the subjectivity of artificial evaluation. The data used in this study involved 52 Chinese characters that covered 33 standard strokes and 19 typical structures of Chinese characters. The handwritten Chinese characters were improved primarily in two aspects, such as the global adjustment and the elimination of jitter. First, a set of two-dimensional (2D) data points are expanded into three-dimensional (3D) space. The data set is then fitted with a Gaussian Mixture Model (GMM), and the layout of handwritten Chinese characters is changed using a point set registration procedure. Secondly, they used the properties of the cubic Bezier curve function, identify and eliminate the jitter in each stroke using an interpolation algorithm.

Du et al. (2019) used the cubic Bezier curve to define Chinese characters because these curves were accurate and continuity. It may define characters in a unique way without affecting the handwritten Chinese characters' original trajectory. Thus, there is no breakpoint in the middle of each Chinese character's glyph curve, and the curve is smoother. Handwritten Chinese Character Recognition (HCCR) is applied as a detection tool for evaluating beautifying in this study. As a result, Chinese characters that have been well-written can be identified. In conclusion, it may be possible to fulfil the purpose of beautifying font shape after gathering multi-dimensional information of handwritten Chinese characters. However, there is still a need for improvement because the recognition rate of handwritten Chinese characters has not reached 100% yet. Next. the accuracy of handwritten Chinese character recognition results should be improved so that the evaluation curve more flexible in the future.

# RESEARCH METHODOLOGY 

**This study focused on the construction** **of cubic Bezier curves. This study is started with reviewing the properties of cubic Bezier curve.** **Secondly, the control points of the curves are located. Next, the equations used are expanded from the basis function of cubic Bezier curve.** **Then, the cubic Bezier curve is constructed by using curve construction’s algorithm. The stage of this study is illustrated as shown in Figure 3.**

**Figure 3:** Procedure in construction the curve

The equation of Cubic Bezier Curve with four control points \(P_{i} = P_{1},P_{2},P_{3},\ and\ P_{4}\ \ \)is given by

\(B\left( t \right) = \ \sum_{i = 0}^{3}{\left( \frac{3}{i} \right)t^{i}}\ {(1 - t)}^{3 - i}\ \left( t \right)\ \left\lbrack P_{i} \right\rbrack\) (1)

> Expanding Eq. (1) yields

\(B\left( t \right)\  = {(1 - t)}^{3}\ P_{0} + 3t\ {(1 - t)}^{2}\ P_{1} + 3t^{2}\ \left( 1 - t \right)\ P_{2} + t^{3}P_{3}\) (2)

In Figure 4, the basis function of cubic Bezier curve is defined based on the expanding equation of cubic Bezier curve with four control points, \(P_{0}\) (blue line), \(P_{1}\ \)(red line), \(P_{2}\) (yellow line) and \(P_{3}\) (purple line). The horizontal axis is known as t, t goes between 0 to 1. The vertical axis is known as basis function also goes between 0 to 1. (Mathematics of Computer Graphic and Virtual Environments, 2015).

![](633b9e768814c_media/media/image3.png)  
**Figure 4:** Basis function of Cubic Bezier curve

**RESULTS AND DISCUSSIONS**

**The results of** **the construction cubic Bezier curve are presented in** **Figure 5****.** In Figure 5, the cubic Bezier curve is defined with four control points, \(P_{0}\)*,*\(\ P_{1}\)*,* \(P_{2}\) and \(P_{3}\). These four control points will form in the control polygon. A sample of control points for this study is modified from the example in (Mistro et al., 2017) where only four control points are used which are \(P_{0}\)*,*\(\ P_{1}\)*,* \(P_{2}\) and \(P_{3}\).

To approximate cubic Bezier curve, the expanding of basis function for cubic Bezier curve from Eq. (2) were combined with the control points, \(P_{0}\) = (10,0), \(P_{1}\) = (0,5), \(P_{2}\) = (5,8) and \(P_{3}\) = (20,3). The curves start from \(P_{0}\)*,* moves away to \(P_{1}\) and \(P_{2}\) before end with \(P_{3}\). The shape of curves for cubic Bezier curves are contained in the control polygon.

![Chart, line chart Description automatically generated](633b9e768814c_media/media/image4.png)

**Figure 5:** Construction of Cubic Bezier curve

**Cubic Bezier Curve with Their Properties**

These properties of the cubic Bezier curve are based on Zhang and Feng (2006), Sarfraz and Masood (2007) and Rusdi and Yahya (2015).

  - At two endpoints \(P_{0}\) and \(P_{3}\) have the curve pass by.

  - The curve is continuous, infinitely differentiable, also continuous for second derivatives (For a polynomial curve, this is automated).

  - The cubic Bezier blending functions are all positive, with their sum is always 1,

\(\sum_{i = 0}^{3}{P_{i}\left( t \right) = 1}.\)

  - The convex hull of its control points contains the cubic Bezier curve.

  - Only if the curve is linear, both \(P_{1}\) and \(P_{2}\) are on the curve.

  - \(P_{0}\) and \(P_{3}\) are on the curve.

  - *Along the line* \(P_{0}P_{1}\) *and* \(P_{2}P_{3}\) *is the slopes at the beginning and end of the cubic Bézier curve, respectively.*

This study is conducted to review the properties and construct the cubic Bezier curve. The findings and results in this study can moved the body of scientific knowledge forward because future researchers can use it as a reference in conducting similar research.

**CONCLUSIONS AND RECOMMENDATIONS**

This study started from the background of the study of a Bezier curve and focus on the cubic Bezier curve. The properties of cubic Bezier curve are reviewed, and the expanding equation of cubic Bezier is used to construct the curve. The cubic Bezier curve has four control points, and the shape of curves is contained in the control polygon. The curve is commonly used in CAD and CAGD because of the numerical and geometric properties.

**Recommendations**

As all know a Bezier curve is widely used in many related fields. There are many types of Bezier curves that can be explored such as Rational Bezier curve and Trigonometric Bezier Curve. Future studies on the current topic are therefore recommended. It may benefit to future researchers who are interested in this study because they can used in other application other than focusing on its properties. Other than that, future researchers also can expand the degree of the Bezier curves, which is more useful in CAD, CAGD and engineering.

**REFERENCES**

Abbas, M., Jamal, E., & Ali, J. M. (2011). Bezier curve interpolation constrained by a line. *Applied Mathematical Sciences*, *5*(37), 1817–1832. <https://www.researchgate.net/publication/315099476_Bezier_Curve_Interpolation_Constrained_by_a_Line_Mathematics_Subject_Classification_68U05_68U07_65D05_65D07_65D18_1818>

Bashir, U., Abbas, M., & Ali, J. M. (2013). The \(G^{2}\) and \(C^{2}\) rational quadratic trigonometric Bézier curve with two shape parameters with applications. *Applied Mathematics and Computation*, *219*(2013), 10183–10197. <https://doi.org/10.1016/j.amc.2013.03.110>

Bashir, U., Abbas, M., Awang, M. N. H., & Ali, J. M. (2012). The quadratic trigonometric Bezier curve with single shape parameter. *Journal of Basic and Applied Scientific Research*, *2*(3), 2541–2546. <https://doi.org/10.4028/www.scientific.net/AMR.468-471.2463>

Du, P., Liu, Y., & Xun, E. (2019). The techniques and evaluation method for beautification of handwriting Chinese characters based on cubic Bezier curve and convolutional neural network. *14th International Conference on Computer Science and Education, ICCSE 2019,* (pp. 502–511). <https://doi.org/10.1109/ICCSE.2019.8845418>

Fang (2014, September 9). What is the difference between cubic Bezier and quadratic Bezier and their use cases?. *Stack Overflow*. <https://stackoverflow.com/questions/18814022/what-is-the-difference-between-cubic-bezier-and-quadratic-bezier-and-their-use-c>

Fitter, H. N., Pandey, A. B., Patel, D. D., & Mistry, J. M. (2014). A review on approaches for handling Bézier curves in CAD for manufacturing. *Procedia Engineering*, *97*(2014), 1155–1166. <https://doi.org/10.1016/j.proeng.2014.12.394>

Khan, M. (2009). *Approximation of circle using cubic Bezier curve.* <https://www.mathworks.com/matlabcentral/fileexchange/6844-approximation-of-circle-using-cubic-bezier-curve?s_tid=srchtitle_approximation%20cubic%20bezier_2>

Kilicoglu, S., & Senyurt, S. (2019). On the cubic Bezier curves in \(E^{3}\). *Ordu University Journal of Science and Technology*, *9*(2), 83–97. <https://dergipark.org.tr/en/pub/ordubtd/issue/51531/625391>

Kilicoglu, S., & Senyurt, S. (2020). On the involute of the cubic Bezier curve by using matrix representation in \(E^{3}\). *European Journal of Pure and Applied Mathematics*, *13*(2), 216–226. <https://doi.org/10.29020/nybg.ejpam.v13i2.3648>

Majeed, A., Piah, A. R. M., Gobithaasan, R. U., & Yahya, Z. R. (2015). Craniofacial reconstruction using rational cubic Ball curves. *Plos One, 10*(4), 1-14. <https://doi.org/10.1371/journal.pone.0122854>

Mathematics of Computer Graphic and Virtual Environments. (2015, March 9). *Bezier curves* \[Video\]. YouTube. <https://youtu.be/2HvH9cmHbG4>

<span class="underline">Misro, M. Y., Ramli, A., Ali, J.M., (2017). Quintic Trigonometric Curve with Two Shape Parameters. *Sains Malaysiana*, 46(5), 825-831.</span> [*<span class="underline">http://dx.doi.org/10.17576/jsm-2017-4605-17</span>*](http://dx.doi.org/10.17576/jsm-2017-4605-17)

Nelson Darwin Pak Tech. (2020, September 25). *How to write text MATLAB plot | Insert text in plotting axes (MATLAB)* \[Video\]. YouTube. <https://youtu.be/3TJmKOy7eI0>

Rizal, S., & Kim, D. S. (2015). Image transmission in military network using Bezier curve. *Journal of Advances in Computer Networks*, *3*(2), 141–145. <https://doi.org/10.7763/jacn.2015.v3.156>

Rusdi, N. A., & Yahya, Z. R. (2015). Reconstruction of generic shape with cubic Bezier using least square method. *AIP Conference Proceedings*, (pp. 050004-1-050004-6). <https://doi.org/http://dx.doi.org/10.1063/1.4915637>

Sarfraz, M., & Masood, A. (2007). Capturing outlines of planar images using Bezier cubic. *Computers and Graphics*, *31*(2007), 719–729. <https://doi.org/10.1016/j.cag.2007.05.002>

The Lazy Engineer. (2017, June 28). *What are Bezier curves and how can I draw them in MATLAB* \[Video\]. YouTube. <https://youtu.be/uRhe_A4DWPA>

Zhang, H., & Feng, J. (2006). *Bezier curves and surfaces (1)*. <http://www.cad.zju.edu.cn/home/zhx/GM/004/00-bcs1.pdf>
