# [pstricks] Opaque three dimensional surfaces.

Kirk Blazek blazek at math.washington.edu
Thu Feb 16 21:48:15 CET 2006

	I recently started using the pst-3dplot package, and I can't figure out
how to make parameterized surface drawings opaque.  This came up in an
example where I wanted to draw a sphere where the top was chopped off.
This is the code I used: (the only package that needs to be called is
pst-3dplot)

\psset{unit=5mm,Beta=20,Alpha=70}
\begin{pspicture}(-6,-6)(6,6)
\parametricplotThreeD[%
yPlotpoints=10](0,360)(36.869898,180){%
t cos u sin mul 5 mul
t sin u sin mul 5 mul
u cos 5 mul%
}
\parametricplotThreeD[%
yPlotpoints=30%
](36.869898,180)(0,360){%
u cos t sin mul 5 mul
u sin t sin mul 5 mul
t cos 5 mul%
}
\pstThreeDCoor[linecolor=black,xMin=-6,xMax=12,yMin=-6,yMax=6,zMin=-6,zMax=6]
\end{pspicture}

What I would like is for the front of the sphere to be visible, and the
interior of the back of the sphere to be visible through the opening,
but the rest to be obscured.
The pst-vue3d package seems to have the capability to draw spheres in
this opaque way, but I having two problems with this.  First of all, I
do not understand the angle parameters properly in the
\PortionSphereThreeD command.  So I can't figure out how to make it chop
off the top of the sphere.  The documentation doesn't seem to indicate
the acceptable ranges of PHI, THETA, DeltaPHI, or DeltaTHETA, and
trial-and-error has met with little success.
The second problem is that even if I can figure out how to do this with
a sphere, I am at a loss to do the same thing for a more general
parameterized surface.  In other words, I don't know how to make a
parameterized surface draw over and cover up things behind it, since it
doesn't actually draw things as grids, but as curves.
If anyone can help me with either of these problems, I would greatly
appreciate it.

-Kirk Blazek