[pstricks] Re : Re : plansepare with a surface

Manuel Luque mluque5130 at aol.com
Sun Feb 27 05:57:59 CET 2011


Dear Markus,

Sorry. Second try. I'm not sure I understood. It is more complicated. Is that you want this?
 

 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass{article}
\usepackage{pst-solides3d}
\begin{document}

\begin{center}
\psset{lightsrc=viewpoint,viewpoint=50 70 25 rtp2xyz,Decran=50}
\begin{pspicture}(-5,-3)(6,6)
\psSolid[object=grille,base=-4 4 -4 4,action=draw]%
\pstVerb{
    /nE 15 def %% nb d’etages
    /nM 18 def %% diviseur de 180, nb de meridiens
    /Zmax 4 def %% hauteur 0<z<4
    /sommets [
    0 1 nE {%
     /zP exch def % z= h/a*k
     [ % nombre de sommets sur un étage
      0 1 nM {
     /iM exch def
     /radius 4 Zmax nE div zP mul sub sqrt 2 mul def
    [180 nM idiv iM mul 180 add cos radius mul
     180 nM idiv iM mul 180 add sin radius mul
     Zmax nE div zP mul
     ]
     } for
     ]
     }for
     ] def
     /NbreEtages sommets length def
     /NombreSommetsEtage sommets 0 get length def
     /tableau_des_sommets [
     0 1 NbreEtages 2 sub { /i exch def
      0 1 NombreSommetsEtage 2 sub {/k exch def
         sommets i get k get aload pop
         sommets i get k 1 add get aload pop
         sommets i 1 add get k 1 add get aload pop
         sommets i 1 add get k get aload pop
       }for
       }for
       ] def
     /NbrePoints tableau_des_sommets length 3 div cvi def
     /Faces {
     0 4 NbrePoints 4 sub {/N exch def
      [ N
       N 1 add
       N 2 add
       N 3 add
      ]
      } for
      } def
   /Sommets {tableau_des_sommets aload pop} def
       }%
\psSolid[object=new,fillcolor=red!50,incolor=yellow,
    hollow,
    sommets=Sommets,
    faces={Faces}]%
\defFunction[algebraic]{parabel}(t){t}{0}{-1/4*t^2+4}
\psSolid[object=courbe,
        function=parabel,range=0 4,
        r=0,linecolor=red,
        linewidth=2pt]%
\gridIIID[Zmin=0,Zmax=4,spotX=r](-4,4)(-4,4)
 \end{pspicture}
\end{center}
\end{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


 

 Best regards,

M.L.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20110226/a5dc98bd/attachment.html>


More information about the PSTricks mailing list