|
From: Peter P. <pr...@us...> - 2007-02-20 17:28:51
|
Update of /cvsroot/pyxida/Pyxida/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20297/bin Modified Files: animateNC.pl Log Message: Made animations prettier. Index: animateNC.pl =================================================================== RCS file: /cvsroot/pyxida/Pyxida/bin/animateNC.pl,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** animateNC.pl 16 Feb 2007 10:10:12 -0000 1.13 --- animateNC.pl 20 Feb 2007 17:28:42 -0000 1.14 *************** *** 25,32 **** my $alpha = 0.01; my $zoffset = 100; - my $k = 100; # Scaling factor for 4D->3D projection - ###################################################################### --- 25,31 ---- my $alpha = 0.01; + my $showShadows = 0; my $zoffset = 100; ###################################################################### *************** *** 168,187 **** print GPOUT "set output \'/tmp/pyxida-anim-$filenameCount.$frameFormat\'\n"; print GPOUT "set title \'$title\'\n"; my $xmin = $xrange->percentile(100 - $rangePercentile); ! $xmin = 0 unless defined $xmin; ! my $xmax = $xrange->percentile($rangePercentile); $xmax = 0 unless defined $xmax; - my $ymin = $yrange->percentile(100 - $rangePercentile); $ymin = 0 unless defined $ymin; - my $ymax = $yrange->percentile($rangePercentile); $ymax = 0 unless defined $ymax; - my $zmin = $zrange->percentile(100 - $rangePercentile); $zmin = 0 unless defined $zmin; - my $zmax = $zrange->percentile($rangePercentile); $zmax = 0 unless defined $zmax; --- 167,188 ---- print GPOUT "set output \'/tmp/pyxida-anim-$filenameCount.$frameFormat\'\n"; print GPOUT "set title \'$title\'\n"; + + print GPOUT << "EOF"; + set grid nopolar + set grid xtics nomxtics ytics nomytics noztics nomztics nox2tics nomx2tics noy2tics nomy2tics nocbtics nomcbtics + set grid layerdefault + + EOF my $xmin = $xrange->percentile(100 - $rangePercentile); ! $xmin = 0 unless defined $xmin; my $xmax = $xrange->percentile($rangePercentile); $xmax = 0 unless defined $xmax; my $ymin = $yrange->percentile(100 - $rangePercentile); $ymin = 0 unless defined $ymin; my $ymax = $yrange->percentile($rangePercentile); $ymax = 0 unless defined $ymax; my $zmin = $zrange->percentile(100 - $rangePercentile); $zmin = 0 unless defined $zmin; my $zmax = $zrange->percentile($rangePercentile); $zmax = 0 unless defined $zmax; *************** *** 215,222 **** print GPOUT "flat(p) = ".($s_zmin - $zoffset + 10)."\n"; #print GPOUT "splot '-' notitle\n"; # notitle? ! print GPOUT "splot '-' ".'using 1:2:3:(rgb($4,$5,$6)) notitle with points lc rgb variable,\\'."\n"; ! print GPOUT "'-' ".'using 1:2:(flat($3)) '."notitle with points lc \"#CCCCCC\"\n"; my $shadow = ''; --- 216,229 ---- print GPOUT "flat(p) = ".($s_zmin - $zoffset + 10)."\n"; + #print GPOUT "set pointsize 1.5\n"; + #print GPOUT "splot '-' notitle\n"; # notitle? ! print GPOUT "splot '-' " . 'using 1:2:3:(rgb($4,$5,$6)) notitle with points pt 7 lc rgb variable'; ! if ($showShadows) { ! print GPOUT ", '-' ".'using 1:2:(flat($3)) '."notitle with points lc \"#CCCCCC\"\n"; ! } else { ! print GPOUT "\n"; ! } my $shadow = ''; *************** *** 233,237 **** } print GPOUT "e\n"; ! print GPOUT "$shadow"."e\n"; } --- 240,244 ---- } print GPOUT "e\n"; ! print GPOUT "$shadow"."e\n" if ($showShadows); } *************** *** 257,276 **** } ! sub projectClever4D() { ! my @coord4D = @_; ! print STDERR "4D: $coord4D[0] $coord4D[1] $coord4D[2] $coord4D[3]\n" if ($debug); ! ! # x' = k * (x / w) ! # y' = k * (y / w) ! # z' = k * (z / w) ! ! my @coord3D = (); ! if ($coord4D[3] == 0) { ! @coord3D = (0, 0, 0); ! } else { ! @coord3D = ( $k * $coord4D[0] / $coord4D[3], $k * $coord4D[1] / $coord4D[3], $k * $coord4D[2] / $coord4D[3] ); ! } ! return @coord3D; ! } sub projectSimple() { --- 264,283 ---- } ! #sub projectClever4D() { ! # my @coord4D = @_; ! # print STDERR "4D: $coord4D[0] $coord4D[1] $coord4D[2] $coord4D[3]\n" if ($debug); ! # ! # # x' = k * (x / w) ! # # y' = k * (y / w) ! # # z' = k * (z / w) ! # ! # my @coord3D = (); ! # if ($coord4D[3] == 0) { ! # @coord3D = (0, 0, 0); ! # } else { ! # @coord3D = ( $k * $coord4D[0] / $coord4D[3], $k * $coord4D[1] / $coord4D[3], $k * $coord4D[2] / $coord4D[3] ); ! # } ! # return @coord3D; ! #} sub projectSimple() { |