Feb252010

Feb252010 - Transformations And Color Stuff Slides modified...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Stuff Slides modified from Andries Van Dam’s Intro to Graphics at Brown U Transformations And Color
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Stuff Slides modified from Andries Van Dam’s Intro to Graphics at Brown U Component-wise addition of vectors v = v + t where and x’ = x + dx y’ = y + dy To move polygons: translate vertices (vectors) and redraw lines between them Preserves lengths (isometric) Preserves angles (conformal) Translation is thus "rigid-body" dx = 2 dy = 3 Y X 0 1 1 2 2 3 4 5 6 7 8 9 10 3 4 5 6 2D Translation (Points designate origin of object's local coordinate system)
Background image of page 2
Stuff Slides modified from Andries Van Dam’s Intro to Graphics at Brown U Component-wise scalar multiplication of vectors v’ = Sv where and Does not preserve lengths Does not preserve angles (except when scaling is uniform) 2D Scaling Side effect: House shifts position relative to origin
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Stuff Slides modified from Andries Van Dam’s Intro to Graphics at Brown U v’ = R θ v where and x’ = x cos Ө y sin Ө y’ = x sin Ө + y cos Ө NB: A rotation by 0 angle, i.e. no rotation at all, gives us the identity matrix Proof by sine and cosine summation formulas Preserves lengths in objects, and angles between parts of objects Rotation is rigid-body 2D Rotation Side effect: House shifts position relative to origin Rotate by θ about the origin
Background image of page 4
Stuff Slides modified from Andries Van Dam’s Intro to Graphics at Brown U Suppose object is not centered at origin and we want to scale and rotate it. Solution: move to the origin, scale and/or rotate in its local coordinate system , then move it back. This sequence suggests the need to compose successive transformations… 2D Rotation and Scale are Relative to Origin Object’s local coordinate system origin
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Stuff Slides modified from Andries Van Dam’s Intro to Graphics at Brown U Translation, scaling and rotation are expressed as: Composition is difficult to express translation is not expressed as a matrix multiplication Homogeneous coordinates allows expression of all three transformations as 3x3 matrices for easy composition w is 1 for affine transformations in graphics Note: This conversion does not transform p . It is only changing notation to show it can be viewed as a point on w = 1 hyperplane translation: scale: rotation: v’ = v + t v’ = Sv v’ = Rv Homogenous Coordinates becomes
Background image of page 6
Stuff Slides modified from Andries Van Dam’s Intro to Graphics at Brown U P 2d is intersection of line determined by P h with the w = 1 plane Infinite number of points correspond to ( x , y , 1) : they constitute the whole line ( tx , ty , tw ) P 2d (x/w,y/w,1) P h (x,y,w) Y X W 1 What is ?
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Stuff Slides modified from Andries Van Dam’s Intro to Graphics at Brown U For points written in homogeneous coordinates, translation, scaling and rotation relative to the origin are expressed homogeneously as: 2D Homogeneous Coordinate Transformations (1/2)
Background image of page 8
Stuff Slides modified from Andries Van Dam’s Intro to Graphics at Brown U
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 47

Feb252010 - Transformations And Color Stuff Slides modified...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online