Tangent Vector-Computer Graphics-Lecture Notes, Study notes of Computer Graphics

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: Tangent, Vector, Prametric, Previous, Curve, Line, Example, Components, Derivation, Space

Typology: Study notes

2011/2012

Uploaded on 08/04/2012

parnashi
parnashi ๐Ÿ‡ฎ๐Ÿ‡ณ

4.4

(49)

71 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Lecture No.37 The Tangent Vector
Another way to define a space curve does not use intermediate points. It uses the tangents
at each end of the curve, instead. Every point on a curve has a straight line associated
with it called the tangent line, which is related to the first derivation of the Parametric
functions x(u), y(u), and z(u), such as those given by Equation 2 of previous lecture. Thus
๎˜‚๎˜ƒ ๎˜‚๎˜ƒ ๎˜‚๎˜ƒ
uz
du
d
anduy
du
d
ux
du
d,, (1)
From elementary calculus, we can compute, for example,
๎˜‚๎˜ƒ
๎˜‚๎˜ƒ
duudx
duudy
du
dy
/
/
(2)
We can treat
๎˜‚๎˜ƒ ๎˜‚๎˜ƒ ๎˜‚๎˜ƒ
duudzandduudyduudx ,, as components of a vector along the
tangent line to the curve. We call this the tangent vector, and define it as
๎˜‚๎˜ƒ ๎˜‚๎˜ƒ ๎˜‚๎˜ƒ ๎˜‚๎˜ƒ
ยป
ยผ
ยบ
ยซ
ยฌ
ยช
kuz
du
d
juy
du
d
iux
du
d
uPu (3)
Or more simply as
>
@
uuuu zyxP (4)
(Here the superscript u indicates the first derivative operation with respect to the
independent variable u). This is a very powerful idea, and we will now see how to use it
to define a curve.
In the last section, we discussed how to define a curve by specifying four points. Now we
have another way to define a curve. We will still use the two end points, but instead of
two intermediate points, we will use the tangent vectors at each end to supply the
information we need to define a curve. By manipulating these tangent vectors, we can
control the slope at each end. The set of vectors 0
p,1
p,u
p0, and u
p1are called the
boundary conditions. This method itself is called the cubic Hermite interpolation, after C.
Hermite (1822-1901) the French mathematician who made significant contributions to
our understanding of cubic and quadratic polynomials.
We differentiate to obtain the x component of the tangent vector:
๎˜‚๎˜ƒ
xxx
ucubuaxudx
du
d๎˜๎˜ 23 2 (5)
Figure 1 Defining a curve using end points and tangent vectors.
๎˜‚๎˜ƒ
xxxx ducubuaux ๎˜๎˜๎˜ 23 (1A)
P1
P
0
Pu
1
Pu
0
docsity.com
pf3
pf4

Partial preview of the text

Download Tangent Vector-Computer Graphics-Lecture Notes and more Study notes Computer Graphics in PDF only on Docsity!

Lecture No.37 The Tangent Vector

Another way to define a space curve does not use intermediate points. It uses the tangents at each end of the curve, instead. Every point on a curve has a straight line associated with it called the tangent line, which is related to the first derivation of the Parametric functions x(u), y(u), and z(u), such as those given by Equation 2 of previous lecture. Thus

    z   u du

d yu and du

d xu du

d , , (1)

From elementary calculus, we can compute, for example,

  dx   u du

dyu du du

dy /

We can treat dx   u du , dy   u du , anddz   u du as components of a vector along the

tangent line to the curve. We call this the tangent vector, and define it as

        (^)  

 (^)  duzuk

d yuj du

d xui du

d P u^ u (3)

Or more simply as

P u^  xu yu z^ u (4)

(Here the superscript u indicates the first derivative operation with respect to the independent variable u). This is a very powerful idea, and we will now see how to use it to define a curve.

In the last section, we discussed how to define a curve by specifying four points. Now we have another way to define a curve. We will still use the two end points, but instead of two intermediate points, we will use the tangent vectors at each end to supply the information we need to define a curve. By manipulating these tangent vectors, we can

control the slope at each end. The set of vectors p 0 , p 1 , pu 0 , and p 1 u are called the

boundary conditions. This method itself is called the cubic Hermite interpolation, after C. Hermite (1822-1901) the French mathematician who made significant contributions to our understanding of cubic and quadratic polynomials.

We differentiate to obtain the x component of the tangent vector:

dx   u xu^ axu bxu cx du

d   3 2 2 (5)

Figure 1 Defining a curve using end points and tangent vectors.

x   u  ax u^3 bxu^2 cxu dx (1A)

P 1 P 0

P u 1

P u 0 docsity.com

Evaluating (1A) and Equation 5 at u = 0, u = 1, yields

x x x

u

x

u

x x x x

x

x a b c

x c

x a b c d

x d

0

1

0

(6)

Using these four equations in four unknowns, we solve for a (^) x , bx , cx and d (^) x in terms of the boundary conditions

0

0

0 1 0 1

0 1 0 1 3 2

d x

c x

b x x x x

a x x x x

x

u x

u u x

u u x

Substituting the result into Equation (1A), yields

x^   u^   2 x 0  2 x 1 x 0 u^ x 1 u  u^3 ^  3 x 0 3 x 1  2 x 0 u  x 1 ux 0 u  u^2 x 0 u x 0 (8)

Rearranging terms we can rewrite this as

x   u   2 u 3  3 u^21  x 0  2 u^33 u^2  x 1  u 3  2 u^2 u  x u 0^  u 3  u^2  x 1 u (9)

Because y(u) and z(u) have equivalent forms, we can include them by rewriting Equation 9 in vector form:

p   u   2 u 3  3 u^21  p 0   2 u^33 u^2  p 1  u 3  2 u^2 u  pu 0^  u 3  u^2  p 1 u (10)

To express Equation 10 in matrix notation, we first define a blending function matrix F  F 1 F 2 F 3 F 4 , where

3 2 4

3 2 3

3 2 2

3 2 1

F u u

F u u u

F u u

F u u

These matrix elements are the polynomial coefficients of the vectors which we rewrite as

p   u  F 1 p 0 F 2 p 1 F 3 pu 0^ F 4 p 1 u (12)

If we assemble the vectors representing the boundary conditions into a matrix B ,

u u^ T B  p 0 p 1 p 0 p 1 (13)

Then

p   u  FB (14)

Here again we write the matrix F as the product of two matrices, U and M, so that

F  UM (15)

where

docsity.com

B =

11

00

1

0

m t

mt

P

P

Carefully consider this array of 12 elements; they uniquely define the curve. By changing either m 0 or m 1 , or both, we can change the shape of the curve. But it is a restricted kind of change because not only do the end points remain fixed, but the end slopes are also unchanged!

The three curves drawn with light lines in Figure 3 show the effects of varying m0 and m1. This is a very powerful tool for designing curves, making it possible to join up end- to-end many curves in a smooth way and still exert some control over the interior shape of each individual curve. For example, as we increase the value of m 0 while holding m 1 fixed, the curve seems to be pushed toward p 1. Keeping m 0 and m 1 equal but increasing their value increases the maximum deflection of the curve from the x-axis and increases the curvature at the maximum. (Under some conditions, not necessarily desirable, we can force a loop to form).

docsity.com