Top Banner
Basic mathematics for geometric modeling
29

Basic mathematics for geometric modeling

Feb 06, 2016

Download

Documents

nat

Basic mathematics for geometric modeling. Coordinate Reference Frames. y. Cartesian Coordinate (2D) Polar coordinate. (x, y). x. r. . Y. P. P. y. r. r. y. . . x. x. x. Relationship : polar & cartesian. Use trigonometric, polar  cartesian x = r cos  , y = r sin  - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Basic mathematics for geometric modeling

Basic mathematics for geometric modeling

Page 2: Basic mathematics for geometric modeling

Coordinate Reference Frames• Cartesian Coordinate (2D)

• Polar coordinate

x

y

(x, y)

r

Page 3: Basic mathematics for geometric modeling

Relationship : polar & cartesian

x

PY

x

yr

r

x

y

P

Use trigonometric, polar cartesianx = r cos , y = r sin

Cartesian polar

r = x2 + y2, = tan-1 (y/x)

Page 4: Basic mathematics for geometric modeling

3D cartesian coordinates

x

y

z

Right-handed 3D coordinate system

z

x

y

Page 5: Basic mathematics for geometric modeling

POINT

• The simplest of geometric object.• No length, width or thickness.• Location in space• Defined by a set of numbers (coordinates)

e.g P = (x, y) or P = (x, y, z)• Vertex of 2D/ 3D figure

Page 6: Basic mathematics for geometric modeling

• distance and direction• Does not have a fixed location in space• Sometime called “displacement”.

VECTOR

Page 7: Basic mathematics for geometric modeling

VECTOR

• Can define a vector as the difference between two point positions.

x

y

P

Q

x1 x2

y1

y2 V

V = Q – P = (x2 – x1, y2 – y1) = (Vx, Vy)Also can be expressed as V = Vxi + Vyj

Component form

Page 8: Basic mathematics for geometric modeling

VECTOR : magnitude & direction

• Calculate magnitude using the Pythagoras theorem distance– |V| = Vx2 + Vy2

• Direction– = tan-1 (Vy/Vx)

Page 9: Basic mathematics for geometric modeling

• Example 1• If P(3, 6) and Q(6, 10). Write vector V in

component form.• Answer• V = [6 - 3, 10 – 6]

= [3, 4]

VECTOR : magnitude & direction

QV

Page 10: Basic mathematics for geometric modeling

• Example 1 (cont)• Compute the magnitude and direction of

vector V• Answer• Magnitud |V| = 32 + 42

• = 25 = 5• Direction = tan-1 (4/3) = 53.13

VECTOR : magnitude & direction

Page 11: Basic mathematics for geometric modeling

Unit Vector

• As any vector whose magnitude is equal to one

• V = V |V|• The unit vector of V in example 1 is

= [Vx/|V| , Vy/|V|] = [3/5, 4/5]

Page 12: Basic mathematics for geometric modeling

VECTOR : 3D

• Vector Component– (Vx, Vy, Vz)

• Magnitude– |V| = Vx2 + Vy2 + Vz2

• Direction = cos-1(Vx/|V|), = cos-1(Vy/|V|), =cos-1(Vz/|V|)

• Unit vector• V = V = [Vx/|V|, Vy/|V|, Vz/|V|] |V|

x

y

z

V

VxVz

Vy

Page 13: Basic mathematics for geometric modeling

Scalar Multiplication

• kV = [kVx, kVy, kVz]• If k = +ve V and kV are in the same direction• If k = -ve V and kV are in the opposite

direction• Magnitude |kV| = k|V|

Page 14: Basic mathematics for geometric modeling

Scalar Multiplication

• Base on Example 1• If k = 2, find kV and the magnitudes

• Answer• kV = 2[3, 4] = [6, 8]• Magnitude |kV|= 62 + 82 = 100 = 10• = k|V| = 2(5) = 10

Page 15: Basic mathematics for geometric modeling

Vector Addition

• Sum of two vectors is obtained by adding corresponding components

• U = [Ux, Uy, Uz], V = [Vx, Vy, Vz]• U + V = [Ux + Vx, Uy + Vy, Uz + Vz]

x

yV

U x

yV

U

U + V

Page 16: Basic mathematics for geometric modeling

Vector Addition

• Example• If vector P=[1, 5, 0], vector Q=[4, 2, 0]. Compute

P + Q

• answer• P + Q = [1+4, 5+2, 0+0] = [5, 7, 0]

P

Q

P

Q

Page 17: Basic mathematics for geometric modeling

Vector Addition & scalar multiplication properties

• U + V = V + U• T + (U + V) = (T + U) + V• k(lV) = klV• (k + l)V = kV + lV• k(U + V) = kU + kV

Page 18: Basic mathematics for geometric modeling

Scalar Product

• Also referred as dot product or inner product• Produce a number.• Multiply corresponding components of the two

vectors and add the result.• If vector U = [Ux, Uy, Uz], vector V = [Vx, Vy,

Vz]• U . V = UxVx + UyVy + UzVz

Page 19: Basic mathematics for geometric modeling

Scalar Product.

• Example• If vector P=[1, 5, 0], vector Q=[4, 2, 0].

Compute P . Q

• answer• P . Q = 1(4) + 5(2) + 0(0)• = 14

Page 20: Basic mathematics for geometric modeling

Scalar Product properties• U.V = |U||V|cos • angle between two vectors

– = cos –1 (U.V)– |U||V|

• Example• Find the angle between vector

b=(3, 2) and vector c = (-2, 3)

U

V

Page 21: Basic mathematics for geometric modeling

Solution• b.c = (3, 2). (-2, 3)• 3(-2) + 2(3) = 0• |b| = 32 + 22 = 13 = 3.61• |c| = (-2)2 + 32 = 13 = 3.61 = cos –1 ( 0/(3.61((3.61)) = cos –1 ( 0 ) = 90

Scalar Product properties

Page 22: Basic mathematics for geometric modeling

• If U is perpendicular to V, U.V = 0• U.U = |U|2

• U.V = V.U• U.(V+W) = U.V + U.W• (kU).V = U.(kV)

Scalar Product properties

Page 23: Basic mathematics for geometric modeling

Vector Product• Also called the cross product• Defined only for 3 D vectors• Produce a vector which is perpendicular to

both of the given vectors.

x

y

z a

b

cc = a x b

Page 24: Basic mathematics for geometric modeling

Vector Product• To find the direction of vector C, use righ-

hand rules

x

z A

B

Cx

z A

B

C

Page 25: Basic mathematics for geometric modeling

Vector Product• To find the direction of vector C, use righ-

hand rules

x

z A B

C

A x B

x

zC

A B

B x A

Page 26: Basic mathematics for geometric modeling

exercise• Find the direction of vector C, (keluar skrin atau kedalam

skrin)

A

B A x BP

QP x Q

MN

M x NL

OL x O

Page 27: Basic mathematics for geometric modeling

• If vektor A = [Ax, Ay, Az], vektor B = [Bx, By, Bz]• A x B = i j k i j• Ax Ay Az Ax Ay• Bx By Bz Bx By= [ (AyBz-AzBy), (AzBx-AxBz), (AxBy-AyBx)]

Vector Product

Page 28: Basic mathematics for geometric modeling

Vector Product

• Example• If P=[1, 5, 0], Q=[4, 2, 0]. Compute P x Q• Solution• P x Q = i j k i j• 1 5 0 1 5• 4 2 0 4 2• = [ (5.(0)-0.(5)), (0.(4)-1.(0)), (1.(2)-5.(4))]• = [ 0, 0, -18]

P

Q

Page 29: Basic mathematics for geometric modeling

Vector Product

• Properties• U x V = |U||V|n sin where n = unit vector

perpendicular to both U and V• U x V = -V x U• U x (V + W) = U x V+ U x W• If U is parallel to V, U x V = 0 • U x U = 0• kU x V = U x kV