diff options
Diffstat (limited to 'Master/texmf-dist/dvips/pst-3dplot/pst-3dplot.pro')
-rw-r--r-- | Master/texmf-dist/dvips/pst-3dplot/pst-3dplot.pro | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/Master/texmf-dist/dvips/pst-3dplot/pst-3dplot.pro b/Master/texmf-dist/dvips/pst-3dplot/pst-3dplot.pro index 251f0612ff5..6cd943f344c 100644 --- a/Master/texmf-dist/dvips/pst-3dplot/pst-3dplot.pro +++ b/Master/texmf-dist/dvips/pst-3dplot/pst-3dplot.pro @@ -1,3 +1,4 @@ +%% $Id: pst-3dplot.pro 9 2008-01-03 20:22:50Z herbert $ %% %% This is file `pst-3dplot.pro', %% @@ -15,7 +16,7 @@ %% `pst-3dplot' is a PSTricks package to draw 3d curves and graphical objects %% %% -%% version 0.25 / 2007-12-22 Herbert Voss <voss _at_ PSTricks.de> +%% version 0.26 / 2008-01-03 Herbert Voss <voss _at_ PSTricks.de> %% with contributions of Darrell Lamm <darrell.lamm _at_ gtri.gatech.edu< %% % @@ -836,6 +837,34 @@ end } def ] end } def % + +% [x y z ... ] -> r +% watch out for overflow + +/vector-length { 1 dict begin +dup +% find maximum entry +/max 0 def +{ % max + abs dup max gt { + % if abs gt max + /max exch def + } { + pop + } ifelse +} forall + +max 0 ne { + 0 exch + { % 0 v[i] + max div dup mul add + } forall + sqrt + max mul +} { + pop 0 +} ifelse +end } def % end % tx@3DPlotDict |