\documentclass[a4paper]{article}
\usepackage{pst-solides3d,pst-node,arrayjob,multido}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\pagestyle{empty}

\makeatletter
\def\psPoint{\def\pst@par{}\pst@object{psPoint}}
\def\psPoint@i(#1)#2{{% coordonnées cartésiennes
  \begin@ClosedObj
\pnode(!
    \tx@optionssolides
    SolidesDict begin
    #1
   3dto2d cm_1 exch cm_1 exch
   end){#2}%
   \end@ClosedObj
  }\ignorespaces%
}
\makeatother

\newarray\colors
\readarray{colors}{%
Apricot&Aquamarine%
&Bittersweet&Black&Blue&BlueGreen&BlueViolet&BrickRed&Brown&BurntOrange%
&CadetBlue&CarnationPink&Cerulean&CornflowerBlue&Cyan&Dandelion&DarkOrchid%
&Emerald&ForestGreen&Fuchsia&Goldenrod&Gray&Green&GreenYellow&JungleGreen%
&Lavender&LimeGreen&Magenta&Mahogany&Maroon&Melon&MidnightBlue&Mulberry%
&NavyBlue&OliveGreen&Orange&OrangeRed&Orchid&Peach&Periwinkle&PineGreen%
&Plum&ProcessBlue&Purple&RawSienna&Red&RedOrange&RedViolet&Rhodamine&RoyalBlue%
&RoyalPurple&RubineRed&Salmon&SeaGreen&Sepia&SkyBlue&SpringGreen&Tan&TealBlue%
&Thistle&Turquoise&Violet&VioletRed&White&WildStrawberry&Yellow&YellowGreen&YellowOrange}


\edef\colorfaces{}%
\multido{\i=0+1}{67}{%
 \checkcolors(\i)
\xdef\colorfaces{\colorfaces\i\space(\cachedata)\space}}
\title{cube maillé et anneau cylindrique}
\date{22 septembre 2\,006}
\author{JPV \& ML}
\begin{document}
\maketitle

\begin{enumerate}
  \item test cube avec maillage
\end{enumerate}

\begin{center}
%%
\begin{pspicture}(-5,-5)(5,5)
\psframe(-5,-5)(5,5)
\psset[pst-solides3d]{viewpoint=50 40 20,Decran=50,lightsrc=10 10 10}
\psSolid[a=8,object=cubemaillage](0,0,0)
%\psSolid[a=8,object=cube,linewidth=2pt,action=draw](0,0,0)
\psPoint(0 0 0){O}
%\uput[r](O){$O$}
\psPoint(0 0 4){Ak}
\psPoint(0 0 8){Az}
\uput[u](Az){$z$}
\psPoint(4 0 0){Ai}
\psPoint(8 0 0){Ax}
\uput[u](Ax){$x$}
\psPoint(0 4 0){Aj}
\psPoint(0 8 0){Ay}
\uput[dr](Ay){$y$}
\psPoint(4 -4 0){A1}
\psPoint(4 4 0){A2}
\psPoint(-4 4 0){A3}
\psPoint(-4 -4 0){A4}
\uput[dr](Ay){$y$}
%\psline[linestyle=dashed](O)(Ai)
%\psline[linestyle=dashed](O)(Aj)
%\psline[linestyle=dashed](O)(Ak)
\psline[linecolor=green,arrowsize=2mm,arrowinset=0.2]{->}(Aj)(Ay)
\psline[linecolor=blue,arrowsize=2mm,arrowinset=0.2]{->}(Ai)(Ax)
\psline[linecolor=red,arrowsize=2mm,arrowinset=0.2]{->}(Ak)(Az)
\psdot[linecolor=green,dotsize=5pt](Aj)
\psdot[linecolor=blue,dotsize=5pt](Ai)
\psdot[linecolor=red,dotsize=5pt](Ak)
\end{pspicture}
\end{center}
\begin{center}
%%
\begin{pspicture}(-5,-5)(5,5)
\psframe(-5,-5)(5,5)
\psset[pst-solides3d]{viewpoint=50 10 20,Decran=30,lightsrc=10 20 20,grid=false}
\psSolid[a=8,object=cubemaillage,fcol=\colorfaces,RotY=45,RotX=30](0,0,0)
\end{pspicture}
\end{center}

\begin{center}
%%
\begin{pspicture}(-5,-2)(5,5)
\psframe(-5,-2)(5,5)
\psset[pst-solides3d]{viewpoint=50 10 20,Decran=30,lightsrc=10 20 20}
\psSolid[object=cylindricalring,ngrid=2 32,h=3,r1=8,r0=6,RotX=10](0,0,0)
\end{pspicture}
\end{center}
\end{document}
