3D Mathematical Preliminaries - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

3D Mathematical Preliminaries

Description:

... P1 t[P2 - P1] or L = P1 Vt. P1. P2. t = 1. t = 0. t 1 ... A transformation maps points in one coordinate system to points in another coordinate system. ... – PowerPoint PPT presentation

Number of Views:34
Avg rating:3.0/5.0
Slides: 19
Provided by: drew81
Category:

less

Transcript and Presenter's Notes

Title: 3D Mathematical Preliminaries


1
3-D Mathematical Preliminaries
2
Coordinate Systems
Left-handed
Right-handed
coordinate
coordinate
system
system
3
3-D Vectors
  • Have length and direction V xv, yv, zv
  • Length is given by the Euclidean Norm V ?(
    xv2 yv2 zv2 )
  • Dot Product VU xv, yv, zv xu, yu, zu
    xvxu yvyu zvzu
  • V U cos ß
  • Cross Product V x U vyuz - vzuy, -vxuz
    vzux, vxuy - vyux
  • V x U - ( U x V)
  • Direction of resulting vector depends on
    coordinate system and order of vectors.

4
Parametric Definition of a Line
Given two points P1 (x1, y1, z1), P2 ( x2,
y2, z2) x x1 t (x2 - x1) y y1 t (y2 -
y1) z z1 t (z2 - z1)
t gt 1
t 1
t 0
P2
t lt 0
P1
  • Given a point P1 and a vector V xv, yv, zv
  • x x1 t xv, y y1 t yv , z
    z1 t zv
  • COMPACT FORM L P1 tP2 - P1
    or L P1 Vt

5
Equation of a plane
  • Ax By Cz D 0
  • Alternate Form A'x B'y C'z D' 0
  • where A' A/d, B' B/d, C' C/d, D'
    D/d
  • d ?(A2 B2 C2)
  • Distance between a point and the plane is given
    by
  • A'x B'y C'z D' (sign indicates which side)
  • Given Ax By Cz D 0 Then A, B, C is a
    normal vector
  • Pf Given two point P1 and P2 in the plane, the
    vector P2 - P1 is in the plane and A,B, C
    P2 - P1 (Ax2 By2 Cz2) - (Ax1 B y1
    Cz1) ( - D )
    - ( - D )
    0

6
Derivation of Plane Equation
  • To derive equation of the plane given three
    points P1, P2, P3
  • P3 - P1 x P2 - P1 N, orthogonal vector
  • Given a general point P (x,y,z)
  • N P - P1 0 if P is in the plane.

Or given a point (x,y,z) in the plane and normal
vector N then N x,y,z -D
7
Basic Transformations
  • Translation
  • Scale
  • Rotation
  • Shear

8
Translation in Homogeneous Coordinates
  • TP (x tx, y ty, z tz)

T
P
9
Scale
  • SP (sxx, syy, szz)

Note A scale may also translate an object!
10
Rotations
  • Positive Rotations are defined as follows
  • Axis of rotation is Direction of positive
    rotation is
  • y to z
  • z to x
  • x to y

11
Rotations
  • About the z axis Rz(ß) P
  • About the x axis Rx(ß) P
  • About the y axis Ry(ß) P

12
Shears
  • xy Shear
  • SHxyP

Y
Y
X
X
Z
Z
13
Mapping a 4D point into R3
  • If Tr is any transformation, then it is possible
    that the 4th component of the point will not be
    1.
  • TrP Tr(x,y,z,1) (x', y', z',w)
  • Pplotted (x'/w, y'/w, z'/w)
  • Transformations may be appended together via
    matrix multiplication.

14
Rotation About An Arbitrary Axis
P2
1. Translate one end of the axis to the
origin P2-P1 u1, u2, u3
Z
  • a ? (u12 u32)
  • b ? (u12 u22)
  • c ? (u22 u32)
  • cosß u3/a
  • sinß u1/a

U
P1
c
u3
Y
a
ß
u2
b
u1
X
15
2. Rotate the coordinate axes about the y-axis
an angle -ß
Z
Z
a
c
u3
a
Y
ß
µ
Y
u2
u2
b
u1
X
X
After Ry(-ß), µ lies in the y-z plane
16
3. Rotate the coordinate axes about the x-axis
through an angle µ to align the z-axis with U
U
Z
Rx (µ) cos µ a/ u sinµ u2 / u
  • 4. When u is aligned with the z-axis, apply the
    original rotation, R, about the z-axis.
  • 5. Apply the inverses of the transformations in
    reverse order.

µ
Y
X
17
Rotation About an Arbitrary Axis
  • T-1 Ry(ß)Rx(-µ)RRx(µ)Ry(-ß)T P

18
Transformation Types
  • A transformation maps points in one coordinate
    system to points in another coordinate system.
  • Rigid body transformations
  • Do not distort shapes line lengths and angles
    are preserved
  • Rotations, Translations, and combinations of both
  • Affine transformations
  • Keep parallel lines parallel, but do not preserve
    line lengths or angles
  • Rotations, Translations, Scales, Shears, and
    combinations of these
Write a Comment
User Comments (0)
About PowerShow.com