
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Due: Thursday September 16th at 12:01am (Wednesday at midnight)
Goal: Write a program that scan converts triangles and outputs them to a PPM file. Write a second program that draws the same triangles using OpenGL and GLUT.
Problem 1 (10 points): Write a program that draws the following triangles into a 512 × 512 buffer (in memory). Output the result to a PPM file. The background should be black (i.e., RGB = [0,0,0]). Use a utility program to convert the PPM file to GIF, PNG or BMP to display on your web page (use ppmtogif , ppmtobmp , or xv on Linux systems or GIMP on Windows systems).
Problem 2 (10 points): Write an OpenGL/GLUT program that draws the same triangles (and lines) as in Problem 1, using the same colors. Capture the result in an image and post it on your web page. Make sure to label your images, so I know which is from Problem 1 and which is from Problem 2.
NOTE: Feel free to combine these problems into a single program, with an GLUT keyboard callback to switch from OpenGL rendering to your scan conversion (as per the extra credit from Homework 2), making sure to label which approach is currently being displayed.
Problem 3 (0 points): How long did this assignment take you? (E-mail answers to [email protected]) Answering is optional, but will help me gauge the class — which should help you in the long run.