[pstricks] Define zmaxvalue/zminvalue of a function
Herbert Voss
Herbert.Voss at FU-Berlin.DE
Sat May 19 14:02:10 CEST 2012
Am 12.05.2012 14:33, schrieb Marco Daniel:
> I am trying to use pst-solides3d to plot a function of the form z=f(x,y).
>
>
> However I don't know how to specify the maximum value of z. The bonus
> would be to jump over division by zero.
>
>
> The following example uses pgfplots and does the job. But I want to use
> pstricks ;-)
it uses more gnuplot than pgfplots ;-)
\documentclass{article}
\usepackage{pst-solides3d}
\begin{document}
\begin{pspicture}(-1,-1)(6,8)
\psset{lightsrc=viewpoint,viewpoint=50 60 30 rtp2xyz,Decran=40,}
\psSurface*[ngrid=.75 .75,axesboxed,hue=0 1,
Zmax=10,Zmin=0,hue=0 1, h=6](-3,-3)(3,2){%
2.729 x y dup mul x dup mul add
dup abs 1.e-20 lt {pop pop pop 1}{div exp} ifelse
dup 10 gt {pop 10} if }
\end{pspicture}
\end{document}
Herbert
More information about the PSTricks
mailing list