tend helix -s 38 39 40 -r 0.5 -R 1.2 -S 2 -o tmp.nrrd

setenv CAM "-fr 3 0 -5 -up 0 0 -1 -rh"

tend anvol -i tmp.nrrd -a fa \
 | unu 2op - - 0.01 \
 | mrender -i - $CAM -dn -1 -di 0 -df 1 -ar \
   -ur -1.1 1.1 -vr -1.1 1.1 -is 120 120 -q val -m histo-min -o - \
 | unu 2op exists - 0 \
 | unu quantize -b 8 -o dist.png

echo "1   1 1 1   -1 -1 -3" \
 | emap -i - $CAM -o emap.nrrd

tend glyph -i tmp.nrrd -emap emap.nrrd -bg 0.7 0.7 0.7 -sat 0.8 \
   $CAM -ur -0.92 0.92 -vr -1.0 1.2 \
   -psc 345 -gsc 0.03 -atr 0.6 -o whole.eps

tend slice -i tmp.nrrd -a 2 -p 0 \
 | tend glyph -emap emap.nrrd -bg 0.7 0.7 0.7 -sat 0.8 \
   $CAM -ur -0.3 0.3 -vr 0.2 0.8 \
   -wd 1.6 0.8 0 -psc 900 -gsc 0.03 -atr 0.6 -o slice.eps

rm -f emap.nrrd
