[pstricks] 3D Clipping
Herbert Voss
LaTeX at zedat.fu-berlin.de
Sun Sep 25 16:00:43 CEST 2005
geotal wrote:
> Thanks. pst-vue3d is excellent.
indeed
> Now instead of a sphere,
> I would like to plot the circular paraboloid f(x,y) = x^2 + y^2,
> clipped (bounded) by the plane z = 1, which resembles a bowl, close to a
> semi-sphere.
>
> I have looked at the code of the sphere and semi-sphere in pst-vue3d to
> see if I could define the paraboloid but it is
> beyond me.
a parametrical plot with a limited z value is easy
x(t,u) = a sqrt(u/h) cos t
y(t,u) = a sqrt(u/h) sin t
z(t,u) = u
u=[0;1], t=[0;360) a is the radius at the height h
\documentclass[12pt]{article}
\usepackage{pst-3dplot}
\begin{document}
\psset{xunit=5cm,yunit=5cm}
\begin{pspicture}(-1,-1)(1,1)
\pstThreeDCoor[xMax=1,yMax=1,zMin=0.1,zMax=2]
\pstVerb{
/height 1 def
/radius 1 def
}
\parametricplotThreeD[yPlotpoints=50,plotstyle=curve](0,360)(0,1){%
radius u height div sqrt mul t cos mul
radius u height div sqrt mul t sin mul
u }
\end{pspicture}
\end{document}
Herbert
More information about the PSTricks
mailing list