The dataset used is a sampled version of an implicit quartic polynomial. Follow the directions here for creating pin.nrrd. However, first we need to set the spacing information concordant with having sampled space from -1.3 to 1.3 along each axis:
unu axinfo -i pin.nrrd -a 0 -sp 0.0412698 \ | unu axinfo -a 1 -sp 0.0412698 \ | unu axinfo -a 2 -sp 0.0412698 -o pin.nrrd
Create the opacity function, basically a step-function at zero:
echo "0 1" \ | unu reshape -s 1 2 \ | unu resample -s = 1024 -k tent \ | unu save -f text -o ramp.txt echo "-1.0 0.0 -0.03 0.0 0.03 1.0 1.0 1.0" \ | unu reshape -s 2 4 \ | unu imap -i ramp.txt -r -m - \ | unu axinfo -a 0 -l "A" \ | unu axinfo -a 1 -l "gage(v)" -mm -1.0 1.0 -o val-txf.nrrd
Create the color transfer functions for the different curvature quantities. This is actually the product of two functions, one for the green to magenta transition, and one for all the lines. The only thing different among them is the axis label identifying what gage-measured quantity is the transfer function domain variable. Note use of color.txt and lines.txt.
alias COL-TXF "unu rmap -i ramp.txt -m color.txt | unu axdelete -a 1 | unu axinfo -a 0 -l RGB" COL-TXF | unu axinfo -a 1 -l "gage(k1)" -mm -3 3 -o k1-col-txf.nrrd COL-TXF | unu axinfo -a 1 -l "gage(k2)" -mm -3 3 -o k2-col-txf.nrrd COL-TXF | unu axinfo -a 1 -l "gage(mc)" -mm -3 3 -o mc-col-txf.nrrd COL-TXF | unu axinfo -a 1 -l "gage(gc)" -mm -3 3 -o gc-col-txf.nrrd alias LINES-TXF "unu imap -i ramp.txt -r -m lines.txt | unu axdelete -a 1 | unu axinfo -a 0 -l RGB" LINES-TXF | unu axinfo -a 1 -l "gage(k1)" -mm -4.1 8.08 -o k1-lines-txf.nrrd LINES-TXF | unu axinfo -a 1 -l "gage(k2)" -mm -4.1 8.08 -o k2-lines-txf.nrrd LINES-TXF | unu axinfo -a 1 -l "gage(mc)" -mm -4.1 8.08 -o mc-lines-txf.nrrd LINES-TXF | unu axinfo -a 1 -l "gage(gc)" -mm -4.1 8.08 -o gc-lines-txf.nrrd
Now we're ready to render:
setenv IS 1100 setenv NT 40 setenv STEP 0.001 setenv BG "1.0 1.0 1.0" alias MITER miter -i pin.nrrd \ -k00 cubic:1,0 -k11 cubicd:1,0 -k22 cubicdd:1,0 \ -rh -fr 2 -5.4 4.8 -dn -2 -di 0 -df 2 -ar -ur -1.33 1.23 -vr -1.24 1.32 \ -ld 1 -1 -2.2 -ads 0.1 0.8 0.3 -sp 70 \ -is $IS $IS -step $STEP -nt $NT MITER -txf val-txf.nrrd k1-*-txf.nrrd -o k1-rend.nrrd MITER -txf val-txf.nrrd k2-*-txf.nrrd -o k2-rend.nrrd MITER -txf val-txf.nrrd mc-*-txf.nrrd -o mc-rend.nrrd MITER -txf val-txf.nrrd gc-*-txf.nrrd -o gc-rend.nrrd
The output of these steps is a set of floating-point RGBA images in nrrd format. Overrgb is the tool which composites these with a background color, does gamma correction, and quantizes down to 8 bits. Unu is used to join the images side-by-side:
unu join -i {k1,k2,mc,gc}-rend.nrrd -a 1 \ | overrgb -i - -g 1.65 -b $BG -o tease.png
Make an EPS (encapsulated PostScript) version for the paper, and smaller images for these pages:
unu save -f eps -i tease.png -o tease.eps unu resample -i tease.png -s = x0.15 x0.15 -o _tease.png unu resample -i tease.png -s = x0.075 x0.075 -o __tease.png
Clean up:
rm -rf ramp.txt *txf.nrrd