[pstricks] Spurious spaces and psplotThreeD?

Herbert Voss Herbert.Voss at alumni.TU-Berlin.DE
Wed Feb 9 17:26:51 CET 2005



Richard Hensh wrote:
> That solved the problem.

attached an example, what is possible with this new
version, but not really yet tested for all macros,
which should in general accept the parameters
RotX=...,RotY=...,RotZ=...     any angle
and RotSequence=...            xyz|xzy|...

Herbert



\documentclass{article}
  \usepackage{pstricks,pst-grad,pst-3dplot}%
\begin{document}


\psset{unit=2,linewidth=1.5pt}
\begin{pspicture}(-2,-1.5)(2,2.5)%
   \pstThreeDCoor[xMin=0,xMax=2,yMin=0,yMax=2,zMin=0,zMax=2]%
   \pstThreeDBox[RotX=90,RotY=90,RotZ=90,%
     linecolor=red](0,0,0)(.5,0,0)(0,1,0)(0,0,1.5)
   \pstThreeDBox[RotSequence=xzy,RotX=90,RotY=90,RotZ=90,%
     linecolor=yellow](0,0,0)(.5,0,0)(0,1,0)(0,0,1.5)
   \pstThreeDBox[RotSequence=zyx,RotX=90,RotY=90,RotZ=90,%
     linecolor=green](0,0,0)(.5,0,0)(0,1,0)(0,0,1.5)
   \pstThreeDBox[RotSequence=zxy,RotX=90,RotY=90,RotZ=90,%
     linecolor=blue](0,0,0)(.5,0,0)(0,1,0)(0,0,1.5)
   \pstThreeDBox[RotSequence=yxz,RotX=90,RotY=90,RotZ=90,%
     linecolor=cyan](0,0,0)(.5,0,0)(0,1,0)(0,0,1.5)
   \pstThreeDBox[RotSequence=yzx,RotX=90,RotY=90,RotZ=90,%
     linecolor=magenta](0,0,0)(.5,0,0)(0,1,0)(0,0,1.5)
   \pstThreeDBox[fillstyle=gradient,RotX=0](0,0,0)(.5,0,0)(0,1,0)(0,0,1.5)
   \pstThreeDCoor[xMin=0,xMax=2,yMin=0,yMax=2,zMin=0,zMax=2]%
\end{pspicture}%

\begin{pspicture}(-2,-1.5)(2,2.5)%
   \pstThreeDCoor[xMin=0,xMax=2,yMin=0,yMax=2,zMin=0,zMax=2]%
   \pstThreeDBox(0,0,0)(.5,0,0)(0,1,0)(0,0,1.5)
   \pstThreeDBox[RotX=90,linecolor=red](0,0,0)(.5,0,0)(0,1,0)(0,0,1.5)
 
\pstThreeDBox[RotX=90,RotY=90,linecolor=green](0,0,0)(.5,0,0)(0,1,0)(0,0,1.5)
 
\pstThreeDBox[RotX=90,RotY=90,RotZ=90,linecolor=blue](0,0,0)(.5,0,0)(0,1,0)(0,0,1.5)
\end{pspicture}%

\psset{unit=1cm,linewidth=1.5pt}

\begin{pspicture}(-1,-2)(10,10)
   \psset{Beta=20,Alpha=160,subticks=7}
   \pstThreeDCoor[xMin=0,yMin=0,zMin=0,xMax=7,yMax=7,zMax=7,linewidth=1pt]
   \psset{linewidth=0.1pt,linecolor=gray}
   \pstThreeDPlaneGrid(0,0)(7,7)
   \pstThreeDPlaneGrid[planeGrid=xz,planeGridOffset=7](0,0)(7,7)
   \pstThreeDPlaneGrid[planeGrid=yz](0,0)(7,7)
   {
   \psset{linewidth=1.5pt}
%  \pscustom[fillstyle=gradient]{
   \pscustom[fillstyle=gradient,plotstyle=curve]{
 
\psplotThreeD[xPlotpoints=200,yPlotpoints=1,drawStyle=xLines](0,7)(0,0){%
        x dup mul y dup mul 2 mul add x 6 mul sub y 4 mul sub 3 add 10 div }
 
\psplotThreeD[xPlotpoints=1,yPlotpoints=200,drawStyle=yLines](7,7)(0,7){%
        x dup mul y dup mul 2 mul add x 6 mul sub y 4 mul sub 3 add 10 
div }%
 
\psplotThreeD[xPlotpoints=200,yPlotpoints=1,drawStyle=xLines](7,0)(7,7){%
        x dup mul y dup mul 2 mul add x 6 mul sub y 4 mul sub 3 add 10 
div }%
 
\psplotThreeD[xPlotpoints=1,yPlotpoints=200,drawStyle=yLines](0,0)(7,0){%
        x dup mul y dup mul 2 mul add x 6 mul sub y 4 mul sub 3 add 10 
div }%
   }
   }
   \pstThreeDPlaneGrid[planeGrid=yz,planeGridOffset=7](0,0)(7,7)
\end{pspicture}


\begin{pspicture}(-6,-2)(4,7)
   \psset{Beta=10,Alpha=30,subticks=7}
   \pstThreeDCoor[xMin=0,yMin=0,zMin=0,xMax=7,yMax=7,zMax=7,linewidth=1.5pt]
   \psset{linewidth=0.1pt,linecolor=gray}
   \pstThreeDPlaneGrid(0,0)(7,7)
   \pstThreeDPlaneGrid[planeGrid=xz](0,0)(7,7)
   \pstThreeDPlaneGrid[planeGrid=yz](0,0)(7,7)
   \pscustom[linewidth=0.1pt,plotstyle=curve,%
     fillstyle=gradient,gradbegin=gray,gradend=white,gradmidpoint=0.5]{
     \psset{xPlotpoints=200,yPlotpoints=1}
     \psplotThreeD(0,7)(0,0){%
        x dup mul y dup mul 2 mul add x 6 mul sub y 4 mul sub 3 add 10 div }
     \psset{xPlotpoints=1,yPlotpoints=200,drawStyle=yLines}
     \psplotThreeD(7,7)(0,7){%
        x dup mul y dup mul 2 mul add x 6 mul sub y 4 mul sub 3 add 10 div }
     \psset{xPlotpoints=200,yPlotpoints=1,drawStyle=xLines}
     \psplotThreeD(7,0)(7,7){%
        x dup mul y dup mul 2 mul add x 6 mul sub y 4 mul sub 3 add 10 div }
     \psset{xPlotpoints=1,yPlotpoints=200,drawStyle=yLines}
     \psplotThreeD(0,0)(7,0){%
        x dup mul y dup mul 2 mul add x 6 mul sub y 4 mul sub 3 add 10 div }
   }
   \pstThreeDPlaneGrid[planeGrid=xz,planeGridOffset=7](0,0)(7,7)
   \pstThreeDPlaneGrid[planeGrid=yz,planeGridOffset=7](0,0)(7,7)
\end{pspicture}



\end{document}



-- 
http://TeXnik.de/
http://PSTricks.de/
ftp://ftp.dante.de/tex-archive/info/math/voss/Voss-Mathmode.pdf
http://www.dante.de/faq/de-tex-faq/
http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes




More information about the PSTricks mailing list