[pstricks] axesboxed with surfaceparametree in solides3d
Herbert Voss
Herbert.Voss at FU-Berlin.DE
Sat Aug 21 08:41:38 CEST 2010
Am 20.08.2010 22:48, schrieb Zbigniew Nitecki:
> I would like to do it so the top of the surface is horizontal---since the cross-section is not a circle,
> r=1 will give me height 4 along the x-axis but height 1 along the y-axis. Is there an equivalent to
> It -5 It{pop -5}fi which cuts the surface off if the value is above a given one, instead of below it (in my case, 4)? This problem was why I initially used surfaceparametree with a variant of polar coordinates.
\documentclass{article}
\usepackage{pst-solides3d}
\pagestyle{empty}
\begin{document}
\begin{pspicture}(-4,-5)(6,8)
\psset{lightsrc=viewpoint,viewpoint=50 60 30 rtp2xyz,Decran=60}
\psSurface[ngrid=.2 .2,incolor=yellow,linewidth=0.5\pslinewidth,
r = 2,fillcolor=cyan,
axesboxed,
Zmin=0,Zmax=4](-1,-2)(1,2){
4 x dup mul mul y dup mul add
dup 4 gt {pop 4} if }
\end{pspicture}
\end{document}
dup => copy the z value
z > 4 => compare it with 4
pop 4 => delete the z value and put 4 on the stack
Herbert
More information about the PSTricks
mailing list