Goals
- Understand homogeneous coordinates
- Understand and apply the basic matrix transformations: translation, scale, rotation
- Understand how to use transformations in OpenGL to place objects in the World Coordinate System.
Resources
- Our textbook covers transformations extensively in Chapter 3
Directions
- Download and run the Modeling Code (on Fileshare, in Lab06-modeling). You should see an image of three shapes, which you can rotate as before:The code builds on the previous Cube project by including other shapes and moving some of the code into methods to improve the readability of the code. Note, each shape has a wire frame added so that one can see the form (until we add lighting, the edges are hard to see). In this lab, you are to focus on display method.
- In class, we will go over how the perspective and model view matrices work. Practice modifying the transformations so that the shapes are oriented differently relative to each other.
- Once you are comfortable with the way the transformations work, design and build an object (e.g. car, robot, house, etc) constructed by transforming and composing the primitive shapes (disk, cube, cylinder). Feel free to add additional primitive shapes, e.g. a cone is easy to add since it is identical to the disk but with the center raised. Your object should make use of the transformations in a non-trivial way.Once you have modeled the object, populate your scene with multiple copies!
by noon Thurs, Week 7, demonstrate your program in lab and submit your code (to Fileshare).