DOC PREVIEW
MIT 6 837 - 04_transformations

This preview shows page 1-2 out of 7 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1MIT EECS 6.837, Durand and CutlerTransformationsMIT EECS 6.837, Durand and CutlerOutline• Assignment 0 Recap• Intro to Transformations• Classes of Transformations• Representing Transformations• Combining Transformations• Change of Orthonormal BasisMIT EECS 6.837, Durand and CutlerCool Results from Assignment 0emmav psotokoi scyuditsalexgMIT EECS 6.837, Durand and CutlerNotes on Assignments• Make sure you turn in a linux or windowsexecutable (so we can test your program)• Don't use athena dialup• Collaboration Policy– Share ideas, not code• Ask questions during office hours, or email [email protected] • Tell us how much time you spent on each assignmentMIT EECS 6.837, Durand and CutlerQuick Review of Last Week• Ray representation• Generating rays from eyepoint / camera– orthographic camera– perspective camera• Find intersection point & surface normal• Primitives:– spheres, planes, polygons, triangles, boxesMIT EECS 6.837, Durand and CutlerOutline• Assignment 0 Recap• Intro to Transformations• Classes of Transformations• Representing Transformations• Combining Transformations• Change of Orthonormal Basis2MIT EECS 6.837, Durand and CutlerWhat is a Transformation?• Maps points (x, y) in one coordinate system to points (x', y') in another coordinate system• For example, IFS:x' = ax + by + cy' = dx + ey + fMIT EECS 6.837, Durand and CutlerCommon Coordinate Systems• Object space– local to each object• World space– common to all objects• Eye space / Camera space– derived from view frustum• Screen space– indexed according to hardware attributesMIT EECS 6.837, Durand and CutlerSimple Transformations• Can be combined• Are these operations invertible?Yes, except scale = 0MIT EECS 6.837, Durand and CutlerTransformations are used:• Position objects in a scene (modeling)• Change the shape of objects• Create multiple copies of objects• Projection for virtual cameras• AnimationsMIT EECS 6.837, Durand and CutlerOutline• Assignment 0 Recap• Intro to Transformations• Classes of Transformations• Rigid Body / Euclidean Transforms• Similitudes / Similarity Transforms • Linear• Affine• Projective• Representing Transformations• Combining Transformations• Change of Orthonormal BasisMIT EECS 6.837, Durand and CutlerRigid-Body / Euclidean Transforms • Preserves distances• Preserves anglesTranslationRotationRigid / EuclideanIdentity3MIT EECS 6.837, Durand and CutlerSimilitudes / Similarity Transforms• Preserves anglesTranslationRotationRigid / EuclideanSimilitudesIsotropic ScalingIdentityMIT EECS 6.837, Durand and CutlerLinear TransformationsTranslationRotationRigid / EuclideanLinearSimilitudesIsotropic ScalingIdentityScalingShearReflectionMIT EECS 6.837, Durand and CutlerLinear Transformations• L(p + q) = L(p) + L(q)• L(ap) = a L(p)TranslationRotationRigid / EuclideanLinearSimilitudesIsotropic ScalingScalingShearReflectionIdentityMIT EECS 6.837, Durand and CutlerAffine Transformations• preserves parallel linesTranslationRotationRigid / EuclideanLinearSimilitudesIsotropic ScalingScalingShearReflectionIdentityAffineMIT EECS 6.837, Durand and CutlerProjective Transformations• preserves linesTranslationRotationRigid / EuclideanLinearAffineProjectiveSimilitudesIsotropic ScalingScalingShearReflectionPerspectiveIdentityMIT EECS 6.837, Durand and CutlerPerspective Projection4MIT EECS 6.837, Durand and CutlerOutline• Assignment 0 Recap• Intro to Transformations• Classes of Transformations• Representing Transformations• Combining Transformations• Change of Orthonormal BasisMIT EECS 6.837, Durand and CutlerHow are Transforms Represented?x' = ax + by + cy' = dx + ey + fx'y'a bd ecf=xy+p' = M p + tMIT EECS 6.837, Durand and CutlerHomogeneous Coordinates• Add an extra dimension• in 2D, we use 3 x 3 matrices• In 3D, we use 4 x 4 matrices• Each point has an extra value, wx'y'z'w'=xyzwaeimbfjncgkodhlpp' = M pMIT EECS 6.837, Durand and CutlerHomogeneous Coordinates• Most of the time w = 1, and we can ignore it• If we multiply a homogeneous coordinate by an affine matrix, w is unchangedx'y'z'1=xyz1aei0bfj0cgk0dhl1MIT EECS 6.837, Durand and CutlerHomogeneous Visualization• Divide by w to normalize (homogenize)• W = 0? w = 1w = 2(0, 0, 1) = (0, 0, 2) = …(7, 1, 1) = (14, 2, 2) = …(4, 5, 1) = (8, 10, 2) = …Point at infinity (direction)MIT EECS 6.837, Durand and CutlerTranslate (tx, ty, tz)• Why bother with the extra dimension?Because now translations can be encoded in the matrix!x'y'z'0=xyz1100001000010txtytz1Translate(c,0,0)xypp'cx'y'z'15MIT EECS 6.837, Durand and CutlerScale (sx, sy, sz)• Isotropic (uniform) scaling: sx = sy = szx'y'z'1=xyz1sx0000sy0000sz00001Scale(s,s,s)xpp'qq'yMIT EECS 6.837, Durand and CutlerRotation• About z axisx'y'z'1=xyz1cos θsin θ00-sin θcos θ0000100001ZRotate(θ)xyzpp'θMIT EECS 6.837, Durand and CutlerRotation• About x axis:• About y axis:x'y'z'1=xyz10cos θsin θ00-sin θcos θ010000001x'y'z'1=xyz1cos θ0-sin θ0sin θ0cos θ001100001MIT EECS 6.837, Durand and CutlerRotation• About (kx, ky, kz), a unit vector on an arbitrary axis(Rodrigues Formula)x'y'z'1=xyz1kxkx(1-c)+ckykx(1-c)+kzskzkx(1-c)-kys00001kzkx(1-c)-kzskzkx(1-c)+ckzkx(1-c)-kxs0kxkz(1-c)+kyskykz(1-c)-kxskzkz(1-c)+c0where c = cos θ & s = sin θRotate(k, θ)xyzθkMIT EECS 6.837, Durand and CutlerOutline• Assignment 0 Recap• Intro to Transformations• Classes of Transformations• Representing Transformations• Combining Transformations• Change of Orthonormal BasisMIT EECS 6.837, Durand and CutlerHow are transforms combined?(0,0)(1,1)(2,2)(0,0)(5,3)(3,1)Scale(2,2) Translate(3,1)TS =200200100131200231=Scale then TranslateUse matrix multiplication: p' = T ( S p ) = TS pCaution: matrix multiplication is NOT commutative!001 001 0016MIT EECS 6.837, Durand and CutlerNon-commutative CompositionScale then Translate: p' = T ( S p ) = TS pTranslate then Scale: p' = S ( T p ) = ST p(0,0)(1,1)(4,2)(3,1)(8,4)(6,2)(0,0)(1,1)(2,2)(0,0)(5,3)(3,1)Scale(2,2) Translate(3,1)Translate(3,1) Scale(2,2)MIT EECS 6.837, Durand and CutlerTS =200020001100010311ST =200200100131Non-commutative CompositionScale then Translate: p' = T ( S p ) = TS p200020311200262==Translate then Scale: p' = S ( T p ) = ST p001001 001MIT EECS 6.837, Durand and CutlerOutline• Assignment 0 Recap• Intro to Transformations•


View Full Document

MIT 6 837 - 04_transformations

Documents in this Course
Shadows

Shadows

64 pages

Animation

Animation

37 pages

Radiosity

Radiosity

25 pages

Color

Color

86 pages

InterArch

InterArch

14 pages

Color

Color

15 pages

Animation

Animation

61 pages

Luxo Jr

Luxo Jr

14 pages

Animation

Animation

52 pages

Radiosity

Radiosity

37 pages

Load more
Download 04_transformations
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view 04_transformations and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view 04_transformations 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?