Elementary 3D Transformations a "Graphics Engine" - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

Elementary 3D Transformations a "Graphics Engine"

Description:

Homogeneous coordinates. common notation ... Point transformation in homogeneous coordinates. Implemented by matrix multiplication ... Homogeneous coordinates ... – PowerPoint PPT presentation

Number of Views:180
Avg rating:3.0/5.0
Slides: 24
Provided by: clar126
Category:

less

Transcript and Presenter's Notes

Title: Elementary 3D Transformations a "Graphics Engine"


1
Elementary 3D Transformations - a "Graphics
Engine"
  • Transformation procedures
  • Transformations of coordinate systems
  • Translation
  • Scaling
  • Rotation

2
Coordinate systems
left handed right handed
3
Transformation procedures
  • A scene is made up of objects
  • Objects can be made of separately defined parts
  • Each object / part defined by a list of points
    (vertices)
  • Any part of the object can be moved or distorted
    by applying a transformation to the list of
    points which define it

4
Transformations of coordinate system
  • Separate coordinate systems for different objects
  • Common (Word) coordinate system for the scene
  • Building a scene - transformation to the Word
    coordinate system

5
Basic transformations
  • Translation (shift)
  • Scaling
  • Rotation

6
Translation
x x Tx y y Ty z z Tz
T (Tx,Ty,Tz)
7
Scalingabout the origin
x x Sx y y Sy z z Sz S gt 1 -
enlarge 0 lt S lt 1 - reduce S lt 0 - mirror
Y
Z
X
8
Scalingabout an arbitrary point
Scaling about a fixed point ( xc, yc, zc ) x'
xc ( x xc ) Sx y' xc ( y yc )
Sy z' zc ( z zc ) Sz Can also be
achieved by a composite transformation.
9
Rotation
  • The direction of rotation in the left-handed
    system
  • Positive angle of rotation
  • when looking from a positive axis toward the
    origin
  • a 90o clockwise rotation transforms one positive
    axis into the other.

10
Positive angle of rotation for Z axis
Looking from the positive end of Z axis towards
the origin
11
Rotation
  • Axis of rotation is Direction of positive
    rotation is
  • X from Y to Z
  • Y from Z to X
  • Z from X to Y

12
Rotation about Z axis
Y
Z
  • x' xcos ? - ysin ?
  • y' xsin ? ycos ?
  • z' z

X
13
Rotation about X axis
Y
Z
  • y' ycos ? - zsin ?
  • z' ysin ? zcos ?
  • x' x

X
14
Rotation about Y axis
Y
  • z' zcos? - xsin?
  • x' zsin? xcos?
  • y' y

Z
X
15
Rotation about any fixed point
  • 1. Translate the object so that the rotation axis
    coincides with the parallel coordinate axis
  • 2. Perform the specified rotation
  • 3. Translate the object so that the rotation axis
    is moved back to its original position

16
Matrix representationHomogeneous coordinates
  • common notation for ALL transformations
  • common computational mechanism for ALL
    transformations
  • simple mechanism for combining a number of
    transformations gt computational efficiency

17
Common matrix operation for all transformations???
  • Translate (shift) point P
  • Scale point P
  • Rotate point P
  • Point (vector) P xp yp zp
  • Matrix ???

18
Homogeneous coordinates
  • Point P (x, y, z ) represented by a vector
  • P
  • Transformations
  • All represented by a 4 x 4 matrix T

T
19
Point transformation in homogeneous coordinates
  • Implemented by matrix multiplication
  • P T P

20
Transformation matrices for elementary
transformations
  • 4 x 4 matrix
  • Homogeneous coordinates
  • Translation, scaling, rotation and perspective
    projection, all defined through matrices

21
Translation
  • x x Tx
  • y y Ty
  • z z Tz
  • T

22
Scaling
  • x x Sx
  • y y Sy
  • z z Sz
  • S

23
Rotation about Z axis
  • x' xcos ? - ysin ?
  • y' xsin ? ycos ?
  • z' z
  • Rz

24
Rotation about X axis
  • y' ycos ? - zsin ?
  • z' ysin ? zcos ?
  • x' x
  • Rx

25
Rotation about Y axis
  • z' zcos? - xsin?
  • x' zsin? xcos?
  • y' y
  • Ry
Write a Comment
User Comments (0)
About PowerShow.com