Assignment 3 - Intro. to OpenGL and the Arcball
Due Wednesday Oct. 30, 2019 at 3:00 PM
Overview
In this assignment, you will recreate the 3D shaded surface renderer from Assignment 2 as an OpenGL C++ program that lets you interact with rendered scenes using the mouse. The assignment is meant to act as an introduction to writing graphics programs using OpenGL and to the commonly used Arcball mechanism for rotating scenes with the mouse. Quaternions are also covered in this assignment as a way to represent rotations for the Arcball.
Before you begin, you may want to review the assignment material with these lecture notes. The files for this assignment can be downloaded here. More in-depth details for the assignment will be given in the sections below.
Your Assignment
Your task is to write a program in C++ that takes as input a file with the same scene format from Assignment 2 and renders the specified scene in an OpenGL display window (with desired and resolutions). The program should also allow the user to intuitively rotate the scene with an Arcball mouse UI.
The input of your program should be read from standard input as so:
xres and yres are integers that specify the and resolutions of the OpenGL display window. Unlike in Assignment 2, there is no “mode” argument in this assignment because OpenGL can only render using Gouraud shading. In order to render using Phong shading, we need to use the OpenGL Shading Language (or GLSL for short), which we defer to a later assignment. For now, we are just working with basic OpenGL.
Within the hw3 folder is an OpenGL demo program that is meant to serve as a template for your own OpenGL program. We recommend making use of the demo’s source code and comments and its Makefile as references for when you are writing your own program.
There are two main parts to this assignment:
Please do your work for this assignment in the hw3 folder of hw3.zip.
What to Submit
Before submitting, please comment your code clearly and appropriately, making sure to give details regarding any non-trivial parts of your program.
Submit a .zip or .tar.gz file containing all the files that we would need to compile, run, and test your program. In addition, please submit in the .zip or .tar.gz a README with instructions on how to compile and execute your program as well as any comments and information that you would like us to know.
We ask that you name your .zip or .tar.gz file lastname_firstname_hw3.zip or lastname_firstname_hw3.tar.gz respectively, where you replace the “firstname” and “lastname” fields with your actual first and last name.
Please submit your zip or tar.gz to moodle in the area for Assignment 3.
Written by Kevin (Kevli) Li (Class of 2016).
Links: Home Assignments Contacts Policies Resources