setenv FR "0 0 10"
setenv UP "0 -1 0"
echo "1 1 1 1 -1 -1 -4" \
| emap -i - -amb 0 0 0 -fr $FR -up $UP -rh -o - \
| unu 2op ^ - 1.7 \
| unu 2op - 1 - \
| unu 2op x - 3.14159 \
| unu 1op cos \
| unu 2op + - 1 \
| unu 2op / - 2 -o emap.nrrd
alias GLYPH tend glyph -rt -a fa -atr 0.0 -ctr 0.999 \
-slc 2 0 -sg -1.9 -off -1.5 \
-fr $FR -up $UP -rh -or -ur 0.06 0.33 -vr 0.34 0.61 \
-am 1.0 -ga fa -sat 0.0 -emap emap.nrrd -gam 1.0 -bg 0 0 0 \
-is 1700 1700 -ns 4 -o -
tend evalclamp -i slice-small.nrrd -min 0.05 \
| GLYPH -g sph -gsc 0.0035 -o - \
| unu slice -a 0 -p 0 \
| unu gamma -g 0.92 \
| unu quantize -b 8 -min 0 -max 1 -o slice-sph.png
tend evalclamp -i slice-small.nrrd -min 0.05 \
| GLYPH -g sqd -gsc 0.0030 -o - \
| unu slice -a 0 -p 0 \
| unu gamma -g 0.92 \
| unu quantize -b 8 -min 0 -max 1 -o slice-sqd.png
rm -f emap.nrrd
unu resample -i slice-sph.png -s 300 300 -o _slice-sph.png
unu resample -i slice-sqd.png -s 300 300 -o _slice-sqd.png
unu resample -i slice-sph.png -s 100 100 -o __slice-sph.png
unu resample -i slice-sqd.png -s 100 100 -o __slice-sqd.png