From: <and...@us...> - 2010-05-17 13:00:23
|
Revision: 11002 http://plplot.svn.sourceforge.net/plplot/?rev=11002&view=rev Author: andrewross Date: 2010-05-17 13:00:17 +0000 (Mon, 17 May 2010) Log Message: ----------- Update tcl example 28 consistent with C version. Modified Paths: -------------- trunk/examples/tcl/x28.tcl Modified: trunk/examples/tcl/x28.tcl =================================================================== --- trunk/examples/tcl/x28.tcl 2010-05-17 12:33:24 UTC (rev 11001) +++ trunk/examples/tcl/x28.tcl 2010-05-17 13:00:17 UTC (rev 11002) @@ -52,6 +52,17 @@ set zmid [expr {0.5*($zmax + $zmin)}] set zrange [expr {$zmax - $zmin}] + set ysmin [expr {$ymin + 0.1 * $yrange}] + set ysmax [expr {$ymax - 0.1 * $yrange}] + set ysrange [expr {$ysmax - $ysmin}] + set dysrot [expr {$ysrange / ( $NROTATION - 1 )}] + set dysshear [expr {$ysrange / ( $NSHEAR - 1 )}] + set zsmin [expr {$zmin + 0.1 * $zrange}] + set zsmax [expr {$zmax - 0.1 * $zrange}] + set zsrange [expr {$zsmax - $zsmin}] + set dzsrot [expr {$zsrange / ( $NROTATION - 1 )}] + set dzsshear [expr {$zsrange / ( $NSHEAR - 1 )}] + # p1string must be exactly one character + the null termination # character. set p1string "O" @@ -169,8 +180,9 @@ set cos_omega [expr {cos($omega)}] set y_shear [expr {0.5*$yrange*$sin_omega}] set z_shear [expr {0.5*$zrange*$cos_omega}] + set zs [expr {$zsmax - $dzsrot*$i}] $w cmd plptex3 \ - $xmid $ymax [expr {$zmax -($zmax-0.2)*double($i)/double($NROTATION-1)}] \ + $xmid $ymax $zs \ $x_inclination $y_inclination $z_inclination \ $x_shear $y_shear $z_shear \ 0.5 "rotation for y = y#dmax#u" @@ -188,8 +200,9 @@ set cos_omega [expr {cos($omega)}] set x_shear [expr {0.5*$xrange*$sin_omega}] set z_shear [expr {0.5*$zrange*$cos_omega}] - $w cmd plptex3 \ - $xmax $ymid [expr {$zmax -($zmax-0.2)*double($i)/double($NROTATION-1)}] \ + set zs [expr {$zsmax - $dzsrot*$i}] + $w cmd plptex3 \ + $xmax $ymid $zs \ $x_inclination $y_inclination $z_inclination \ $x_shear $y_shear $z_shear \ 0.5 "rotation for x = x#dmax#u" @@ -207,8 +220,9 @@ set cos_omega [expr {cos($omega)}] set y_shear [expr {0.5*$yrange*$cos_omega}] set z_shear [expr {0.5*$zrange*$sin_omega}] + set ys [expr {$ysmax - $dysrot*$i}] $w cmd plptex3 \ - $xmid [expr {$ymax -($ymax-0.2)*double($i)/double($NROTATION-1)}] $zmin \ + $xmid $ys $zmin \ $x_inclination $y_inclination $z_inclination \ $x_shear $y_shear $z_shear \ 0.5 "rotation for z = z#dmin#u" @@ -243,8 +257,9 @@ set cos_omega [expr {cos($omega)}] set x_shear [expr {0.5*$xrange*$sin_omega}] set z_shear [expr {0.5*$zrange*$cos_omega}] + set zs [expr {$zsmax - $dzsshear*$i}] $w cmd plptex3 \ - $xmid $ymax [expr {$zmax -($zmax-0.2)*double($i)/double($NSHEAR-1)}] \ + $xmid $ymax $zs \ $x_inclination $y_inclination $z_inclination \ $x_shear $y_shear $z_shear \ 0.5 "shear for y = y#dmax#u" @@ -262,8 +277,9 @@ set cos_omega [expr {cos($omega)}] set y_shear [expr {-0.5*$yrange*$sin_omega}] set z_shear [expr {0.5*$zrange*$cos_omega}] + set zs [expr {$zsmax - $dzsshear*$i}] $w cmd plptex3 \ - $xmax $ymid [expr {$zmax -($zmax-0.2)*double($i)/double($NSHEAR-1)}] \ + $xmax $ymid $zs \ $x_inclination $y_inclination $z_inclination \ $x_shear $y_shear $z_shear \ 0.5 "shear for x = x#dmax#u" @@ -281,10 +297,11 @@ set cos_omega [expr {cos($omega)}] set y_shear [expr {0.5*$yrange*$cos_omega}] set x_shear [expr {0.5*$xrange*$sin_omega}] + set ys [expr {$ysmax - $dysshear*$i}] $w cmd plptex3 \ - $xmid [expr {$ymax -($ymax-0.2)*double($i)/double($NSHEAR-1)}] $zmin \ + $xmid $ys $zmin \ $x_inclination $y_inclination $z_inclination \ - $x_shear $y_shear $z_shear \ + $x_shear $y_shear $z_shear \ 0.5 "shear for z = z#dmin#u" } # Draw minimal 3D grid to finish defining the 3D box. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |