CMPS 160 -- Prog 1

Early if time stamp is before midnight Oct 8, 2016.
On time if time stamp is before midnight Oct 9, 2016.
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 surface-of-revolution (SOR) object. In addition, also provide the user with option to save the SOR to a file or load an SOR from a file. Your program just needs to handle a single SOR at any time. Also, the SOR surfaces are thin and do not have any thickness.

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

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

Details:

Resource:

Here are some sample SOR images.

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.ic.ucsc.edu


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