CMP 161 -- Programming Assignment 1

Due date:
Midnight, FRI, 2/17/2012

Objectives:

Learn about streamlines, illuminated streamlines, and rakes for flow visualization.

Required: Streamlines

For this part of your assignment, write a program that generates streamline visualization of a 3D vector field. The data set you will be using is from Hurrican Isabel . For this assignment, you will focus on a single time step (05), and the three velocity component fields: U, V, W. So, the relevant files are: Uf05.bin.gz, Vf05.bin.gz, and Wf05.bin.gz. These can be found in here .

Since the spatial resolution of this data is 500 x 500 x 100, there will be too many streamlines if you seeded every point. Instead, seed and generate only 1000 streamlines. Use a regular seeding strategy of 1 streamline every 50 grid points in X and Y, and 1 streamline every 10 grid points in Z.

For each streamline, integrate forwards and backwards using 4th order Runge Kutta . Stop integration when: (a) the streamline has exit the boundary of the data set, or (b) is not making any further progress e.g. when velocity is near 0, or (c) has reached a maximum number of integrations steps e.g. 100 in each direction.

Note: you will need to implement trilinear interpolation to find velocity values that are not at grid points.

Render each streamline as a polyline, colored by the velocity magnitude. First, find the range of velocity magnitude values for the time 05. That is, find the minimum and maximum velocity magnitudes over each grid point of this data set. Second, generate a color map (standard rainbow map is fine) over this range of magnitude values.

Allow the user to change the camera viewpoint (see program 0).

Bonus Option 1 (5%): Illuminated Streamlines

First, allow the user to vary the density of streamline seeding. Secondly, implement illuminated streamlines and add a toggle to turn this feature on and off. Compare your results with and without illuminated streamlines as one varies the viewing angle. Include these additional images in your writeup.

Bonus Option 2 (5%): Interactive Streamlines with Rakes

The basic requirements and those in option 1 require that the streamlines be pre-calculated. With rakes, you will interactively manipulate a rake and generate the streamlines on the fly.

A rake is represented by a short line segment that the user can pick and manipulate (translate and rotate) in space (see program 0). There are 10 seeding positions spread out evenly along the rake. If the rake has moved since its previous position, then the old streamlines are discarded, and 10 new ones are generated. Include additional images showing your rake in action in your writeup.

Documentation

Each and every assignment should have proper documentation. Documentation includes: (i) code documentation (include info on platforms and how to compile your code), (ii) user documentation (i.e. gui explanation and how to run your code), (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 (about 1000-2000 words), that describes the problem, your approach, and results. Be sure to include at least 1 image. Include some discussion about challenges and other ideas/comments you have about the problem. This technical paper can either be in pdf or doc. See this example.

Items To Submit:

Grading:

This program nominally accounts for 10% 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:16 PST.