CMP 161 -- Programming Assignment 1

Due date:
Midnight, FRI, 1/28/2011

Objectives:

Learn about sparse data interpolation, pseudo-coloring, and contouring. There are two components to this assignment. The first involves writing code, while the second involves using a visualization package.

Part 1: Sparse Data Interpolation

For this part of your assignment, write a program that reads in a data file with the following information:

n		// number of data points
v1  x1   y1	// value and xy coordinate of 1st data point
...
vn  xn   yn	// value and xy coordinate of nth data point
xres yres	// desired resolution of the resampled field

Your program should then use these points to obtain a regularly resampled scalar value field using inverse square distance Shepard's interpolation. The spatial dimension of the scalar field should have at least a 10 distance-units border around the bounds of the given data points. The spatial resolution of the resampled field is specified by xres and yres. Your program should output this resampled field into an output file that is readable by paraview. Link to format here.

In addition to the resampled value field, also output a second scalar field with the same spatial resolution. This second field should contain the Euclidean distance to the closest data point.

Part 2: 2D Scalar Field Visualization with Paraview

This part of your assignment involves visualizing the two output scalar fields using paraview. At a minimum, create a heatmap image of the value field, and a contour image of the distance field.

Beyond this basic requirement, explore/experiment with different ways of visualizing these two scalar fields. You may also want to convey both variables in a single image instead of two separate images, for example.

Documentation

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. In this case, you want to talk about Shepard's interpolation, limitations/constraints and/or features of your implementation, specifications/formats of output, how the output where visualized with paraview, any combinations/customizations you used/designed, etc. Be sure to include images in your technical report also.

Items To Submit:

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).

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