summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/dvips/pst-3dplot
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-06-17 21:35:47 +0000
committerKarl Berry <karl@freefriends.org>2007-06-17 21:35:47 +0000
commitc4ae47344ef52c976c8de09bd07d290cd2bb983f (patch)
tree2297cae4f0b28585c24c372846dd41da10950d63 /Master/texmf-dist/dvips/pst-3dplot
parent47e22c8c21f92ffb4d94e0bcf8785980d52dbbe0 (diff)
pst-3dplot update (17jun07)
git-svn-id: svn://tug.org/texlive/trunk@4450 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/dvips/pst-3dplot')
-rw-r--r--Master/texmf-dist/dvips/pst-3dplot/pst-3dplot.pro68
1 files changed, 65 insertions, 3 deletions
diff --git a/Master/texmf-dist/dvips/pst-3dplot/pst-3dplot.pro b/Master/texmf-dist/dvips/pst-3dplot/pst-3dplot.pro
index d8cffb1e8fb..30b2d62eece 100644
--- a/Master/texmf-dist/dvips/pst-3dplot/pst-3dplot.pro
+++ b/Master/texmf-dist/dvips/pst-3dplot/pst-3dplot.pro
@@ -20,6 +20,8 @@
/tx@3DPlotDict 50 dict def
tx@3DPlotDict begin
%
+/printDot { gsave 2 copy 2 0 360 arc fill stroke grestore } def
+%
/saveCoor {
dzUnit mul /z exch def
dyUnit mul /y exch def
@@ -34,6 +36,8 @@ tx@3DPlotDict begin
/y2D x leftHanded { neg } if Alpha sin mul y Alpha cos mul add neg Beta sin mul z Beta cos mul add def
} def
%
+/Conv3D2D { /z ED /y ED /x ED ConvertTo2D x2D y2D } def
+%
/ConvertToCartesian {
/latitude exch def
/longitude exch def
@@ -42,11 +46,22 @@ tx@3DPlotDict begin
/x { Radius longitude cos mul latitude cos mul } def
/y { Radius longitude sin mul latitude cos mul } def
} def
+/ConvCylToCartesian { % r phi h -> x y z
+ 3 1 roll % r phi h
+ /Phi ED
+ /Radius ED % h->z
+ Radius Phi cos mul exch % x z
+ Radius Phi sin mul exch % x y z
+} def
%
/SphericalTo2D {
x y z ConvertToCartesian ConvertTo2D
} def
%
+/CylinderTo2D { % r phi h
+ x y z ConvCylToCartesian ConvertTo2D
+} def
+%
/convertStackTo2D {
counttomark
/n exch def /n3 n 3 div cvi def
@@ -69,9 +84,9 @@ tx@3DPlotDict begin
/formulesTroisD{%
/xObservateur x Sin1 mul neg y Cos1 mul add def
/yObservateur x Cos1Sin2 mul neg y Sin1Sin2 mul sub z Cos2 mul add def
- /zObservateur x neg Cos1Cos2 mul y Sin1Cos2 mul sub z Sin2 mul sub Dobs add def
- /Xi DScreen xObservateur mul zObservateur div def
- /Yi DScreen yObservateur mul zObservateur div def
+ /zObservateur x neg Cos1Cos2 mul y Sin1Cos2 mul sub z Sin2 mul sub def
+ /Xi xObservateur mul zObservateur Div def
+ /Yi yObservateur mul zObservateur Div def
} def
%
/RotatePointXYZ{% Mxx are defined in the TeX file
@@ -236,5 +251,52 @@ tx@3DPlotDict begin
% /StartTheta StartTheta increment 2 div add def
} for
} def
+%
+%
+/MoveTo { Conv3D2D moveto } def
+/LineTo { Conv3D2D lineto } def
+/IIIDEllipse { % x y z rA rB startAngle endAngle Wedge
+ /dAngle 1 def
+ /isWedge ED
+ /endAngle ED
+ /startAngle ED
+ /radiusB ED
+ /radiusA ED
+ startAngle cos radiusA mul startAngle sin radiusB mul 0
+ isWedge { 0 0 moveto LineTo }{ MoveTo } ifelse
+ /Angle startAngle def
+ startAngle dAngle endAngle {
+ /Angle ED
+ Angle cos radiusA mul Angle sin radiusB mul 0 LineTo
+ } for
+ isWedge { 0 0 lineto } if
+} def
+
+/IIIDCircle { % x y z r startAngle endAngle Wedge
+ 7 3 roll % startAngle endAngle Wedge x y z r
+ dup % startAngle endAngle Wedge x y z r r
+ 8 -3 roll
+ IIIDEllipse
+} def
+
+/IIIDWedge { % x y z r startAngle endAngle
+ true IIIDCircle
+} def
+
+/IIIDCylinder {% x y z r h start end wedge
+ /isWedge ED
+ /increment ED
+ /endAngle ED
+ /startAngle ED
+ /height ED
+ /radius ED
+ startAngle increment endAngle {
+ /Angle exch def
+ radius Angle 0 ConvCylToCartesian MoveTo
+ radius Angle height ConvCylToCartesian LineTo
+ } for
+ stroke
+} def
+%
end