CMPS 160 -- Programming Assignment 1 (basic graphics)
Due date:
12 midnight, Friday, 4/19/12
Objectives:
This assignment covers the following components:
(i) opening a graphics window,
(ii) basic line drawing, and
(iii) basic user interface.
Description:
Implement a program that creates and renders a fractal terrain.
The
fractal terrain actually starts off as a simple triangle.
It is then subdivided by adding a new point along
the midpoint of each edge. This new point is then displaced
vertically by some random amount. This turns the initial
triangle into 4 triangles. The process is repeated recursively
for the desired level of complexity.
Requirements:
-
30% of functionality:
The starter code (see
lab1
and
lab2
)
will create and display a level 0 terrain.
Here, you will add some GUI and OpenGL code to allow the
user to change the color used to render the terrain.
Provide options for switching amongst three colors of your choosing.
The background color is set to white.
-
70% of functionality:
Next, prompt the user to enter the desired level of recursion.
Level 1, will turn the initial triangle into 4 triangles;
level 2, will turn the initial triangle into 16 triangles; etc.
Resource:
Here's at least one site where you can play with some parameters
for specifying the fractal terrain. Note that this uses a slightly
different algorithm than what's required in this assignment.
This
demo uses
webgl.
And here's a video clip that shows different
camera views
of a previously generated terrain.
We will be covering camera controls later in the quarter.
Grading:
This program nominally accounts for 8% of your final grade. We must
be able to compile/test your code. Make sure that the code and accompanying
make/project files, etc. are tested for successful compilation at least on
the PCs in the lab.
Also be sure to include the statically linked executable and a README file
in your submission as to which platform to use.
Programs turned in at least a full day early will earn 1% bonus credit. Late
programs will be charged a 1% late point. In addition, late programs will not
be accepted 24 hours past due date.
The bonus credits may be accumulated up to a
total of 50% toward program and final project credits. Programs are graded 80%
for functionality and correctness and 20% for style, readability,
documentation/writeup, and efficiency. Additional points may also be earned
for extra features.
Submission:
Submission must be done using the "submit" command from CATS.
- submit cmps160-ap.s13 prog1 prog1.tar, or
- submit cmps160-ap.s13 prog1 prog1.zip
This command should work from unix.ic.ucsc.edu.
Create and submit a subdirectory called prog1.
It should contain a statically linked executable and
all the files you have to make your program compile/run.
Tar or zip up prog1 before submitting.
Last modified
Wednesday, 03-Apr-2013 11:06:09 PDT.