HW #2

HW2 is due on March 8th midnight, as announced in class on Feb. 23. Below you'll see the orig. HW and the simplified one.. You can choose to do either, both have the same due date.

Here is the OpenGL-based HW we handed out earlier. This version comes with 15% extra credit.

And now for the newer HW version.. The idea is that you will input to the program a transformations file (samples follow), read a polymesh (using OBJParser), transform vertices, draw lines, write out a single PPM file. The transformation file will contain transformations to apply to the vertices. Use the following transformation files and outputs (of the 'cutcube' object) to check your code. Ignore the X/Y axis plots in the JPEG images below, your PPM image will contain just the mesh wireframe.

The following are snippets of info. related to the transformation file format. 'position' through 'bottom' fields relate to the camera and persp. transformations, while 'translation', 'rotation' and 'scaling' refer to object_to_world space conversions.

Here is some add'l info. on the camera->persp. space transformation. This is the transformation where 3D points become 2D..

In summary, the overall steps are these:

One line summary: read_object (.obj) --> transform --> write_image (.ppm)

Here's the wframe.html page I showed in class.

Here is a bunch of .obj (polymesh) files, here are some more of them! Eg. this is what the 'cow.obj' mesh might look like, for some given transform file: