CS 553 -- Winter Quarter 2009

Project #7: Vector Field Visualization

100 Points

Due: February 13


This page was last updated: January 29, 2009


Requirements:

  1. Put this project number and your name in the title bar.

  2. Create a 3D array of node points, evenly spaced within the range:

    -1.0 <= x,y,z <= 1.0

    The number of divisions you use in this region is up to you. You might want to parametrize this with "#defines" or "const ints".

  3. Compute a 3D vector at each node point according to the following formulas for the X, Y, and Z components of the vector:

    Vx(x,y,z) = y * z * ( y2 + z2 )

    Vy(x,y,z) = x * z * ( x2 + z2 )

    Vz(x,y,z) = x * y * ( x2 + y2 )

    A C routine to do this is:

    void
    Vector( float x, float y, float z,   float *vxp, float *vyp, float *vzp )
    {
    	*vxp = y * z * ( y*y + z*z );
    	*vyp = x * z * ( x*x + z*z );
    	*vzp = x * y * ( x*x + y*y );
    }
    
    So that its calling sequence would be:
    float x, y, z;
    float vx, vy, vz;
    . . .
    Vector( x, y, z,   &vx, &vy, &vz );
    

  4. Show the extent of the volume by drawing the edges of the cube.

  5. Show the field using a vector cloud to represent the vector values at uniformly-distributed points around the volume. Scale the arrows to make the scene as legible as possible.

  6. Color code the vectors according to their length (ie, the speed of the field at that point). The color scale is up to you.

  7. Draw streamlines within the field starting with at least 10 unique points. Use a second-order scheme to draw the streamlines.

  8. Allow the user to move a 3D probe through the volume. Every time the probe moves, the visualization "thing" that is attached to the probe needs to be re-created. How you position the probe in X-Y-Z is up to you.

    (The sample program uses 3 GLUI Translate-XY widgets to allow translation in XY, XZ, and YZ. Spinners would work too.)

  9. Here are the visualization "things" that can be chosen to be attached to the probe:

    1. Streamline
    2. Ribbon trace
    3. Animated line tracing

  10. The probe's streamline should be drawn just like the static streamlines, only dynamically in response to the probe moving.

  11. The 3D Ribbon Trace probe is like a streamline, but instead of having a single stream coming from the probe, attach a small horizontal line to the probe and have some number of streams coming from different places on the line. Connect them up with GL_QUADS. (It is not required to do lighting, but it is a nice touch.)

  12. The line trace involves some animation. It is like a ribbon trace, but each time Animate() gets called, you advect the points, and then in Display(), you connect them.

  13. Display an X-Y-Z set of axes as a reference. Allow these to be toggled on and off.

Suggestions:

10 Points Extra Credit: Blob Tracing

This is like line tracing, but instead of having a line of points coming from the probe, have a 3D shape start there and deform. Advect each vertex in the object and then reconnect them as they were originally connected. This is an animation method, so the idle function (Animate( ) in the sample code) will be used to change something and force a redisplay.

Grading:

Item Points
Correct arrows 20
Correct streamlines 20
Correct streamline probe 20
Correct ribbon probe 20
Correct line trace probe 20
Blob Probe EC 10
Potential Total 110

Where In The World Did That Equation Come From?

The equation being used for this project describes flow through a solenoid.