PSTricks

Lundi 2 Juin 2008

/pst-solides3d/sections/coupe_par_un_plan.png
LaTeX PDF

Retour, répertoire : /pst-solides3d/sections

coupe_par_un_plan.pst
%% Coupe d'un cone
%% Plan parallele a l'axe
%% Manuel Luque
\begin{center}
\begin{pspicture}(-5,-6)(8,7)
\psset{SphericalCoor=true,viewpoint=50 -30 20,Decran=50}
\makeatletter
\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}%
\makeatother
\psset{lightsrc=Lx Ly Lz}
\psframe[fillstyle=solid,fillcolor=gray!50](-5,-6)(8,7)%
\psSolid[object=grille,base=-4 4 -4 8,linecolor={[rgb]{0.72 0.72 0.5}}](0,0,-5)
\psset{solidmemory}
\psSolid[object=cone,
   r=3,h=5,
   ngrid=12 24,
   plansepare={[1 0 0 -1]},
   fillcolor={[rgb]{0.5 0.72 0.5}},
   name=part,
   action=none](0,0,-5)
\psSolid[object=load,% action=draw,numfaces=all,
  fcol=241 (0.5 0.7 0.5 setrgbcolor),
   load=part1](0,0,0)
\psSolid[object=load,RotZ=90,
   load=part0](0,5,0)
\codejps{
/cone2
5 3 0 [12 24] newcone dup solidfacesreverse
dup  (0.7 1 0.7 setrgbcolor) outputcolors
 def}
\psSolid[object=load,plansepare={[1 0 0 -1]},
   load=cone2,action=none,name=haut](0,0,0)
\psSolid[object=load,% action=draw,numfaces=all,
  fcol=241 (0.5 0.7 0.5 setrgbcolor),
   load=haut1](0,0,0)
\psSolid[object=load,RotZ=90,
   load=haut0](0,5,0)
\psSolid[object=grille,RotY=90,base=-5 5 -3 3,ngrid=8 6,action=draw,linecolor=red](1,0,0)
\axesIIID[linecolor=blue](0,0,5)(4,4,6)
\end{pspicture}
\end{center}
\end{document}

139439 — durée de production de la page: 0.4754 s