--- ray/src/util/genambpos.pl 2014/05/09 23:49:05 2.6 +++ ray/src/util/genambpos.pl 2016/04/20 20:57:57 2.10 @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# RCSid $Id: genambpos.pl,v 2.6 2014/05/09 23:49:05 greg Exp $ +# RCSid $Id: genambpos.pl,v 2.10 2016/04/20 20:57:57 greg Exp $ # # Visualize ambient positions and gradients # @@ -68,15 +68,20 @@ arrglow cone pgarrow${recno} 0 0 8 - ${ cx0 } ${ cy0 } ${ cz0 } - ${ cx1 } ${ cy1 } ${ cz1 } - ${ cr0 } 0 + ${ cx0 } ${ cy0 } ${ cz0 } + ${ cx1 } ${ cy1 } ${ cz1 } + ${ cr0 } 0 void brightfunc pgpat 2 posfunc ambpos.cal 0 6 ${ px } ${ py } ${ pz } ${ pgx } ${ pgy } ${ pgz } +pgpat colorfunc pgpat +4 1 if(corralled,.1,1) if(corralled,.1,1) ambpos.cal +0 +7 ${ px } ${ py } ${ pz } ${ ux } ${ uy } ${ uz } ${ cflags } + pgpat glow pgval 0 0 @@ -91,10 +96,10 @@ pgeval polygon pgellipse${recno} 0 0 12 - ${ px1 } ${ py1 } ${ pz1 } - ${ px2 } ${ py2 } ${ pz2 } - ${ px3 } ${ py3 } ${ pz3 } - ${ px4 } ${ py4 } ${ pz4 } + ${ px1 } ${ py1 } ${ pz1 } + ${ px2 } ${ py2 } ${ pz2 } + ${ px3 } ${ py3 } ${ pz3 } + ${ px4 } ${ py4 } ${ pz4 } '; $posgradfmt .= ' void glow tipglow @@ -102,10 +107,10 @@ void glow tipglow 0 4 ${2*agr} ${2*agg} ${2*agb} 0 -tipglow sphere atip +tipglow sphere atip${recno} 0 0 -4 ${ cx1 } ${ cy1 } ${ cz1 } ${psiz/7} +4 ${ cx1 } ${ cy1 } ${ cz1 } ${psiz/7} ' if ($dodirgrad); my $dirgradfmt=' void brightfunc dgpat @@ -122,17 +127,17 @@ dgval ring dgdisk${recno}a 0 0 8 - ${ px+dgx*.001 } ${ py+dgy*.001 } ${ pz+dgz*.001 } + ${ px+dgx/dg*eps*.5 } ${ py+dgy/dg*eps*.5 } ${ pz+dgz/dg*eps*.5 } ${ dgx } ${ dgy } ${ dgz } - 0 ${ r0/2 } + 0 ${ r0/2 } dgval ring dgdisk${recno}b 0 0 8 - ${ px-dgx*.001 } ${ py-dgy*.001 } ${ pz-dgz*.001 } + ${ px-dgx/dg*eps*.5 } ${ py-dgy/dg*eps*.5 } ${ pz-dgz/dg*eps*.5 } ${ -dgx } ${ -dgy } ${ -dgz } - 0 ${ r0/2 } + 0 ${ r0/2 } '; # Load & convert ambient values print "# Output produced by: $savedARGV\n";