Fwd: [pstricks] PStricks and cubes

Doug Mounce mounce at u.washington.edu
Wed Jan 12 22:55:30 CET 2005


Hey, here's a horrible hack on \ThreeDPut and \PstGridThreeD.  The 
elaborate PSTricks Examples worked fine, but I wanted something simple 
that I could understand and modify.  This code compiles, with several 
errors.

I combined \ThreeDPut with \PstGridThreeDcouldn't because I couldn't 
get the hooks described in Girou's documentation to work, but I'm 
pretty-bad with understanding the whole concept of what goes before and 
after "\begin{document}" and why.  I understand a program like POVRay 
(we made some neat movies with it,) but I don't get the same sense of 
simple geometry with PSTricks.

I suppose I'll understand more with time and trouble (like how I 
struggled to force the \begin{pspicture} coordinates to overlap, or 
\rput{*89} instead of 90 because *90 put the whole page into landscape. 
  Anyway, in-case anyone else can use poorly-written code, this picture 
describes imaging interests with MRFM where we are basically working at 
the left side of the cube with small molecules in bulk samples, and our 
dream is to image the "solid" cubie of protein structure.

\documentclass{article}
\usepackage{pstricks}
\usepackage{pst-node}
\usepackage{pst-3d}
\usepackage{pst-gr3d}

\newpsobject{MyGrid}{psframe}{linestyle=dotted,dotsep=5pt}

\pagestyle{empty}

\begin{document}

\psset{unit=4,viewpoint=-2 -1 0.8}
\center

\begin{pspicture}(-1,0)(0,3)
\ThreeDput[normal=0 0 1](0,0,0){\MyGrid(2,2)}
\ThreeDput[normal=0 1 0](2,0,0){\MyGrid(2,2)}
\ThreeDput[normal=1 0 0](2,0,0){\MyGrid(2,2)}

\ThreeDput[normal=0 0 1](0,0,2){\MyGrid(2,2)}
\ThreeDput[normal=0 1 0](2,2,0){\MyGrid(2,2)}

\ThreeDput[normal=0 0 1](0,0,.67){\MyGrid(2,2)}
\ThreeDput[normal=0 0 1](0,0,1.37){\MyGrid(2,2)}

\ThreeDput[normal=0 1 0](2,.67,0){\MyGrid(2,2)}
\ThreeDput[normal=0 1 0](2,1.37,0){\MyGrid(2,2)}

\ThreeDput[normal=1 0 0](.67,0,0){\MyGrid(2,2)}
\ThreeDput[normal=1 0 0](1.37,0,0){\MyGrid(2,2)}

\rput{*89}(-1.5,-.25){small molecules}
\rput{*89}(-1,-.25){ordered materials}
\rput{*89}(-.25,-.25){proteins}

\rput{*35}(-1,2.5){bulk images}
\rput{*35}(-.25,2.5){bulk protons}
\rput{*35}(.5,2.5){single C13 labels}

\rput(1,2.25){signal}
\rput(1,1.5){sample prep}
\rput(1,.75){image}
\end{pspicture}

\begin{pspicture}(-1.75,-.2)(.2,.25)

\PstGridThreeD[unit=.56](1,1,1)
\end{pspicture}

\end{document}

Doug Mounce
http://courses.washington.edu/goodall/MRFM/
http://staff.washington.edu/mounce/




More information about the PSTricks mailing list