This assignment builds on the carousel of Assignment 2. You will need to implement several instances of carousels (at least five.) Add a ground surface (flat) on which all of the carousels are located. This instancing should be done using one definition for the carousel model developed in Assignment 2.
Rather than viewing the carousels from several fixed points, or a rotating point, implement a navigation system that allows you to walk through the scene. The navigation should set the eyepoint at a fixed distance above the ground. Navigation should utilize the left and right arrow keys to look to the right and the left. The up and down arrows allow the viewer to look up and down. Pressing the "f" key should move the view point forward in the direction that the viewer is looking, and pressing the "b" key should move the viewer back. When moving forward or backward, the viewer should remain a fixed distance from the ground. This navigation scheme should be based upon the "inside-out" viewing paradigm explained in class. See charts.
Implement lighting in the scene. There should be two light sources: one which is a point spotlight lightsource located at the viewer's position and pointing in the direction that the viewer is looking. The other will be a simple point source used to simulate the sun, and will rise on one side of the scene, move over the scene, and set on the opposite side. At "noon" the sun light should be directly above the scene. It can follow a circular path, and pass under the scene during "night." This rotation of the light source should take several seconds. Both lights should be capable of being turned on or off independently using a pop up menu. Both lights should be white in color.
The coloring of the carousels must be changed to material specifications. For each carousel post, the material color must now be the same on all sides and should be specular grey. The material color of the roof should be blue and yellow as before and should be rough (diffuse). Remember that to use lighting you must define normals to all polygons.
The ground should be covered with a texture that looks like grass. The floor of the carousel should be covered with a texture that looks like boards.
For 5 points extra credit, add "horses" that go up and down as the carousel rotates. The horses should make two complete up and down cycles for one rotation. You don't need to generate a complex model for the horses...a simple extrusion of a horse outline will do.
Because of its comparative difficulty, Assignment 3 will be worth 20 points.
Submission of this assignment should be in the form of well-commented source code, preferably written in ANSI C. C++ is also acceptable. Well-commented means that I want a comment for every significant step, even if it consists of only one line of code.
For these simple programs, I prefer that you simply email me the source code so that I can build the program on my system. Since these programming examples will be relatively short, I prefer that you include all source code in a single file for ease of compilation. There is no need to submit executable code, or any other files generated by the development environment.