\section{Positioning a solid} \subsection{\Index{Translation}} The following command~ \texttt{\Lcs{psSolid}[object=cube,+\textit{options}](x,y,z)} shifts the centre of the cube to the point with the coordinates $\mathtt{(x,y,z)}$. The next example will copy the cube with edge length of 1 \begin{pspicture}(-0.5,-0.5)(.5,.5) \psset{Decran=40,viewpoint=50 35 35 rtp2xyz,a=1,lightsrc=50 30 20} \psset{fillcolor=yellow,mode=3} \psSolid[object=cube](0.5,0.5,0.5)% c1 \end{pspicture} to the points with the coordinates $\mathtt{(0.5,0.5,0.5)}$, $\mathtt{(4.5,0.5,0.5)}$ etc. so that the copied cubes setup the vertices of a new cube with the edge length 5. \begin{center} \begin{pspicture}(-4,-5)(5,5) \psframe(-4,-5)(5,5) %\psset{SphericalCoor,Decran=3,viewpoint=10 35 35,a=1,lightsrc=50 20 10} \psset{Decran=40,viewpoint=50 35 35 rtp2xyz,a=1,lightsrc=50 30 20} \psSolid[object=grille,base=0 6 0 6,fillcolor=gray!40]%% \psSolid[object=grille,base=0 6 0 6,RotY=90,fillcolor=gray!30](0,0,6)% \psSolid[object=grille,base=0 6 0 6,RotX=-90,fillcolor=gray!20](0,0,6)% \psPoint(1,0.5,0.5){c11} \psPoint(0.5,0.5,1){c12} \psPoint(0.5,1,0.5){c13} \psPoint(4.5,4.5,1){c21} \psPoint(4,4.5,0.5){c22} \psPoint(4.5,4,0.5){c23} \psPoint(4,0.5,0.5){c41} \psPoint(4.5,0.5,1){c42} \psPoint(4.5,1,0.5){c43} \psPoint(0.5,4,0.5){c51} \psPoint(0.5,4.5,1){c52} \psPoint(1,4.5,0.5){c53} \psPoint(0.5,0.5,4){c61} \psPoint(0.5,1,4.5){c62} \psPoint(1,0.5,4.5){c63} \psPoint(4,0.5,4.5){c71} \psPoint(4.5,1,4.5){c72} \psPoint(4.5,0.5,4){c73} \axesIIID(1,1,1)(6,6,6) {\psset{fillcolor=yellow,mode=3} \psSolid[object=cube](0.5,0.5,0.5)% c1 \psline[linestyle=dashed,linecolor=red,linewidth=1.5pt](c11)(c41) \psline[linestyle=dashed,linecolor=red,linewidth=1.5pt](c12)(c61) \psline[linestyle=dashed,linecolor=red,linewidth=1.5pt](c13)(c51) \psSolid[object=cube](4.5,0.5,0.5) \psSolid[object=cube](0.5,4.5,0.5) \psSolid[object=cube](0.5,0.5,4.5) \psSolid[object=cube](4.5,4.5,4.5) \psSolid[object=cube](4.5,0.5,4.5) \psSolid[object=cube](4.5,4.5,0.5) \psSolid[object=cube](0.5,4.5,4.5)} \psSolid[object=grille,base=0 5 0 5,action=draw,linecolor=blue!70,linewidth=1.2pt](0,0,5)% \psSolid[object=grille,base=0 5 0 5,action=draw,linecolor=blue!70,RotY=90,linewidth=1.2pt](5,0,5)% \psSolid[object=grille,base=0 5 0 5,action=draw,RotX=-90,linecolor=blue!70,linewidth=1.2pt](0,5,5)% \end{pspicture} \end{center} \begin{verbatim} \psset{fillcolor=yellow,mode=3} \psSolid[object=cube](0.5,0.5,0.5) \psSolid[object=cube](4.5,0.5,0.5) \psSolid[object=cube](0.5,4.5,0.5) \psSolid[object=cube](0.5,0.5,4.5) \psSolid[object=cube](4.5,4.5,4.5) \psSolid[object=cube](4.5,0.5,4.5) \psSolid[object=cube](4.5,4.5,0.5) \psSolid[object=cube](0.5,4.5,4.5) \end{verbatim} \subsection{Rotation} The \Index{rotation} is effected around the three axes $Ox$, $Oy$ and $Oz$. Let's take a cuboid as an example, \begin{pspicture}(-1,-0.2)(1,.5) \psset{Decran=40,viewpoint=50 35 35 rtp2xyz,a=2,b=3,c=1,lightsrc=50 30 30} \psset{fillcolor=yellow,unit=0.5, fcol= 0 (Apricot) 1 (Lavender) 2 (SkyBlue) 3 (LimeGreen) 4 (OliveGreen) 5 (Yellow) 6 (Bittersweet)} \psSolid[object=parallelepiped](0.5,0.5,0.5)% \end{pspicture} which will be rotated seperately around the axes $Ox$, $Oy$ and $Oz$. \begin{multicols}{4} \psset{Decran=40,viewpoint=50 35 35 rtp2xyz,a=2,b=3,c=1} \psset{unit=0.5, fcol= 0 (Apricot) 1 (Lavender) 2 (SkyBlue) 3 (LimeGreen) 4 (OliveGreen) 5 (Yellow) 6 (Bittersweet), object=parallelepiped} \setlength{\columnseprule}{1pt} \centerline{ \begin{pspicture}(-2.75,-2.5)(2.95,2.5) \psframe(-2.75,-2.5)(2.95,2.5) \psSolid%% \axesIIID(1,1.5,1)(3,3,2) \end{pspicture}} \columnbreak \centerline{ \begin{pspicture}(-2.75,-2.5)(2.95,2.5) \psframe(-2.75,-2.5)(2.95,2.5) \psSolid[RotZ=60]%% \psSolid[action=draw,linewidth=0.5\pslinewidth]%% \axesIIID(1,1.5,1)(2,3,2) \end{pspicture}} \centerline{\texttt{[RotZ=60]}} \columnbreak \centerline{% \begin{pspicture}(-2.75,-2.5)(2.95,2.5)) \psframe(-2.75,-2.5)(2.95,2.5) \psSolid[RotX=30]%% \psSolid[action=draw,linewidth=0.5\pslinewidth]%% \axesIIID(1,1.5,1)(2,3,2) \end{pspicture}} \centerline{\texttt{[RotX=30]}} \columnbreak \centerline{% \begin{pspicture}(-2.75,-2.5)(2.95,2.5) \psframe(-2.75,-2.5)(2.95,2.5) \psSolid[RotY=45]%% \psSolid[action=draw,linewidth=0.5\pslinewidth]%% \axesIIID(1,1.5,1)(2,3,2) \end{pspicture}} \centerline{\texttt{[RotY=-45]}} \end{multicols} \endinput