SciVisFall2007/Assignment 2

From VistrailsWiki
Jump to navigation Jump to search

The assignment is due at midnight on October 25th. 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 greatly encourage 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.

Submitting your vistrail

You do not need to use assignment2.vt as a starting point for your solution. You are welcome to, but it's not necessary.

Labelling your visualizations

Your visualizations should be labeled "Problem 1a", "Problem 1b", "Problem 1c", "Problem 2a", etc.

General Hints

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.

FAQ

See FAQ here.

Data

All the data you need is available at http://www.sci.utah.edu/~cscheid/scivis_fall07/assignment2/. These are:

  • assignment2.vt Only necessary for grad students. Includes the PythonSource modules necessary for generating gradient, divergence and curl.
  • honolulu.vtk DEM of Honolulu, HI, around Pearl Harbor and Diamond Head Crater.
  • honolulu_small.vtk Downsampled version of above file. You should probably test your visualzations with this file. It is 1/16th of the size of honolulu.vtk, so it will work well on slower machines.
  • vector_field.vtk 2D vector field for Problems 3 and 4.
  • vector_field.vtk Normalized 2D vector field for Problems 3 and 4.

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.

Grads only

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.

Grads only

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.

Extra credit

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

Grads only

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.

Problem 4: Differential information in vector fields

a. Generate a visualization that builds on 3b. and uses the background to portray the magnitude of the vectors in the field. Potentially relevant modules: vtkVectorNorm.

Grads only

b. Generate a visualization that portrays divergence, and one that portrays curl. Choose an appropriate colormap, and justify it in your notes. Use the PythonSource module from the "Divergence Generation" and "Curl Generation" visualizations in the vistrail we have provided you to create divergence and curl fields. It's OK to copy and paste these modules.

Extra credit

Try to generate a visualization that portrays both divergence and curl at the same time. There are (at least) two issues we want you to solve creatively here - occlusion and colormap interference. This is your chance to explore anything you might feel like doing. Here is a set of places to get you started: vtkProbeFilter, opacity values, vtk clipping algorithms, interactive visualizations (look up terminator.vt in the examples) Have fun!