Assignment 4

This assignment builds on the carousel visualization of Assignment 3.

This assignment requires that you implement two glut windows.  One window will contain an orthographic (parallel) projection and one a perspective projection.  In the orthographic window, you will present a plan view looking straight down on the scene.  This window will be used interactively to construct the scene, and will show a rectangle representing the ground plane on which the carousels will be placed.

This construction will be done by selecting the characteristics of the desired carousel from a pop-up menu hierarchy attached to the right mouse button.  Once the desired carousel characteristics have been selected, the user then positions the mouse at the desired location within the ground plane representation and clicks the left mouse button.  A carousel with the desired characteristics will be positioned at that location.  To indicate the location of this carousel, a hexagonal outline, in contrasting color and equivalent in size to the base of the carousel will be displayed at the selected location in the orthographic windown.  The outlines do not have to be rotating.

The user will then be able to build up the scene by adding additional carousels at different locations on the ground plane.  This will require the use of a data structure to store the scene, much as was done in Assignment 1.  It will be necessary to come up with a transformation to convert window/mouse coordinates to the coordinates of the modeled scene.

The perspective projection window will continually provide a perspective visualization of the scene under construction, just as in Assignment 3.  Lighting requirements for the scene will be the same as for Assignment 3, with the same options to turn the lights on and off.  By making the perspective view window the active window, the user will be able to navigate within the scene just as in Assignment 3 using the arrow keys etc.  Add the capability to introduce fog into the view in the perspective window by menu selection in the perspective window.

Options for the construction of the carousels will include a selection of material colors, as well as a selection from at least two different textures.  Options will also include the direction in which the carousel is rotating (clockwise or counter-clockwise).

This assignment is worth 25 points.

Extra credit (5 points):

In the parallel projection window, display a small circle which represents a top-down view of the current location of the viewer.  Display two dashed lines which represent the cone of the viewers current perspective view (i.e. the angle should represent the total horizontal angle of the current perspective view.)   These should be drawn over the other features in the window, in a contrasting color.


Submittal

Assignment 4 is due May 6, 2011. Assignments that are one week late will receive about two thirds credit. Assignments that are two weeks late will receive about one half credit.

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.

Academic Honesty

I expect all code submitted by students in this course to be their own. In exceptional circumstances, it is permissible to borrow appropriate small sections of code from other authors. Whenever this is done, the student must provide appropriate reference. Reference must include the author of the code and a location that I can use to check the source. References should take the form of comments within the code  that delineate exactly what lines were used.  In other words, there should be a comment at the beginning and end of the borrowed code.  Submissions that include copied but unreferenced code will receive zero credit .


Return to 91.546 Home Page