Feb252010

# Feb252010 - Transformations And Color Stuff Slides modified...

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

Stuff Slides modified from Andries Van Dam’s Intro to Graphics at Brown U Transformations And Color

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

View Full Document
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)
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

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

View Full Document
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
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

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

View Full Document
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
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 ?

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

View Full Document
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)
Stuff Slides modified from Andries Van Dam’s Intro to Graphics at Brown U

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### 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
Ask a homework question - tutors are online