This was a group assignment and the report represents joint efforts of
Keshav Srinivasan (140260001) and Kumar Ayush (140260016)

This report describes the key features of our implementation of the descirbed features

The textures

We have used the code sent by the Course Instructor to load a texture in OpenGL and simply used TexCoord2d to specify texture co-ordinates before every point in our construction. There is a wooden texture for the floor, rough plaster for walls and roof, and an arbitrary color texture applied to the bicycle frame. The tires also have a texture. The only challenge here was figuring out the co-ordinates as we had not used glut functions to draw cylinders and torii but constructed them using triangle strips from scratch in the previous part

The Lights

There are three lights. LIGHT0 is just hovering midair in the room providing ambient lighting. LIGHT1 is lighting on the wall which can be turned on or off using L. The third light LIGHT2 is the cycle's headlight, which is off by default but can be toggled with H

The Cameras

There is a casual side-view camera, which is set by default. There are three other cameras which can be toggled in and out. You have to come out of a camera mode before you enter another. '1' gives you the rider mode. We have made it such that it also rotates with the handle. '2' gives a Third Person view of the cycle which also moves with the cycle but does not rotate with the handle. '3' is just a camera on the wall, the creepy stalker watches everything from it.

Making the spotlight come to life

We made our walls out of 100x100 rectangles, 2x100x100 triangles per wall in total to render a good spotlight with Gourad shading. This took more time than expected as we were stupid at one point to assign 1/2 to a float variable instead of 1/2.0; :P

Known Problem

Whenever we change camera, the headlight vanishes until you press any key.

Commands you should use while running the program

  • Use H for Headlight Toggle
  • Use L for Tubelight Toggle
  • Use left and right for rotating the handle
  • Use up and down arrow keys to move the cycle
  • Use 1 for Rider Cam toggle
  • Use 2 for Third Person toggle
  • Use 3 for Wall Cam toggle

Some Images

Fig 1. Room Casual

Fig 2. Room Dark, Headlight On

Fig 3. In Motion