summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/dvips/pst-solides3d
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-07-26 21:51:30 +0000
committerKarl Berry <karl@freefriends.org>2009-07-26 21:51:30 +0000
commit8b60efe1c27cce5141a056e673beca041a6ba806 (patch)
tree79fa7549e17a8d719f1638661ab58f1f1050b19c /Master/texmf-dist/dvips/pst-solides3d
parent0007ab5fc9d7187facc845a2bc8009136759c96c (diff)
pst-solides3d (25jul09)
git-svn-id: svn://tug.org/texlive/trunk@14458 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/dvips/pst-solides3d')
-rw-r--r--Master/texmf-dist/dvips/pst-solides3d/solides.pro306
1 files changed, 221 insertions, 85 deletions
diff --git a/Master/texmf-dist/dvips/pst-solides3d/solides.pro b/Master/texmf-dist/dvips/pst-solides3d/solides.pro
index a6c1c06c3e1..3b2eeb6adc2 100644
--- a/Master/texmf-dist/dvips/pst-solides3d/solides.pro
+++ b/Master/texmf-dist/dvips/pst-solides3d/solides.pro
@@ -1,8 +1,8 @@
%!
% PostScript prologue for pst-solides3d.tex.
-% Version 4.13, 2008/10/30
+% Version 4.15, 2009/07/03
%
-%% COPYRIGHT 2008 by Jean-Paul Vignault
+%% COPYRIGHT 2009 by Jean-Paul Vignault
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
@@ -35,7 +35,10 @@ SolidesDict begin
%% /solidgrid true def
/aretescachees true def
/defaultsolidmode 2 def
-
+%
+/Stroke { strokeopacity .setopacityalpha stroke } def
+/Fill { fillopacity .setopacityalpha fill } def
+%
%% variables globales specifiques a PSTricks
%% /activationgestioncouleurs true def
/xmin -10 def
@@ -54,9 +57,7 @@ SolidesDict begin
/vadjust 2.5 def
/pl@n-en-cours false def
-/pointilles {
- [6.25 3.75] 1.25 setdash
-} def
+/pointilles { [6.25 3.75] 1.25 setdash } def
/stockcurrentcpath {} def
/newarrowpath {} def
/chaine 15 string def
@@ -78,7 +79,7 @@ pop }bind def
/Yellow{0 0 1 0 setcmykcolor}def
/Goldenrod{0 0.10 0.84 0 setcmykcolor}def
/Dandelion{0 0.29 0.84 0 setcmykcolor}def
-/Apricot{0 0.32 0.52 0 setcmykcolor}def
+/Apricotq{0 0.32 0.52 0 setcmykcolor}def
/Peach{0 0.50 0.70 0 setcmykcolor}def
/Melon{0 0.46 0.50 0 setcmykcolor}def
/YellowOrange{0 0.42 1 0 setcmykcolor}def
@@ -216,6 +217,7 @@ end
/solid {continu} def
/dashed {pointilles} def
+/dotted { [2] 0 setdash } def
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% geometrie basique %%%%
@@ -228,7 +230,7 @@ gsave
dup 0 getp smoveto
ligne_
starfill
- stroke
+ Stroke
grestore
} def
@@ -264,7 +266,7 @@ end
gsave
polygone_
starfill
- currentlinewidth 0 eq {} {stroke} ifelse
+ currentlinewidth 0 eq {} { Stroke } ifelse
grestore
} def
@@ -276,7 +278,7 @@ gsave
smoveto
0 0 rlineto
5 setlinewidth
- stroke
+ Stroke
grestore
} def
@@ -300,13 +302,12 @@ grestore
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% ### AAAopacity ###
+
%% les parametres pour la gestion de la transparence
-/setstrokeopacity {
- /strokeopacity exch def
-} def
-/setfillopacity {
- /fillopacity exch def
-} def
+
+/setstrokeopacity { /strokeopacity exch def } def
+/setfillopacity { /fillopacity exch def } def
+
%% d apres un code de Jean-Michel Sarlat
%% http://melusine.eu.org/syracuse/swf/pdf2swf/setdash/
%% Mise en reserve de la procedure stroke originelle.
@@ -315,20 +316,10 @@ grestore
/sysatan {systemdict /atan get exec} def
/atan {2 copy 0 0 eqp {pop pop 0} {sysatan} ifelse} def
% Mise en place de la nouvelle procedure
-/stroke {
- /strokeopacity where {
- /strokeopacity get
- } {
- 1
- } ifelse
+/Stroke { /strokeopacity where { /strokeopacity get }{ 1 } ifelse
.setopacityalpha sysstroke
} def
-/fill {
- /fillopacity where {
- /fillopacity get
- } {
- 1
- } ifelse
+/Fill { /fillopacity where { /fillopacity get }{ 1 } ifelse
.setopacityalpha sysfill
} def
@@ -829,7 +820,7 @@ gsave
u oldarrowplume oldarrowpointe add neg mulv
v oldarrow@ngle sin oldarrow@ngle cos div oldarrowplume mul neg mulv addv
rlineto
- closepath fill
+ closepath Fill
grestore
end
} def
@@ -1268,7 +1259,7 @@ gsave
A pop ymin smoveto
A pop ymax slineto
stockcurrentcpath
- stroke
+ Stroke
} {
%% on cherche le point le + a gauche
xmin A B xdpoint /C defpoint
@@ -1294,7 +1285,7 @@ gsave
C smoveto
D slineto
stockcurrentcpath
- stroke
+ Stroke
} ifelse
end
grestore
@@ -1822,8 +1813,8 @@ end
} {
solid i alpha str2 mybool projpath
} ifelse
- fill
- stroke
+ Fill
+ Stroke
end
} def
@@ -2145,10 +2136,10 @@ gsave
/mybool true def
} ifelse
/l@pl@n exch def
- /savestroke {SolidesDict /stroke get exec} def
- /stroke {l@pl@n mybool projpath savestroke} def
- /savefill {SolidesDict /fill get exec} def
- /fill {l@pl@n mybool projpath savefill} def
+ /saveStroke {SolidesDict /Stroke get exec} def
+ /Stroke {l@pl@n mybool projpath saveStroke} def
+ /savefill {SolidesDict /Fill get exec} def
+ /Fill {l@pl@n mybool projpath savefill} def
/masque {} def
l@pl@n plangetrange aload pop
setyrange setxrange
@@ -2159,7 +2150,7 @@ gsave
%% xmax ymin l@pl@n pointplan slineto
%% xmin ymin l@pl@n pointplan smoveto
%% % closepath
-%% %gsave orange fill grestore
+%% %gsave orange Fill grestore
%% clip
} def
/eprojscene {
@@ -2273,7 +2264,7 @@ gsave
}
if
- currentlinewidth 0 eq {} {stroke} ifelse
+ currentlinewidth 0 eq {} { Stroke } ifelse
end
grestore
@@ -2440,7 +2431,7 @@ gsave
newpath
tmin tmax C@urbeR2_
starfill
- currentlinewidth 0 eq {} {stroke} ifelse
+ currentlinewidth 0 eq {} { Stroke } ifelse
end
grestore
@@ -2918,7 +2909,7 @@ end
C A arcspherique_
closepath
starfill
- currentlinewidth 0 eq {} {stroke} ifelse
+ currentlinewidth 0 eq {} { Stroke } ifelse
grestore
end
} def
@@ -3357,7 +3348,7 @@ end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% ### p3dtoplane ###
-%% syntaxe : x y z P p3dtoplan --> X Y
+%% syntaxe : x y z P p3dtoplane --> X Y
/p3dtoplane {
5 dict begin
/leplan exch def
@@ -4362,6 +4353,147 @@ end
%%%%% ### fin insertion ###
+%% La macro provisoire de developpement (27/01/2009)
+%% syntaxe : solid table tablez --> -
+/solidcolorz {
+10 dict begin
+ %% les hauteurs
+ /tablez exch def
+ %% les couleurs
+ /usertable exch def
+ /solid exch def
+ %% a-t-on des couleurs nommees ?
+ usertable 0 get isstring {
+ %% oui, et autant que d etages
+ usertable length 1 sub tablez length eq {
+ /table usertable def
+ } {
+ %% oui, mais moins que d etages
+ %% ==> on definit les 2 premieres en RGB
+ /a0 usertable 0 get def
+ /a1 usertable 1 get def
+ /lacouleurdepart {
+ gsave
+ [a0 cvx exec] length 0 eq {
+ a0 cvx exec currentrgbcolor
+ } {
+ a0 cvx exec
+ } ifelse
+ grestore
+ } def
+ /lacouleurarrivee {
+ gsave
+ [a1 cvx exec] length 0 eq {
+ a1 cvx exec currentrgbcolor
+ } {
+ a1 cvx exec
+ } ifelse
+ grestore
+ } def
+ /usertable [lacouleurdepart lacouleurarrivee] def
+ } ifelse
+ } if
+ usertable 0 get isnum {
+ %% c est un degrade : nb de couleurs a definir
+ /n tablez length 1 add def
+%
+ usertable length 4 eq {
+ /a0 usertable 0 get def
+ /a1 usertable 1 get def
+ /A {a0 i a1 a0 sub mul n 1 sub div add} def
+ /B usertable 2 get def
+ /C usertable 3 get def
+ /D {} def
+ /espacedecouleurs (sethsbcolor) def
+ } if
+%
+ usertable length 6 eq {
+ /a0 usertable 0 get def
+ /b0 usertable 1 get def
+ /c0 usertable 2 get def
+ /a1 usertable 3 get def
+ /b1 usertable 4 get def
+ /c1 usertable 5 get def
+ /A {a0 i a1 a0 sub mul n 1 sub div add} def
+ /B {b0 i b1 b0 sub mul n 1 sub div add} def
+ /C {c0 i c1 c0 sub mul n 1 sub div add} def
+ /D {} def
+ /espacedecouleurs (setrgbcolor) def
+ } if
+%
+ usertable length 7 eq {
+ /a0 usertable 0 get def
+ /b0 usertable 1 get def
+ /c0 usertable 2 get def
+ /a1 usertable 3 get def
+ /b1 usertable 4 get def
+ /c1 usertable 5 get def
+ /A {a0 i a1 a0 sub mul n 1 sub div add} def
+ /B {b0 i b1 b0 sub mul n 1 sub div add} def
+ /C {c0 i c1 c0 sub mul n 1 sub div add} def
+ /D {} def
+ /espacedecouleurs (sethsbcolor) def
+ } if
+%
+ usertable length 8 eq {
+ /a0 usertable 0 get def
+ /b0 usertable 1 get def
+ /c0 usertable 2 get def
+ /d0 usertable 3 get def
+ /a1 usertable 4 get def
+ /b1 usertable 5 get def
+ /c1 usertable 6 get def
+ /d1 usertable 7 get def
+ /A {a0 i a1 a0 sub mul n 1 sub div add} def
+ /B {b0 i b1 b0 sub mul n 1 sub div add} def
+ /C {c0 i c1 c0 sub mul n 1 sub div add} def
+ /D {d0 i d1 d0 sub mul n 1 sub div add} def
+ /espacedecouleurs (setcmykcolor) def
+ } if
+%
+ usertable length 2 eq {
+ /a0 usertable 0 get def
+ /a1 usertable 1 get def
+ 0 1 n 1 sub {
+ /i exch def
+ /A {a0 i a1 a0 sub mul n 1 sub div add} def
+ /B {1} def
+ /C {1} def
+ /D {} def
+ /espacedecouleurs (sethsbcolor) def
+ } for
+ } if
+%
+ %% on affecte la table des couleurs
+ /table [
+ 0 1 n 1 sub {
+ /i exch def
+ [A B C D] espacedecouleurs astr2str
+ } for
+ ] def
+ } if
+%
+ /n solid solidnombrefaces def
+ 0 1 n 1 sub {
+ /i exch def
+ solid i solidcentreface /z exch def pop pop
+ /resultat 0 def
+ 0 1 tablez length 1 sub {
+ /j exch def
+ /ztest tablez j get def
+ z ztest le {
+ /resultat j store
+ exit
+ } {
+ /resultat j 1 add store
+ } ifelse
+ } for
+ solid i table resultat get solidputfcolor
+ } for
+end
+} def
+
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% bibliotheque sur les solides %%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -5869,7 +6001,7 @@ end
solid solidgetfcolors /FC exch def
FC length 1 sub i ge {
FC i get length 1 ge {
- /fillstyle FC i get ( fill) append cvx
+ /fillstyle FC i get ( Fill) append cvx
solidgrid not {
FC i get cvx exec
} if
@@ -6011,7 +6143,7 @@ end
] def
} ifelse
/fillstyle {
- lacouleur {coeff mul} apply setcolor fill
+ lacouleur {coeff mul} apply setcolor Fill
} def
solidgrid not {
lacouleur {coeff mul} apply setcolor
@@ -6400,7 +6532,7 @@ end
newpath
plan plangetrange plan plangetngrid aload pop quadrillagexOy_
plan plangetorigine [imI imK] false planprojpath
- stroke
+ Stroke
end
} def
@@ -6705,7 +6837,7 @@ end
xmin truncate cvi 0 smoveto
xmax truncate cvi 0 slineto
leplan mybool projpath
- stroke
+ Stroke
xmin truncate cvi xmkstep xmax truncate cvi {
dup 0 ne {
/x exch def
@@ -6719,7 +6851,7 @@ end
0 2.5 rmoveto
0 -5 rlineto
leplan mybool projpath
- stroke
+ Stroke
} {
pop (0) 0 0 leplan mybool dltextp3d
} ifelse
@@ -6745,7 +6877,7 @@ end
0 ymin truncate cvi smoveto
0 ymax truncate cvi slineto
leplan mybool projpath
- stroke
+ Stroke
ymin truncate cvi ymkstep ymax truncate cvi {
dup 0 ne {
/y exch def
@@ -6759,7 +6891,7 @@ end
2.5 0 rmoveto
-5 0 rlineto
leplan mybool projpath
- stroke
+ Stroke
} {
pop (0) 0 0 leplan mybool dltextp3d
} ifelse
@@ -6781,7 +6913,7 @@ end
%% bleu
%% [-3 3 -2 2] quadrillagexOy_
-%% stroke
+%% Stroke
%% noir
%% syntaxe : [xmin xmax ymin ymax] dx dy quadrillagexOy_
@@ -6849,7 +6981,7 @@ end
x ymax slineto
} for
leplan mybool projpath
- stroke
+ Stroke
end
} def
@@ -6879,13 +7011,13 @@ end
newpath
0 0 smoveto
1 0 slineto
- stroke
+ Stroke
0 0 1 0 oldarrow
couleur2 cvx exec
newpath
0 0 smoveto
0 1 slineto
- stroke
+ Stroke
0 0 0 1 oldarrow
eprojscene
end
@@ -9998,25 +10130,25 @@ end
end
} def
-/dbtext {gsave newpath dbtext_ fill grestore} def
-/dctext {gsave newpath dctext_ fill grestore} def
-/dltext {gsave newpath dltext_ fill grestore} def
-/drtext {gsave newpath drtext_ fill grestore} def
+/dbtext {gsave newpath dbtext_ Fill grestore} def
+/dctext {gsave newpath dctext_ Fill grestore} def
+/dltext {gsave newpath dltext_ Fill grestore} def
+/drtext {gsave newpath drtext_ Fill grestore} def
-/bbtext {gsave newpath bbtext_ fill grestore} def
-/bctext {gsave newpath bctext_ fill grestore} def
-/bltext {gsave newpath bltext_ fill grestore} def
-/brtext {gsave newpath brtext_ fill grestore} def
+/bbtext {gsave newpath bbtext_ Fill grestore} def
+/bctext {gsave newpath bctext_ Fill grestore} def
+/bltext {gsave newpath bltext_ Fill grestore} def
+/brtext {gsave newpath brtext_ Fill grestore} def
-/cbtext {gsave newpath cbtext_ fill grestore} def
-/cctext {gsave newpath cctext_ fill grestore} def
-/cltext {gsave newpath cltext_ fill grestore} def
-/crtext {gsave newpath crtext_ fill grestore} def
+/cbtext {gsave newpath cbtext_ Fill grestore} def
+/cctext {gsave newpath cctext_ Fill grestore} def
+/cltext {gsave newpath cltext_ Fill grestore} def
+/crtext {gsave newpath crtext_ Fill grestore} def
-/ubtext {gsave newpath ubtext_ fill grestore} def
-/uctext {gsave newpath uctext_ fill grestore} def
-/ultext {gsave newpath ultext_ fill grestore} def
-/urtext {gsave newpath urtext_ fill grestore} def
+/ubtext {gsave newpath ubtext_ Fill grestore} def
+/uctext {gsave newpath uctext_ Fill grestore} def
+/ultext {gsave newpath ultext_ Fill grestore} def
+/urtext {gsave newpath urtext_ Fill grestore} def
%% syntaxe : str x y show_dim --> str x y llx lly wx wy
@@ -10221,20 +10353,24 @@ end
dup videsolid
} if
activationgestioncouleurs {
- dup solidwithinfaces {
- gere_pstricks_color_inout
- } {
- gere_pstricks_color_out
- } ifelse
- solidinouthue length 0 gt {
- dup solidinouthue solidputinouthuecolors
+ zcolor length 0 ne {
+ dup zcolor tablez solidcolorz
} {
- solidhue length 0 gt {
- dup solidhue solidputhuecolors
- } if
- solidinhue length 0 gt {
- dup solidinhue solidputinhuecolors
- } if
+ dup solidwithinfaces {
+ gere_pstricks_color_inout
+ } {
+ gere_pstricks_color_out
+ } ifelse
+ solidinouthue length 0 gt {
+ dup solidinouthue solidputinouthuecolors
+ } {
+ solidhue length 0 gt {
+ dup solidhue solidputhuecolors
+ } if
+ solidinhue length 0 gt {
+ dup solidinhue solidputinhuecolors
+ } if
+ } ifelse
} ifelse
} {
/activationgestioncouleurs true def
@@ -10989,7 +11125,7 @@ end
linecolor
[proj-args proj-definition cvx exec] 0 getp point_
gere_pstricks_proj_opt
- stroke
+ Stroke
} if
% 1 1 0 0 1 1 Diamond
texte length 0 gt {
@@ -11010,7 +11146,7 @@ end
%% } ifelse
%gere_pstricks_proj_opt
planprojpst dupplan dup phi rotateplan projectionsifacevisible projpath
- fill
+ Fill
} if
} def
@@ -11184,7 +11320,7 @@ end
} ifelse
pos (text_) append cvx exec
gere_pstricks_proj_opt
-fill
+Fill
end
} def