Lab 02: Sep 18, 2018

Overview

Today's lab is to get you used to controlling transformations using OpenGL. We will

We are control the camera properties by modifying the values in gluLookAt.

We are to control the transformation of the teapot by transforming it using glRotate.

Task

Your task is to try to implement a very basic animation by modifying the transformation properties of the camera and the teapot over time. The most basic way to do this is to store a single animation parameter for each and use that as input to the transformation functions.

In the code provided, there are two static variables that increase in value over time: gsCameraAccum, gsTeapotAccum.
Try using the gsTeapotAccum as the y-value input for glRotate. eg. glRotatef( gsTeapotAccum, 0.0f, 1.0f, 0.0f );
Try moving the camera (via gluLookAt) by providing gsCameraAccum somehow. hint. You might need a repeating function (like sin or cos) to keep the camera from "running away".

You are free to modify (add to) the lab02.cpp or makefile as you wish.

Code Files

Lab2.cpp
makefile