summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/dvips/pstricks-add/pstricks-add.pro
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/dvips/pstricks-add/pstricks-add.pro')
-rw-r--r--Master/texmf-dist/dvips/pstricks-add/pstricks-add.pro41
1 files changed, 20 insertions, 21 deletions
diff --git a/Master/texmf-dist/dvips/pstricks-add/pstricks-add.pro b/Master/texmf-dist/dvips/pstricks-add/pstricks-add.pro
index df844e2828e..8d385084718 100644
--- a/Master/texmf-dist/dvips/pstricks-add/pstricks-add.pro
+++ b/Master/texmf-dist/dvips/pstricks-add/pstricks-add.pro
@@ -1,20 +1,19 @@
-%!
% PostScript prologue for pstricks-add.tex.
-% Version 0.08, 2006/06/17
+% Version 0.09, 2006/10/06
% For distribution, see pstricks.tex.
%
% HISTORY
-% 2006/06/17 : - changes to the code (hv)
-% 2006/04/21 : - Improved parser -> generic with derivative and translator into ps (dr)
-% 2006/01/16 : - EXP -> Exp to prevent missmatch with pst-math (hv)
+% 2006/08/10 : - cvi for the wavelength to get an integer
+% 2006/05/31 : - changes to the code
+% 2006/04/21 : - Improved parser -> generic with derivative and translator into ps
+% 2006/01/16 : - EXP -> Exp to prevent missmatch with pst-math
% 2005/09/28 : - rename it to pstricks-add.pro
-% - add support for Gouraud shading (hv)
+% - add support for Gouraud shading
% 2005/05/20 : small (unimportant) changes (hv)
-% 2005/02/25 : white space removal from expression (dr)
-% 2004/12/16 : addition of Sum and IfTE (dr)
+% 2005/02/25 : white space removal from expression
+% 2004/12/16 : addition of Sum and IfTE
% 2004/11/14 : correction of a priority problem
% ^ before unary - (new rule FS)
-%
/tx@addDict 410 dict def tx@addDict begin
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Pi and Euler are defined in pstricks.pro
@@ -72,20 +71,20 @@
%
/Gamma 0.8 def
/calculateRGB {
- lambda 379 le {/Red 0 def /Green 0 def /Blue 0 def} if
- lambda 781 ge {/Red 0 def /Green 0 def /Blue 0 def} if
+ /Red 0 def /Green 0 def /Blue 0 def
lambda 380 ge {lambda 439 le {
/R {lambda 440 sub neg 440 380 sub div} def
/Red R factor mul Gamma exp def
/G 0 def
/Green G factor mul Gamma exp def
/B 1 def
- /Blue B factor mul Gamma exp def} if
+ /Blue B factor mul Gamma exp def } if
} if
lambda 440 ge { lambda 489 le {
/G {lambda 440 sub 490 440 sub div} def
/Green G factor mul Gamma exp def
- /R 0 def /Red 0 def
+% /R 0 def
+% /Red 0 def
/B 1 def
/Blue B factor mul Gamma exp def } if
} if
@@ -99,22 +98,22 @@
lambda 510 ge {lambda 579 le {
/R {lambda 510 sub 580 510 sub div } def
/Red R factor mul Gamma exp def
- /Blue 0 def
+% /Blue 0 def
/G 1 def
/Green G factor mul Gamma exp def } if
} if
lambda 580 ge {lambda 644 le {
/G {lambda 645 sub neg 645 580 sub div } def
/Green G factor mul Gamma exp def
- /Blue 0 def
+% /Blue 0 def
/R 1 def
/Red R factor mul Gamma exp def } if
} if
lambda 645 ge { lambda 780 le {
/Red 1 factor mul Gamma exp def
- /Blue 0 def
- /Green 0 def } if
- } if
+% /Blue 0 def
+% /Green 0 def
+ } if } if
} def
%
/factor {
@@ -124,9 +123,9 @@
} def
/wavelengthToRGB { % the wavelength in nm must be on top of the stack
- /lambda exch def
+ cvi /lambda exch def % no floating point here
calculateRGB
-} def
+} def % now the colors are saved in Red Green Blue
/axfill {
@@ -946,7 +945,7 @@ end%%%tx@CoreAnalyzerDict
/Argth { dup 1 add exch 1 exch sub div ln 2 div } def
%% modified exponential funtion for 0
%% x n -> x^n
-/Exp { dup 0 eq { pop pop 1 } { exp } ifelse } bind def
+/Exp { exch dup 0 eq { pop pop 0 }{ exch dup 0 eq { pop pop 1 } { exp } ifelse } ifelse } bind def
%% modified exponential funtion for 0
%% x -> e^x
/Ex { 2.71828182846 exch exp } bind def