This work demonstrates in practical terms the evolutionary concepts and computational applications of Parametric Curves. Specific cases were drawn from higher order parametric Bezier curves of degrees 2 and above. Bezier curves find real life applications in diverse areas of Engineering and Computer Science, such as computer graphics, robotics, animations, virtual reality, among others. Some of the evolutionary issues explored in this work are in the areas of parametric equations derivations, proof of related theorems, first and second order calculus related computations, among others. A Practical case is demonstrated using a graphical design, physical hand sketching, and programmatic implementation of two opposite-faced handless cups, all evolved using quadratic Bezier curves. The actual drawing was realized using web graphics canvas programming based on HTML 5 and JavaScript. This work will no doubt find relevance in computational researches in the areas of graphics, web programming, automated theorem proofs, robotic motions, among others.

The importance of parametric curves in Computer Graphics [

For a Bezier Curve of control points P_{0}, P_{1}, … P_{N}, the points P_{0} and P_{N} are called end points, and the rest of the points from P_{1} to P_{N − 1} may lie outside the curve. Given that a Bezier curve is of order X, then its degree is defined as X − 1. For instance, a quadratic Bezier curve is of degree two, a cubic Bezier curve is of degree three, while a quartic Bezier curve is of degree four respectively. Computations involving Bezier curves of higher degree are said to be very expensive [

Recent advances in Bezier curves have witnessed its applications in robotics, especially in the area of path planning and generation [

This work is organized into ten sections. First is an introduction, and then a computational exploration of parametric functions. This is followed by studies on blending function derivations, Bezier matrix, Bezier curve sketching, curve join and foundational proofs of two important theorems. The concluding part of this work focused on derivatives, system implementations, and a conclusion.

The general parametric equation of a Bezier curve is given by

where, Z(x) is any point on the curve, P_{k} is the kth Control point of the Bezier Curve, J_{N,K}(x) is the Bernstein or Blending function, N is the degree of the Bezier Curve in question. The Blending function is the control function, also referred to in a of number previous researches as the Bezier basis functions. The components of Z(x) are further defined as follows:

It can be deduced from the “

It is necessary at this stage to demonstrate the derivation of higher order blending functions. A 5th order will be used as a case study.

Given a Bezier Curve of 5th Order, one important task is to derive all the blending functions [

Thus, for a 5th order case, the degree is N = 5 – 1, which is 4. The Blending functions are therefore computed as follows:

Therefore,

Therefore,

Therefore:

Therefore:

Therefore:

Substituting all the Blending Functions into the general

Therefore,

The Bezier Matrix derivation will be demonstrated using a 4th degree case. First, the Blending functions are written in full polynomial format, and then converted to twisted coefficient formats as follows:

In twisted coefficient format, this gives

In twisted coefficient format, this gives:

In twisted coefficient format, this gives:

In twisted coefficient format, this gives:

In twisted coefficient format, this gives:

The Bezier Matrix (BEZMAT) is generated by collating all the twisted coefficients of the Blending Functions as shown in

Thus, the Parametric Equation in Bezier Matrix format is given by:

where, BEZMAT is the Bezier Matrix.

Suppose a Bezier Curve has four Control Points given by B0 [1, 1], B1 [4, 4], B2 [7, 3] and B3 [6, 1]. The first computational task is to determine six points lying in the curve. The second task is to sketch the curve. Since there are four control points, it implies that the curve is of Order = 4, and thus, of Degree = 3, which is a Cubic Bezier Curve. The Parametric Equation is given by:

To determine the points lying on the curve, first we select six random points (RANPO) which satisfy the inclusion condition 0 << k << 1.

Substituting the values of the Control Points B0, B1, B2, B3 and B4 in the Parametric equation, we have:

For Parameter k = 0:

For Parameter k = 0.2:

For Parameter k = 0.4

For Parameter k = 0.5

For Parameter k = 0.8

For Parameter k = 1.0

The sketch of the curve is shown in _{0}, B_{1}, B_{2}, and B_{3}. The curve is shown in red colour, and the six points estimated to lie on the curve are E_{0}, E_{1}, E_{2}, E_{3}, E_{4} and E_{5}. The enclosure B_{0} B_{1} B_{2} B_{3} B_{0} constitutes the convex hall.

In a number of scientific applications, there are cases where two or more parametric curves need to be joined to form a single one. This process is tagged curve continuity [

For curve continuity to hold, some computational conditions must be met. These are known as zero-order, first order, and third order parametric continuities respectively as will be discussed next.

First and foremost, for any two curves to P and Q to be joined, such that P is followed by Q, then the end point of curve P must be the beginning point of curve Q. This is known as the zero-order parametric continuity condition [

Secondly, suppose the two curves P and Q are of degree N, then for the join to be smooth, the first-order parametric condition must hold. The conditional equation is a derivative [

Thus, the first-order parametric continuity condition [

Finally, second order parametric continuity condition [

Again, the formula for the second derivatives at the beginning and end points are given by:

Research has shown that whenever a curve satisfies the second order parametric continuity, it also automatically satisfies the first order continuity [

A number of foundational theorems of Bezier Curves are of key applications to Computer Graphics. Two of these theorems to be proved in this work are the partition of unity theorem and the symmetry theorem respectively.

The partition of unity theorem [

Proof:

Obviously, the trivial statement [(1 − t) + t] = 1 is always true for every parameter t. Substituting this statement into a general Binomial

which completes the proof.

The Bernstein Symmetry Theorem [

Expanding the LHS of the symmetry

Therefore,

Expanding the RHS of the symmetry

Therefore,

By simple comparison, it is clear that “

Derivatives of parametric curves is of key importance, due to its application in Computer Graphics and other areas of computing. Research has shown that the derivative of Bezier Curve is also in itself, another Bezier curve [

Therefore,

which is the formula for first derivative.

Before concluding this work, it is necessary to demonstrate the generation of Bezier Curves and applications in computer graphics in programmatic terms. A number of programming languages have application programming interface (API) or re-usable modules [

However, Python versions 3.7 to 3.8 may bring “DLL Load Failed while importing _Speedup” error message in attempt to import Bezier as shown in

This anomaly is common in a number of Python integrated development environment (IDEs) such as Spider, Jupyter and Pycham used within Anaconda [

One very feasible alternative is the use of Canvas tools [

By its nature, a canvas is borderless and empty until it is enabled with Javascript. This is achieved by specifying an <id attribute> tag to refer it in a script. Furthermore, the width and height attributes are used to define the size of the canvas, and then the style attribute is used to add a border. The sample code snippet shown in

The canvas functions for drawing quadratic and cubic Bezier curves are

The syntax for creating a quadratic Bezier is

In a similar way, since the cubic Bezier has two control points, the syntax for creating it is given by

The practical demonstration in this work uses HTML 5 Canvas in conjunction with Javascript for programming to implement the physical design shown in

A careful look at the diagram shows that the design space is of dimension 500

The points QC1 and QC2 which are marked in RED colour are the control points-QC1 is the control point for the upper quadratic Bezier curve while QC2 is the control point for the lower quadratic curve. The point A and B are the end points of the upper quadratic curve, while C and D are the end points of the lower curve.

The upper cup is ABF while the lower cup turned up-side down is CFD. Both have been sketched using a handheld pencil, all of which are to be generated using Bezier curves. Both cups touch at point F. The program output is shown in

The source code is as follows:

<!DOCTYPE HTML>

<! Bezier Curve Design Sample Project. Implemented in Canvas>

<html>

<head>

<style>

body {

margin: 0px;

padding: 0px;

}

</style>

</head>

<body>

<canvas id="BezierCurveDesign" width = "500" height = "200"></canvas>

<script>

var canvas = document.getElementById('BezierCurveDesign');

var context = canvas.getContext('2d');

context.beginPath();

context.moveTo(150, 25);

context.lineTo(350, 25);

// First Quadratic curve

context.quadraticCurveTo(250, 200, 150,25);

context.moveTo(150, 200);

context.lineTo(350, 200);

// Second Quadratic curve

context.quadraticCurveTo(250, 25, 150, 200);

context.lineWidth = 10;

context.strokeStyle = 'blue';

context.stroke();

</script>

This research has presented a very unambiguous study of Bezier Parametric curves. It lays theoretical foundation of Bezier curves, and presents relevant theorems and corresponding proofs. The importance of Bezier curves in Computer Graphics, and in other fields of computing was touched. The work was concluded by showing how Bezier curves could be programmed using HTML 5 canvas and Java Script.

While Bezier parametric curves have a lot of possibilities, there are however some limitations. One limitation is the obvious computational complexity, especially for handling higher order cases [

As a means of evaluation, it is necessary to mention other works or tools that could be comparable to the use of canvas technology, as this current study. The Open GL has been successfully explored in Bezier curves implementations in a research by [

A number of other comparable works are [