Assignment: Hello graphics world

Assignment 1

"Hello graphics world": basic OpenGL, rendering and IO

Due: by class time September 18

In this assignment you will familiarize yourself with (very) basic rendering and IO in OpenGL.

The grading of this assignment will be:
  • 10% Properly turned in assignment
  • 35% Write a letter in 2D using individual pixels
  • 10% Switch to 3D on space bar
  • 35% Render a triangle using Gouraud shading and Phong lighting
  • 10% Rotate that triangle around its center with arrow keys

Part 1: write a letter using individual pixels
Set the graphics environment to use a 2D coordinate system that has the same dimensions as your interface window. Address individual pixels in that window by rendering vertices at integer coordinates. Write a letter by coloring pixels in this fashion.

Part 2: switch to 3D on space bar
When the user presses the space bar, change the projection matrix to a 3D perspective viewing system.

Part 3: render a triangle using Gouraud shading and Phong lighting
Use OpenGL's immediate mode and default lighting setup to render any triangle with gradual Gouraud color change across it.

Part 4: Rotate that triangle around its center using arrow keys
Change OpenGL's view transform matrix to make the triangle spin around its center when the user presses the arrow key. The triangle should spin one way with the left arrow, the other way with the right arrow.

Use this link to turn in a single zip file containing all files needed to compile and run your program. Include an executable (or ideally a setup file). If we cannot execute or compile your program easily, you will lose some "properly turned in" credit.