The assignment is due at midnight on October 30th. You will need to use the CADE handin functionality to turn in your assignment. The class account is "cs5630".
The purpose of this assignment is to make sure you understand (and experiment with) the basic concepts involved in the visualization of 2D scalar and vector fields. As you work on the assignment, we encourage highly you to read the available documentation on both python and VTK. Some of the problems will require you to use VTK modules you might not have previously seen. These are indicated in the problems.
Some of the fields in this assignment are such that most of the points in the field have values in a small region of the range. Because of this, a linear path through the color space might be inappropriate. You might consider using vtkColorTransferFunction for more effective results.
When generating visualizations that overlay multiple actors, it will be convenient to displace some of them along the Z direction so they "stack" the right way. Use the "AddPosition" method on the vtkActor module to do that.
Problem 1: Basic scalar field techniques
In this problem, you will design colormaps for a dataset. In particular, you will design two different colormaps for two different tasks. The dataset you are given is a digital elevation map (DEM) of Honolulu on Oahu, HI. The elevations are given in meters, and the range of the data is [-2.0, 956.0]. Look up Honolulu on maps.google.com (or your favorite map application) to give you context for this problem: Google maps link to Honolulu
a. Apply the colormap design principles described in class to create a visualization where it is easy to tell which of two points are higher. Describe in the notes why you chose this colormap.
b. Apply the colormap design principles described in class to create a visualization where it is easy to tell the height of any given point. Describe in the notes why you chose this colormap.
c. Generate a visualization that is suited to both previous tasks. Describe in the notes why you chose this colormap.
d. Generate colormaps that give a good visualization of the low areas (ie: first 5 or 10 meters) of the DEM. Potentially relevant modules: vtkColorTransferFunction.
Problem 2: Differential visualization in scalar fields
Using the same dataset as in the previous problem, in this problem you will design and implement visualizations that answer the following question: How steep are the mountains in Pearl Harbor, relative to the shore?
a. Generate a colormap that portrays the mountain steepness directly. Potentially relevant modules: vtkImageGradientMagnitude,
b. Generate a visualization based on your solution to 1c. that portrays the mountain steepness without sacrificing the height information. Potentially relevant modules: vtkContourFilter, vtkWarpVector.
c. The Pearl Harbor DEM is an example of a dataset where the natural "initial" value is actually in the middle of the scalar range. Based on 2b, design a visualization where there is a clear distinction between the two ends of the scalar range, without sacrificing the existing information. Hints: the vtkProperty module has a method called SetLineWidth that you can use to make a set of lines stand out.
d. Generate another visualization for problem 2b that uses a different technique.
Problem 3: Basic vector field techniques
In this problem, you will use basic vector field visualization techniques to investigate a 2D vector field.
Hints: vector_field_direction.vtk is the vector field computed by normalizing vector_field.vtk. Using this as the source for streamlines will result in much more efficient visualizations (can you see why?)
a. Create a visualization that uses arrow glyphs to effectively portray the overall shape of the 2D vector field.
b. Build on 3a. by placing a set of streamlines in places that help portray more information about the visualization. Hint: depending on how observant you are, there will be either four or six "features" you should be able to pick out with streamlines (Finding four is fine, six is extra fine).
c. Generate a visualization of the gradients of the Honolulu DEM. Use any technique you might find appropriate. Will there ever be a streamline that connects to itself? Why (or why not)? Answer these questions in the notes for your visualization. Use the PythonSource module from the "Gradient Generation" visualization in the vistrail we have provided you to create a gradient vector field from the honolulu dataset. It's OK to copy and paste this module.