CMP 161 -- Programming Assignment 2
Due date:
Midnight, FRI, 2/11/2011
Objectives:
Learn about a flow visualization technique called line
integral convolution (LIC) and use it in an artistic setting.
To Do:
-
This assignment has been broken down into several parts to
facilitate program development.
-
Part 1: Interactive Vector Field Creation (15 %)
In this phase, you will allow the user to interactively specify a few
vectors in a flow field by clicking and dragging.
The location of the left mouse button down indicates the origin of
a vector, and the location of the left mouse button up position
indicates the direction and magnitude of the vector.
The magnitude is specified based on the Euclidean distance
between the left mouse button up and down positions in pixel coordinates.
The user can place as many of these vectors as they want over a 2D field.
The resolution of the 2D field must be at least 100 pixels x 100 pixels,
and can be pre-determined for this phase of your assignment.
The flow field is obtained by using Shepard's interpolation
with inverse distance square weighting.
-
Part 2: White Noise Image (5 %)
Create a white noise (salt-and-pepper) image of the same
dimension as the flow field.
Show a side-by-side image of this image,
and an arrow-plot visualization of your flow field
(you can use the output of paraview for this step).
-
Part 3: LIC Visualization (30 %)
Create a Line Integral Convolution
(LIC)
visualization of the flow field using the noise image as the source
image to smear.
-
Part 4: Artistic LIC (20 %)
Read in a 2D image and store as a 2D array of RGB values.
Modify your flow field so that it has the same resolution as this input image.
Now use this 2D image instead of the white noise as the source image for your
LIC visualization.
-
Part 5: Artistic Brushing (10 %)
Same as previous phase,
but allow the user to see the effect of the flow field
on the image interactively (i.e. after modifying each
user defined vector).
Initially, the flow field is a constant zero field i.e. zero velocity everywhere.
Documentation (20 %)
Each and every assignment should have proper documentation.
Documentation includes:
(i) code documentation,
(ii) user documentation,
(iii) technical writeup of the assignment.
The 1st two items are self-explanatory and you should have experience
with these from previous classes.
The 3rd item is a short technical paper, about 2-4 pages long,
that describes the problem, your approach, and results.
Include sufficient information so that someone else can reproduce
your results e.g. information about integration method used,
information about filter kernel used, etc.
Be sure to include images in your technical report also.
Items To Submit:
-
A file called prog2.html
with description and images of your project.
Include your name and login id near the top of the page.
Make sure your links are all local
and relative to your submit directory.
Call the submit directory prog2.
-
Include results (images) showing at least the following:
white noise image, arrow plot of vector field, 2D image that you read in
and the corresponding flow field as well as the resulting artistic LIC result.
For the last phase, show a sequence of image pairs
(flow field and artistic LIC).
One of these images should be named "thumb.gif" and will be used as
a thumbnail to index into your submission.
-
Include links to:
- (i) source code (include a README file for platform specific details),
- (ii) user documentation,
- (iii) technical writeup.
Again, note that all these should be local e.g. relative to your
submit directory.
Grading:
This program nominally accounts for 5% of your final grade.
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.
Submission:
Submission must be done using
the submit utility from CATS (e.g. unix.ic.ucsc.edu).
-
submit cmps161-ap.w11 prog2 prog2.tar, or
-
submit cmps161-ap.w11 prog2 prog2.zip,
Last modified
Tuesday, 22-Jan-2019 09:42:15 PST.