

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Professor: Jacobs; Class: Computer Graphics; Subject: Computer Science; University: University of Maryland; Term: Unknown 1989;
Typology: Assignments
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Problem Set 1 CMSC 427 Distributed Tuesday, February 8, 2005 Due: Tuesday, February 22, 2005
Programming
Hint: There are a number of reasonable ways to do this. One is to set up a new coordinate system when the right mouse is clicked, and then as it moves, determine its position relative to this coordinate system.
3D Motion: We are giving you skeleton code that will display a rectanguloid on the screen. You will enhance this code to add more rectanguloids, to change the type of projection, and to allow yourself to navigate about the scene. Note that included in the code that we give you is a file vector3.cpp that contains many useful functions for vectors, including functions to perform rotations.
of your controls. Horizontal mouse motions should continue to cause you to rotate about the Up axis. Holding a mouse button down should cause you to move forward or backward in the direction that you are currently facing.
Pencil and Paper. In the following problems we will ask you to provide some transformation matrices. It is fine to leave your final answer in the form of the product of several matrices; you don’t need to multiply these out.
1. 2D Rotation: 10 points. - Write down a matrix that will have the effect of rotating points about the origin counterclockwise by 30 degrees. o Provide a matrix that we can apply to points that are written in homogenous coordinates so that they rotate by 30 degrees and then translate by (3,7). o Provide a matrix that will rotate all points by 30 degrees about the point (3,7). That is, for example, this matrix should leave the point (3,7) right where it is. 2. 3D Rotation: 10 points. o Provide a matrix that will rotate points about the y axis by 30 degrees (do not worry about whether it is clockwise or counterclockwise, either way is acceptable). o Provide a matrix that will rotate the point (1,1,1) so that it now lies on the z axis. o Provide a matrix that will rotate points by 30 degrees about the direction (1,1,1). For example, for any value of a this rotation should leave any point ( a,a,a) unchanged. o Provide a matrix that will rotate by 30 degrees points about an axis in the direction (1,1,1) that goes through the point (6,2,4). You should be able to apply this matrix to points written in homogenous coordinates. For example, this matrix should leave the point (6,2,4) unchanged, and also points (7,3,5), (8,4,6), ….