Retour

octahedron_09.tex

Télécharger le fichier Fichier PDF
Image PNG
\documentclass{article}
\usepackage{pst-solides3d}
\makeatletter
\def\lightsource{
\pstVerb{\pst@solides@viewpoint
/PhI exch def /ThetA exch def /Dist exch def
/Lx Dist ThetA cos mul PhI cos mul def
/Ly Dist ThetA sin mul PhI cos mul def
/Lz Dist PhI sin mul def}%
\psset{lightsrc=Lx Ly Lz}
}
\makeatother
\begin{document}
\pagestyle{empty}
\begin{center}
\begin{pspicture}(-4,-4)(4,4)
\psset{SphericalCoor,viewpoint=100 20 10,Decran=100}
\pstVerb{/radius 4 def
         /edge_cube radius 4 mul 3 div def
         /dot_axes edge_cube 2 div def}%
\lightsource
\psSolid[object=octahedron,
   a=radius ,
   trunc=all,
   hue=.5 .6,
   trunccoeff=.3333,hollow,incolor=yellow!50,
   action=draw**,rm=8 9 10 11 12 13]
%\psSolid[object=octahedron,
%   a=radius,linecolor=gray,
%   action=draw]
\psSolid[object=cube,linecolor=red,
   a=edge_cube,
   action=draw]
\axesIIID(dot_axes,dot_axes,dot_axes)(5,5,5)
\end{pspicture}
\end{center}
\end{document}