<<

AML710 CAD LECTURE 4

Geometric Transformations

Two dimensional Transformations

Representation of Points and Lines

A vertex or point denotes location A point is represented as a position vector In two dimensions as [x y] and in three dimensions [x y z] or alternatively by column vectors as [x y]T and [x y z]T respectively. y P(x,y)

x

1 GeometricTransformations

• A geometric object is represented by its vertices (as position vectors) A geometric transformation is an operation that modifies its shape, size, position, orientation etc with respect to its current configuration operating on the vertices (position vectors).

• Mathematically a transformation P*=L(P) where P* is called the image of P • It can be seen as a mapping from R2 to R2 • Therefore P=L-1(P*), where L-1 is an inverse operator of L

Transformation as • Given two matrices [A] and [B] find the solution matrix [T] such that [B] = [A][T ] • We know that in the above case the solution works out to be: [T ] = [A]−1[B] where [A]-1 is the inverse of the square matrix [A] • An alternate way is to see the matrix [T] as a geometric operator and the matrices [A] and [T] are assumed known where matrix [A] contains set of position vectors (vertices) w.r.t to some coordinate system that need to be transformed

2 Geometric Transformation

• Consider a 2-D position vector of an arbitrary point as [x y] • Let us take a 2 x 2 matrix [T] (a geometrical operator) as given below for studying the effect of each element on the transformed coordinates of the point [x y] [X*] = [X ][T ] ⎡a b⎤ [][][x* y * = x y ⎢ ⎥ = ax + cy bx + dy ] ⎣c d⎦

Transformation of Points and Lines • Let us consider some typical cases • Case 1: a=d=1 and b=c=0 – No Change (identity) • Case 2: d=1, b=c=0 – in x coordinate • Case 3: b=c=0 – Scaling in both x and y coordinates

⎡1 0⎤ [x* y * ][]= x y ⎢ ⎥ = []x y ⎣0 1⎦ ⎡a 0⎤ [][][]x* y * = x y ⎢ ⎥ = ax y ⎣0 1⎦ ⎡a 0⎤ [][][]x* y * = x y ⎢ ⎥ = ax by ⎣0 b⎦

3 Transformation of Points and Lines • Case 4; a=d =|s|>1 – Enlargement of the original entity • Case 5: 0

⎡a 0⎤ [][][]x* y * = x y ⎢ ⎥ = ax by ⎣0 b⎦

• Note that scaling with respect to origin involves

Transformation of Points and Lines • Case 6: b=c=0, a=1,d=-1 – about x- axis • Case 7: b=c=0, a=-1,d=1 – Reflection about y- axis • Case 8: b=c=0, a=d<0 – Reflection about the origin

⎡1 0 ⎤ [][][]x* y * = x y ⎢ ⎥ = x − y ⎣0 −1⎦ ⎡−1 0⎤ [][][]x* y * = x y ⎢ ⎥ = − x y ⎣ 0 1⎦ ⎡−1 0 ⎤ [][]x* y * = x y ⎢ ⎥ = [− x − y ] ⎣ 0 −1⎦

4 Transformation of Points and Lines • Case 9: a=d=1, c=0 – Shear along y • Case 10: a=d=1, b=0 – Shear along x • Case 11: a=d=1- Two-dimensional shear ⎡1 b⎤ [][][x* y * = x y ⎢ ⎥ = x (bx + y) ] ⎣0 1⎦ ⎡1 0⎤ [][][x* y * = x y ⎢ ⎥ = (x + cy) y ] ⎣c 1⎦ ⎡1 b⎤ [][][x* y * = x y ⎢ ⎥ = x + cy bx + y ] ⎣c 1⎦

Morphing: An Application of Shear

Shear results in material deformations of mechanical problems and it is exploited in motion pictures and animated movies.

5