DOC PREVIEW
Columbia COMS 4160 - Transformations

This preview shows page 1-2-24-25 out of 25 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 25 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 25 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 25 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 25 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 25 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Computer Graphics (Fall 2005)To DoCourse OutlineSlide 4MotivationSlide 6General IdeaOutline(Nonuniform) ScaleShearRotationsSlide 12Composing TransformsE.g. Composing rotations, scalesInverting Composite TransformsSlide 16Slide 17Rotations in 3DGeometric Interpretation 3D RotationsSlide 20Non-CommutativityArbitrary rotation formulaAxis-Angle formulaAxis-Angle: Putting it togetherSlide 25Computer Graphics (Fall 2005)Computer Graphics (Fall 2005)COMS 4160, Lecture 3: Transformations 1http://www.cs.columbia.edu/~cs4160To DoTo DoStart (thinking about) assignment 1Much of information you need is in this lecture (slides)Ask TA NOW if compilation problems, visual C++ etc. Not that much coding [solution is approx. 20 lines, but you may need more to implement basic matrix/vector math], but some thinking and debugging likely involvedSpecifics of HW 1Axis-angle rotation and gluLookAt most useful (essential?). These are not covered in text (look at slides).You probably only need final results, but try understanding derivations. Problems in text help understanding material. Usually, we have review sessions per unit, but this one before midtermCourse OutlineCourse Outline3D Graphics Pipeline Rendering(Creating, shading images from geometry, lighting, materials) Modeling(Creating 3D Geometry)Course OutlineCourse Outline3D Graphics Pipeline Rendering(Creating, shading images from geometry, lighting, materials) Modeling(Creating 3D Geometry)Unit 1: TransformationsResizing and placing objects in theworld. Creating perspective images.Weeks 1 and 2 simplestGlut.exeAss 1 due Sep 22 (Demo)MotivationMotivationMany different coordinate systems in graphicsWorld, model, body, arms, …To relate them, we must transform between themAlso, for modeling objects. I have a teapot, butWant to place it at correct location in the worldWant to view it from different angles (HW 1)Want to scale it to make it bigger or smallerMotivationMotivationMany different coordinate systems in graphicsWorld, model, body, arms, …To relate them, we must transform between themAlso, for modeling objects. I have a teapot, butWant to place it at correct location in the worldWant to view it from different angles (HW 1)Want to scale it to make it bigger or smallerThis unit is about the math for doing all these thingsRepresent transformations using matrices and matrix-vector multiplications. Demo: HW 1, applettransformation_game.jarGeneral IdeaGeneral IdeaObject in model coordinatesTransform into world coordinatesRepresent points on object as vectorsMultiply by matricesDemos with appletChapter 6 in text. We cover most of it essentially as in the book. Worthwhile (but not essential) to read whole chapterOutlineOutline2D transformations: rotation, scale, shearComposing transforms3D rotationsTranslation: Homogeneous Coordinates (next time)Transforming Normals (next time)(Nonuniform) Scale(Nonuniform) Scale11100( , )00xxx yyyssScale s s Sss---� �� �= =� �� �� �� �� �0 00 00 0x xy yz zs x s xs y s ys z s z� �� � � �� �� � � �=� �� � � �� �� � � �� �� � � �transformation_game.jarShearShear11 10 1 0 1a aShear S--� � � �= =� � � �� � � �RotationsRotations2D simple, 3D complicated. [Derivation? Examples?]2D?LinearCommutative' cos sin' sin cosx xy yq qq q-� � � ���=� � � ���� � � ���R(X+Y)=R(X)+R(Y)transformation_game.jarOutlineOutline2D transformations: rotation, scale, shearComposing transforms3D rotationsTranslation: Homogeneous CoordinatesTransforming NormalsComposing TransformsComposing TransformsOften want to combine transformsE.g. first scale by 2, then rotate by 45 degreesAdvantage of matrix formulation: All still a matrixNot commutative!! Order mattersE.g. Composing rotations, scalesE.g. Composing rotations, scales3 2 2 13 1 13 1( ) ( )x Rx x Sxx R Sx RS xx SRx= == =�transformation_game.jarInverting Composite TransformsInverting Composite TransformsSay I want to invert a combination of 3 transformsOption 1: Find composite matrix, invertOption 2: Invert each transform and swap orderObvious from properties of matrices1 2 31 1 1 13 2 11 1 1 13 2 1 1 2 3( ( ) )M M M MM M M MM M M M M M M M- - - -- - - -===transformation_game.jarOutlineOutline2D transformations: rotation, scale, shearComposing transforms3D rotationsTranslation: Homogeneous CoordinatesTransforming NormalsRotationsRotationsReview of 2D caseOrthogonal?, ' cos sin' sin cosx xy yq qq q-� � � ���=� � � ���� � � ���TR R I=Rotations in 3D Rotations in 3D Rotations about coordinate axes simpleAlways linear, orthogonalRows/cols orthonormal TR R I=R(X+Y)=R(X)+R(Y)cos sin 0 1 0 0sin cos 0 0 cos sin0 0 1 0 sin coscos 0 sin0 1 0sin 0 cosz xyR RRq qq q q qq qq qq q-� � � �� � � �= = -� � � �� � � �� � � �� �� �=� �� �-� �Geometric Interpretation 3D RotationsGeometric Interpretation 3D RotationsRows of matrix are 3 unit vectors of new coord frameCan construct rotation matrix from 3 orthonormal vectorsu u uuvw v v v u u uw w wx y zR x y z u x X y Y z Zx y z� �� �= = + +� �� �� �?u u u pv v v pw w w px y z xRp x y z yx y z z� �� �� �� �= =� �� �� �� �� �� �u pv pw p�� �� ��� �� ��� �Geometric Interpretation 3D RotationsGeometric Interpretation 3D RotationsRows of matrix are 3 unit vectors of new coord frameCan construct rotation matrix from 3 orthonormal vectorsEffectively, projections of point into new coord frameNew coord frame uvw taken to cartesian components xyzInverse or transpose takes xyz cartesian to uvwu u u pv v v pw w w px y z x u pRp x y z y v px y z z w p� ��� � � �� �� � � �= = �� �� � � �� � � �� ��� � � �� �Non-CommutativityNon-CommutativityNot Commutative (unlike in 2D)!!Rotate by x, then y is not same as y then xOrder of applying rotations does matterFollows from matrix multiplication not commutativeR1 * R2 is not the same as R2 * R1Demo: HW1, order of right or up will mattersimplestGlut.exeArbitrary rotation formulaArbitrary rotation


View Full Document

Columbia COMS 4160 - Transformations

Download 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 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 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?