CMP 161 -- Programming Assignment 3
Due date:
10:00am, TUESDAY, 2/19/2002
Objectives:
Scalar visualization with contour lines and pseudo-coloring.
To Do:
-
Write a program that allows users to visualize 2D scalar data
using a color map and with contour lines.
Variations and additional features are listed below.
For your input,
you can pretty much use any 2D scalar data
e.g. any image, or the following
terrain (actually bathymetry) data
.
As usual, you can break this problem down into different stages.
Here's some suggestions:
-
Display the 2D array with each scalar value mapped to a color.
Allow the user to either load different pre-defined color maps,
or interactively modify the color map.
-
Implement marching squares (page 160 of text ) to extract the contous
of a given value.
Allow multiple contour values to be extracted.
Display these contour lines on the 2D plane.
-
Display the 2D array as a height field (also referred to as 2.5D
displacement map).
Render the height field using the current color map.
-
Overlay the contour lines on the displacement map.
-
You can meet the requirements of this program in a number of ways:
-
Write an OpenGL + fltk code.
-
Write an fltk + Vtk code.
-
Create an OpenDX network.
-
This program is easier than the first two.
However, I strongly suggest that you get started
on it as soon as possible.
Grading.
This program nominally accounts for 6% of your final grade.
We must be able to compile/test your code.
Make sure that
code and accompanying make/project files, etc. must be tested for
successful compilation at least on the suns in the lab. For PC's, we will be
using Visual C++. Also be sure to include a README in your submission as to
which platform to use.
By the way,
if you're your development on PC's,
you should be able to recompile your fltk/opengl code
on the suns
with little or no modifications to your source.
Programs turned in at least a full day early will earn 1% bonus credit. Late
programs will be charged 1% late points. In addition, late programs will not
be accepted 24 hours past due date. Late programs and reports will not be
accepted for the final project. 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.
A rough guide to the grading of this program is
here
.
Submission.
Submission must be done using the submit or xsubmit utility from CATS.
Run "quickhelp submit" on a CATS machine to find out more info.
- To submit use: submit cmps161-ap.w02 prog3 files
- To verify submission use: peek cmps161-ap.w02 prog3
These commands should work from any cats machine, but if there is a
problem try from teach.ic. Create and submit a subdirectory called
"prog3". It should contain all the files you have in make your
program compile/run.
Last modified
Tuesday, 22-Jan-2019 09:42:15 PST.