



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Computer Graphics involves technology to accept, process, transform and present information in a visual form that also concerns with producing images and animations using a computer. This course teach how to make your own design in computer using OpenGl. This lecture includes: Bezier, Curves, Geometric, Construction, Algebraic, Definition, functions, Normal
Typology: Study notes
1 / 7
This page cannot be seen from the preview
Don't miss anything!




The Bezier curve is an important part of almost every computer-graphics illustration program and computer-aided design system in use today. It is used in many ways, from designing the curves and surfaces of automobiles to defining the shape of letters in type fonts. And because it is numerically the most stable of all the polynomial-based curves used in these applications, the Bezier curve is the ideal standard for representing the more complex piecewise polynomial curves.
In the early 1960s, Peter Bezier began looking for a better way to define curves and surfaces one that would be useful to a design engineer. He was familiar with the work of Ferguson and Coons and their parametric cubic curves and bicubic surfaces. However, these did not offer an intuitive way to alter and control shape. The results of Bezier’s research led to the curves and surfaces that bear his name and became part of the UNISURF system. The French automobile manufacturer, Renault used UNISURF to design the sculptured surfaces of many of its products.
A Geometric Construction
We can draw a Bezier curve using a simple recursive geometric construction. Let’s begin by constructing a second-degree curve. We select three points A, B, C so that line AB is a tangent to the curve at A, and BC is tangent at C. The curve begins at A and ends at C. For any ratio, ui , we construct points D and E so that
Figure 1: Geometric Construction of a second-degree Bezier curve.
BC ui
On DE we construct F so that DF/DE = u (^) j. Point F is on the curve. Repeating this process for other values of ui , we produce a series of points on a Bezier curve. Note that we must be consistent in the order in which we sub-divide AB and BC.
To define this curve in a coordinate system, let point A = (xA, y (^) A), B= (x (^) B, y (^) B). Then coordinates of points D and E for some value of ui are
D A i ^ B A
D A i B A y y u y y
x x u x x
And
docsity.com
E B i ^ C B
E B i C B y y u y y
x x u x x
The coordinates of point F for some value of ui are
F D i ^ E D
F D i E D y y u y y
x x u x x
To obtain xF and y (^) F in terms of the coordinates of points A, B and C, for any value of ui in the unit interval, we substitute appropriately from Equation 2 and 3 into equations 4 of plane curve. After rearranging terms to simplify, we find
F ^ i ^ A i ^ i ^ B i C
F i A i i B i C y u y u u y u y
x u x u u x ux (^22)
2 2
1 2 1
We generalize this set of equations for any point on the curve using the following substitutions: (^) F
F yu y
xu x
And we let
A B C
A B C y y y y y y
x x x x x x
0 1 2
Now we can rewrite Equation 5 as
2
2 0 1
2
1 2 1
1 2 1 yu u y u uy u y
xu u x u ux ux
This is the set of second-degree equations for the coordinates of points on Bezier curve based on our construction.
We express this construction process and Equations 8 in terms of vectors with the following substitutions. Let the vector po represent point A, p 1 point B, and p 2 point C. Form vector geometry we have D >>>> and E == >>> if we let F = >>> we see that
p u p 0 u p 1 p 0 u p 1 u p 2 p 1 p 0 u p 1 p 0 (9)
We rearrange terms to obtain a more compact vector equation of a second degree Bezier curve:
p u 1 u 2 p 0 2 u 1 u p 1 u^2 p 2 (10)
The ratio u is the parametric variable. Later we will see that this equation is an example of a Bernstein polynomial. Note that the curve will always lie in the plane containing the three control points, but the points do not necessarily lie in the xy plane.
Similar constructions apply to Bezier curves of any degree. In fact the degree of a Bezier curve is equal to n-1, where n is the number of control points. Figure 2 shows the construction of point on a cubic Bezier curve, which requires four control points A, B, C, and D to define it. The curve begins at point A tangent to the, AB, and ends at D and tangent to CD. We construct points E, F, and G so that
docsity.com
n
i
p u pi fiu 0
Figure 3: Bezier curves and their control points
Equation 16 is a compact way to express the sum of several similar terms because what it says is this:
p u p 0 f 0 u p 1 f 1 u ........ pnfn u (17)
Of which Equation 10 and 15 are specific examples, for n=2 and n=3, respectively. The n+1 functions, that is the fi (u) must produce a cure that has certain well-defined characteristics. Here are some of the most important ones:
Other characteristics can be found in more advanced works on the subject.
Figure
Figure 4: Three different sequences of four control points
docsity.com
Figure 5: Modifying the shape of a Bezier curve.
A family of functions called Bernstein polynomials satisfies these requirements. They are the basis functions of the Bezier curve (Other curves, such as the NURBS curves, use different, but related, basis functions). We rewrite Equation 16 using them so that
n
i
p u pi Binu 0
Were the basis functions are
i n
n n i (20)
The symbol! is the factorial operator. For example, 3! = 3 x 2 x 1, 5! = 5 x 4 x 3 x 2 x 1, so forth. We use the following conventions when evaluating Equation20; If i and u equal zero, then ui^ = 1 and 0! = 1. We see that for n+1 control points, the basis functions produce an nth-degree polynomial.
Expanding Equation 18 for a second degree Bezier curve (When n=2 and there are three control points) produces
From Equation 20, we find
3
2
1
0
3
2 3
2 3
2 3
p
p
p
p
u
u u
u u u
u u u
pu
T
or as
3
2
1
0 3 2
p
p
p
p
p u u u u (33)
If we let
and
Then we can write Equation 33 even more compactly as
Note that the composition of the matrices U, M, and P varies according to the number of control points (that is, the degree of the Bernstein polynomial basis functions).