SciVis 2017 Project 5: "tensr"

Assigned March 8; Due Wed March 15 at 11:59pm

For this project, you will implement 2-D symmetric field convolution, integration along eigenvectors, and Line Integral Convolution (LIC).


The usual ...

Like in p4vectr, if you want to compile your code without the -O2 optimization, you can:

export DASHO=-O0
make clean; make
Compiling without optimization may produce an executable that is easier to debug.

Like in earlier projects, there is a tnsVerbose global variable that you should use to control the printing of any debugging messages. tnsVerbose is set from the value of environment variable TNS_VERBOSE by the tensr as soon as it starts. Grading will be done with TNS_VERBOSE unset.

What to do

Run "./rtensr" to review the commands available, and run "./rtensr about" to see what needs to be implemented. The convolution code (for tnsConvoEval) will be nearly identical to what was done for p4vectr: we again need 2-D convolution, but now in a tensor field rather than a vector field, but that just means 3 values instead of 2 need to be reconstru. Reading through and understanding the header file tns.h is essential. The tnsMath.h macro collection will be familiar.

The handling of these lines

/* v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v  begin student code */
/* ^'^'^'^'^'^'^'^'^'^'^'^'^'^'^'^'^'^'^  end student code */
is the same as in previous assignments. There are detailed notes in the comments preceeding these blocks detailing what has to be done.

Just like p4vectr, 33710 students have two additional things to implement:

  1. Runge-Kutta Fourth-order integration along streamlines: the "-iintg rk4" option for "tensr sline" and "tensr lic", which determines the value of the intg variable passed to tnsSlineTrace() and tnsLIC, respectively.
  2. In tnsLIC, if the rndLinterp argument is nonzero, do bilinear interpolation into the given noise texture, instead of nearest-neighbor interplation.

Example tensr/rtensr commands to try

The commands here use "./rrendr"; you should make sure that you get the exactly same results by running "./rendr". To an unfortunate extent the commands are intended to be executed in the order shown: later commands assume the presence of files created by running earlier commands.


The grade will be based on style (10%) and correctness (90%), similar to previous projects. The style points will be the same as for Project 2: new functions are "static", convolution uses 2*S not S^2 kernel evaluations, the code compiles without warnings, and there are no memory leaks (though how this is tested may be more rigorous than it was for Project 2). Also, points will be deducted if there are extraneous debugging messages.. The correctness points will be based on the commands above or some slight modifications.