Transformations - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

Transformations

Description:

1. Transformations. Consider transformation of a Unit Square. Ability to ... S produces overall scaling s 1 enlargement scaling or s 1 reduction scaling. 14 ... – PowerPoint PPT presentation

Number of Views:70
Avg rating:3.0/5.0
Slides: 20
Provided by: aran2
Category:

less

Transcript and Presenter's Notes

Title: Transformations


1
Transformations
  • Consider transformation of a Unit Square
  • Ability to transform points and lines
  • Origin at A0,0, B, C, D figure 2.6a
  • Apply the 2x2 matrix
  • Origin is unaffected by transformation
  • Coordinates of B equal to first row and D
    equals that of the second row of transform.

2
Unit Square Tranformation
  • B and D determine the 2D transform
  • Transformed figure is a parallelogram ( recall
    that parallel lines transform as parallel lines)
  • Combination of shearing ( b and c terms) and
    scaling (a and d terms)
  • Area property is of special interest why?

3
Area properties
  • Ap area of big rectangle area of triangles(2)
    area of polygons(2)
  • Area as function of determinant of the
    transformation matrix
  • Ap As(ad bc) As area of initial square
  • Generalisation as At Ai(ad bc)
  • Area of arbitrary shapes in 2D

4
Arbitrary rotation
  • Pure rotation of a unit square
  • Consider rotation about the origin (fig 2.7)
  • Positive rotation in the CCW direction
  • Point B to B with x (1)cos _at_ and y
    (1) sin _at_
  • Point D to D with x -(1) sin _at_ and y
    (1) cos _at_
  • Point B and D define the arbitrary matrix

5
2x2 Rotation matrix
  • Roation matrix is defined as
  • cos _at_ sin _at_
  • -sin _at_ cos _at_
  • For 90 degree CCW rotation about the origin this
    reduces to 0 1
  • -1 0
  • Scaling and Shearing with no dimension change
    hence a pure rotation matrix ( _at_ )

6
Translations
  • We have not introduced any translations
  • Forrest (2-2) introduced third component to
    point vectors to overcome this
  • x y 1 and x y 1
  • The 3x3 transformation is introduced as follows
    1 0 0
  • 0 1 0
  • m n 1

7
Homogeneous Coordinates
  • x y 1 is now the transformed vector
  • Addition of third element to position vector
  • Addition of third column/row to transformation
    matrix
  • Look at this as an additional coordinate of the
    position vector
  • x y 1 becomes X Y H

8
Homogeneous Coordinates
  • Transformation to the plane H 1
  • If the transformation is 1 0 p
  • 0 1
    q
  • m n
    s
  • X Y H where H is not equal to 1
  • Coming back to 2D, we restrict H 1
  • x y X/H Y/H 1

9
Homogeneous Coordinates
  • Representation of a n-component vector by an n1
    component vector is called homogeneous coordinate
    representation
  • Do transformation in n1 space and project back
    to the n-dimensional space of interest (H 1 in
    our case)
  • Physical coordinates are x hx/h and yhy/y

10
Uniqueness
  • No unique homogeneous representation of a point
    in 2-space
  • For example 12 8 4, 6 4 2 and 3
    2 1 all represent the physical coordinates of
    3 2
  • In homogeneous coordinates X Y H x y 1
  • a b 0
  • c d 0
  • 0 0 1

11
Normalization
  • All transforms of x and y fall within the plane
    of H1 after normalization
  • Translation and projection could now be
    introduced
  • Scaling and shearing using a, b, c, d
  • What is projection? x y (pxqy1) . See
    eq.2-34. Page 39)

12
Projection
  • H px qy 1 defines the plane containing
    homogeneous coordinates
  • Figure 2-9. AB to CD and back to C D
  • Effect of normalizing is to project CD to C D
    letting H 1 using origin as center of
    projection
  • Four parts of a 3x3 transformation matrix

13
3x3 TRANSFORM
  • A,B,C,D produce scaling, shear and rotation
    (see page 40)
  • M and N produce translation
  • P and Q produce projection
  • S produces overall scaling s lt 1 enlargement
    scaling or s gt 1 reduction scaling

14
Points at infinity
  • Homogeneous coordinates will allow mapping one
    set of points to map from one coordinate system
    to another.
  • Infinite to finite range
  • x y 0 in 2-dimensions represents points at
    infinity
  • Generalized transformation is of more practial
    use in CAE

15
ARBITRARY AXIS ROTATION
  • Rotations about points other than origin is now
    possible
  • 3 step process to accomplish arbitrary point
    rotations
  • - Translate to the origin from given point
  • - Apply rotation transformation
  • - Translate back to the given point

16
ROTATION ABOUT POINT
  • Get disired center of rotation to the origin
    (usually negate coordinates page 44)
  • Apply rotation matrix to rotate about origin
  • Reverse translation back to the point
  • 2D rotations about each axis are given in figure
    2-10. Operators and diagrams.

17
  • Scaling is controlled by the magnitude of the two
    terms in the primary DIAGONAL of the T matrix
  • Using 2 0
  • 0 2 a 2 times magnification about
    origin occurs
  • Unequal scale factors create distorsion
  • Plane surfaces can be easily transformed

18
Combined Transformations
  • Typically more than one transform used
  • Controls shape and position
  • NON-COMMUTATIVE
  • Order is important in matrix multiplications
  • Consider a 90-degree rotation and then reflection
    on one of the vertices x y of a triangle

19
Combined Transformations
  • First rotate and then apply reflection
  • Result y x
  • Now first apply reflection and then rotate
  • Result -y -x
  • NOT THE SAME. NON-COMMUTATIVE
  • Mapping from one plane into a second plane
Write a Comment
User Comments (0)
About PowerShow.com