[pstricks] plansepare with a surface

Markus Krebs markuskrebs at web.de
Fri Feb 25 20:15:13 CET 2011


Dear All!

I have to draw a frustum of a cone inside a paraboloid. I want to cut 
the parapoloid into two pieces along the red line (xz-plane).

The frustum of a cone should be visible inside.

Here is my minimal example - all by cut & paste out of 
pst-solides3d.doc. There is no output after minutes.

For drawing the parts of the paraboloid I have to add something like

\psSolid[object=load,
load=firstSlice1,
]

Thanks for any help in advance!

Markus

MINIMAL EXAMPLE

\documentclass{article}
\usepackage{pst-solides3d,pstricks-add}
\begin{document}
\begin{center}
\psset{lightsrc=viewpoint,viewpoint=50 60 25 rtp2xyz,Decran=50}
\begin{pspicture}(-5,-3)(6,6)

\psset{solidmemory}
\psSolid[object=grille,base=-4 4 -4 4,action=draw]%

\psSolid[%
object=tronccone,
r0=4,r1=1.82,h=3.170,
fillcolor=cyan,ngrid=40 40,
mode=4](0,0,0)%

\defFunction[algebraic]{f}(x,y)
     {-1/4*(x^2+y^2)+4  }%{ pop 0 } if
     {}
     {}

\psSolid[object=surface*,
     r = 4,
     function = f,
     base = -4 4 -4 4,
     ngrid=1. .5,
     incolor=yellow,linewidth=0.5\pslinewidth,
     hue=0 1,action=draw**,opacity=0.75,axesboxed,Zmin=0,Zmax=4,
     plansepare={[0 0 1 -2]},
     name=firstSlice,
     action=none
     ]

\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}


More information about the PSTricks mailing list