CMPS 160 -- Prog 1

Early if time stamp is before midnight Oct 14, 2017.
On time if time stamp is before midnight Oct 15, 2017.
Late submissions will not be accepted/graded.

Objectives:

Create a 3D model and render it in wireframe. Provide toggle to display (or not display) the surface normals. Interface for reading and saving to file.

Description:

For this assignment you will provide the user with the functionality to create and render a generalized cylinder (GC) object. In addition, also provide the user with option to save the GC to a file or load a GC from a file. Your program just needs to handle a single GC at any time. Also, the GC surfaces are thin and do not have any thickness.

When your program is executed, the user will have the option of creating a GC or reading in a GC. If the user decides to read in a GC, s/he will be prompted for the filename of the GC. The file is read and GC is displayed. If the user decides to create a GC, s/he will be prompted for the filename to save the GC. The user is then presented with the interface for creating a GC, which is similar to the Lab1 assignment (details below). After the GC is created and saved, it is also displayed as a wireframe.

After a GC is displayed, the user again has an option of creating another GC or reading in a different GC to be displayed. This repeats until the user quits (by not doing anything further) i.e. the browser will display the last GC. Only one GC is displayed at a time.

Details:

Resource:

Here are some sample GC images: 1 2 3 4 5 6 7

Check out the parser in OBJViewer code from the Matsuda-Lea book.

Here is a link to where you can find the file read and save utility functions.

How to create a toggle button

Different drawing modes

Grading:

Submission:

See course overview for instructions on what to submit and what not to submit.

Put materials in a folder named prog1 and zip it up. Submission must be done using the "submit" command from unix.ucsc.edu


Last modified Tuesday, 22-Jan-2019 09:42:16 PST.