Clone wiki

cs247_2018 / CS247_Assignment_5

Assignment 5 Description (11% of total grade)

Due: April 30th

The task for this assignment is the implementation of Vector field visualization.

Reading assignments

Basic Tasks

  • Vector field visualization in 2D using glyphs
  • Streamline integration using Euler and Runge-Kutta methods
  • Pathline integration using Euler and Runge-Kutta methods

Minimum Requirements

  • Glyph visualization: draw glyphs ( arrows or something that indicate direction ) (15 points)

    • Adjustable length: choose between arrows with constant length or arrows with length depending on the speed (vector magnitude) (5 points)
    • Change (sub)sampling rate for arrows or glyphs (vector grid) (5 points)
  • Streamlines using a) Euler (15 points) and b) RK2 (10 points)

    • Everytime you seed a point keep the streamline of that point (don't reset streamlines) (-3 points penalty)
    • When you change a time-slice the streamline should update correctly (recalculate) (5 points)
    • Do bilinear interpolation of vectors (don't snap to nearest vector) (5 points)
    • Stopping condition depends on the accumulated length of the streamline or if the queried vector is almost zero or if you hit a boundary (-3 points penalty)
    • Do backward intergration with forward integration (-3 points penalty)
  • Pathlines using a) Euler (20 points) and b) RK2 (10 points)

    • Everytime you seed a point keep the pathline of that point (don't reset pathlines) (-3 points penalty)
    • Do trilinear interpolation of vectors (don't snap to nearest vector and timeslice) (5 points)
    • Stopping condition depends on the accumulated length of the streamline or if the queried vector is almost zero or if you hit a boundary (-3 points penalty)
    • Do backward integration with forward integration (-3 points penalty)
  • Adjustable dt value by user (5 points)

Bonus

  • Release multiple streamline seeds in horizontal or vertical rake (+5 points)
  • Switch between different background scalar field images (+3 points)
  • RK4 for both streamlines (+5 points) and pathlines (+5 points)

Notes

  • The data can be found in the Downloads.
  • The vector data is in the vector_array, where every 3 elements in the array will give you the xyz component of a vector. After one 2D slice is finished, and if there is more than one time step, the vector data continues for the next time step.
    So the size of the array = 3 * width * height * number_of_timesteps. More information can be found in the file README_data.txt found in the source code.
  • There aren't prototypes for every function you might need. Create functions as you need them.

Screenshots for Minimum Requirements Solution

Glyphs Visualization

glyphs.png

Streamlines

streamlines.png

Pathlines

pathlines.png

Updated