

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: Space, Curves, Equations, Vector, Parameter, Plane, Curves, Polynomials, Constants
Typology: Study notes
1 / 3
This page cannot be seen from the preview
Don't miss anything!


A space curve is not confined to a plane. It is free to twist through space. To define a
space curve we must use parametric functions that are cubic polynomials. For x (u) we
write
x u ax u bxu cxu dx
3 2 (1)
With similar expressions for y(u) and z(u). Again the a, b, c and d terms are constant
coefficients. As we did with Equation for a plane curve, we combine the x(u), y(u) , and
z(u) expressions into a single vector equation :
p u au bu cu d
3 2 (2)
If a = 0 , then this equation is identical to Equation discussed in plane curves
To define a specific curve in space, we use the same approach as we did for a plane curve.
This time, though, there are 12 coefficients to be determined. We specify four points
through which we want the curve to pass, which provides all the information we need to
determine a, b, c, and d. but which four points? Two are obvious: p 0 and p 1 , the end
points at u 0 and u 1. For various reasons beyond our scope, it turns out to be
advantageous to use two intermediate points that we assign parametric values of 3
u
and 3
u , or (^)
p and (^)
p. So we now have the four points we need:
Figure 1 Four points define a cubic space curve
p 0 , (^)
p and (^)
p and p 1 , which we can rewrite as the more convenient p1, p2,
p3, and p4 (Figure 1).
Substituting each of the values of the parametric variable u 0 , 13 , 23 , 1 into
Equation 1, we obtain the following four equations in four unknowns:
x (^) 1 d x
x ax bx cx d x 3
2
x ax bx cx d x 3
x
y
z
P 1
P 1/
P 0
P 2/
docsity.com
x (^) 4 ax bx cx dx
Now we can express ax, bx, cx and dx in terms of x (^) 1, x2, x 3 , and x 4. After doing the necessary
algebra, we obtain
1 2 3 4 2
a (^) x x x x x
1 2 3 4 2
bx 9 x x x x
1 2 3 4 2
c (^) x x x x x (4 )
d (^) x x 1
We substitute these results into Equation 1, producing
1 2 3 4 1
2 1 2 3
3 1 2 3 4
x x x x u x
xu x x x x u x x x x u
All this looks a bit messy right now, but we can put it into a neat, much more compact
form. We begin by rewriting Equation 5 as follows:
4
3 2 3
3 2
2
3 2 1
3 2
u u u x u u u x
xu u u u x u u u x
Using equivalent expressions for y(u) and z(u), we can summarize them as a single vector
equation:
4
3 2 3
3 2
2
3 2 1
3 2
u u u p u u u p
pu u u u p u u u p
This means that, given four point assigned successive values of u (in this case at u=0, 1/3,
2/3, 1), equation 7 produces a curve that starts at p1, passes through p2 and p3, and ends
at p4.
Now let’s take one more step toward a more compact notation. Using the four parametric
functions appearing in Equation 7, we define a new matrix, G G 1 G 2 G 3 G 4 ,
where
G 1 (^) u u u
G u u 9 u 2
2
G u 18 u 9 u 2
G u u u
3 2 4 2
And then define a matrix P containing the control points,
T P P 1 P 2 P 3 P 4 , so that
docsity.com