
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
Assignment 1 for the introduction to computer graphics class (22c:151) at an unspecified university. Students are required to write, compile, and run simple opengl and glut programs, output images, and demonstrate their ability to post images online. The assignment includes four problems: explaining the reason for taking the class, writing a function to output ascii ppm files, creating a basic opengl/glut program, and setting up a webpage to display the images. Students must also convert ppm images to viewable formats for the web.
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

Goal: Make sure you can write, compile, and run simple programs using OpenGL and GLUT. Provide some infras- tructure so you can output images, and demonstrate you can post them online.
Problem 1: (5 points) Tell me why you decided to take this class, what you hope to learn, and if there are any graphics topics, in particular, that you would like to learn more about.
Problem 2: (5 points) Write a function which outputs ASCII PPM files. Demonstrate it works by writing a program which outputs a 512 × 512 image containing random noise (call drand48() or some similar function). To make sure the orientation of your PPM images is correct, make the top-most row of pixels red and the left-most column blue instead of random.
Problem 3: (5 points) Write a very basic OpenGL/GLUT program. This should open a 512 × 512 window (the window title should include your name). Include a GLUT mouse callback which prints a message to standard output everytime a mouse event occurs. Take a screen capture to show your program in action (try using the “PrntScrn” button in Windows or xv under Linux). For this problem, you may use the code on p. 18-19 of the OpenGL Programming Guide. Note you will need to modify it slightly to satisfy the problem requirements.
Problem 4: (5 points) Set up a web page containing your images from Problems 2 and 3. Send me an e-mail with your name and a link to your webpage. Images from future assignments should be posted on the same page (or a linked page). If you do not want a link from the class webpage to your results page, please let me know. For information about how to setup a webpage, see: http://www.divms.uiowa.edu/local/create-personal-pages.html. Note: PPM images are not readable by most web browsers. Please convert your images to a viewable format, such as .GIF, .BMP, or .PNG. GIF images are preffered. You can use programs such as GIMP, xv, or Paintshop Pro to convert images. Photoshop does not usually read PPM files, unfortunately.