[pstricks] pst-IIID coordinate axes problem

caapv 208 caapv208 at yahoo.co.jp
Sun Nov 26 04:14:19 CET 2006


I cut down the pst-IIID sample and compiled

\psset{fillcolor={[RGB]{127,255,0}}}
\begin{pspicture}(-5,-5)(5,5)
  \psset{eye=0 0 20 1,rotateAxis={1,-1,2}, rotateAngle=45}
  \psIIIDPlain(0,0,0)(4,0,0)(0,4,0)
  \psIIIDCoor[arrowscale=2,arrows=->,linecolor=blue]
\end{pspicture}

and then got 2 specials generated by \pst at verb.
So I pasted them into a file and tried to process it with
ghostscript.  However, the coordinate axes turned out
to point wrong directions:

(c:/texmf/tex/generic/pstricks2006/dvips/pstricks.pro) run
(c:/texmf/tex/generic/pstricks2006/dvips/pst-dots.pro) run
(c:/texmf/tex/generic/pstricks2006/dvips/pst-node.pro) run
(/home/pst-IIID.pro) run
%(/tmp/dvipdfmx.vVMx3i) run
tx at Dict begin /STV {} def end 0 0 moveto
%(/tmp/dvipdfmx.yXupUr) run
275.500590 575.285786 translate 0 0 moveto

gsave
tx at Dict begin STP newpath 0.8 SLW 0  setgray  [ 0 28.45274
mul 4 28.45274 mul 0 28.45274 mul 4 28.45274 mul 0
28.45274 mul 0 28.45274 mul 0 28.45274 mul 0 28.45274 mul
0 28.45274 mul   ] /IIIDCoors ED
tx at IIIDDict begin
%gsave3d %%If you comment in this line, then it's OK
[ 0 28.45274 mul 0 28.45274 mul 20 28.45274 mul 1 ]
set-eye [ 1 28.45274 mul -1 28.45274 mul 2 28.45274 mul ]
45 rotate3d IIIDCoors aload length 9 div cvi dup array /p
ED /lfdNo 0 def { 3 array astore /vecA ED 3 array astore
/vecB ED 3 array astore /vecC ED p lfdNo [ vecA vecA vecC
vector-add vecA vecB vector-add vecC vector-add vecA vecB
vector-add ] put /lfdNo lfdNo 1 add def } repeat /p [ p {
/face exch def /n face normal-function def [ face n 1 ] [
face n -1 ] } forall ] def /f { /face exch def /P face 0
get def /N face 1 get def /mu face 2 get def /n P length
def N E dot-product mu mul 0 ge { newpath P n 1 sub get
aload pop moveto3d P { aload pop lineto3d } forall
closepath gsave /s N light dot-product mu mul 1 add 2 div
def [ 0.49803 1 0 ] s vector-scale aload pop setrgbcolor  
fill grestore stroke } if } def 1 setlinecap 1 setlinejoin
/b p /polygon-interp bsp-tree def /E get-eye cim3d
transform3d def /light [-0.25 1 0.25 0 ] normalized cim3d
transform3d def b /f traverse
%grestore3d%%If you comment in this line, then it's OK
end
gsave 0.8 SLW 0  setgray 0 setlinecap stroke  grestore 
end 
grestore

gsave
tx at Dict begin STP newpath 0.5 SLW 0 0 1  setrgbcolor 
/ArrowA { moveto } def /ArrowB { BeginArrow 2.  2.  scale
false 0.4 1.4 1.5 2. Arrow  EndArrow  } def  tx at IIIDDict
begin  [ 0 28.45274 mul 0 28.45274 mul 20 28.45274 mul 1 ]
set-eye [ 1 28.45274 mul -1 28.45274 mul 2 28.45274 mul ]
45 rotate3d -1 28.45274 mul 0 0 moveto3d 4 28.45274 mul 0
0 Alineto3d 0 -1 28.45274 mul 0 moveto3d 0 4 28.45274 mul
0 Alineto3d 0 0 -1 28.45274 mul moveto3d 0 0 4 28.45274
mul Alineto3d end  gsave 0.5 SLW 0 0 1  setrgbcolor 0
setlinecap stroke  grestore end 
grestore

So what am I doing wrong?  Specials generated by
\pst at verb are not supposed to affect the rendering of
other part of document, right?
As I commented in the above example, if I put the square
drawing code between gsave3d/grestore3d pair,
everything works OK.

Regards,
SMiyata

--------------------------------------
Start Yahoo! Auction now! Check out the cool campaign
http://pr.mail.yahoo.co.jp/auction/



More information about the PSTricks mailing list