# [pstricks] 3D surface on non rectangular domain

Herbert Voss Herbert.Voss at FU-Berlin.DE
Thu Mar 2 09:11:55 CET 2017

Am 01.03.2017 um 21:34 schrieb leon.free at free.fr:
> I did not know about the r parameter for \psSurface* (I could not find it in the pst-solides3d doc). It seems it controls the radius of the domain (ball) on which the surface is drawn. Are there some extra parameters that control the center of the ball? Moreover, when using r=1 how does this interact with the plotting range (xmin,ymin)(xmax,ymax)? Working with your example, the range seems to have no effect on the plot (I even used (0,0)(0,0) instead of (-1,-1)(1,1)).

for  \psSurface* (star version) only r is valid and for
\psSurface only the x-y area.
You can change the origin by using \rput:

\documentclass{article}
\usepackage[landscape]{geometry}
\usepackage{pst-solides3d}
\begin{document}

\psset{viewpoint=50 30 30 rtp2xyz,Decran=100,lightsrc=viewpoint}
\begin{pspicture}(-5,-4)(6,6)
\psSolid[object=grille,base=-2 2 -2 2,action=draw]%
\axesIIID(0,0,0)(2,2,1)
\psSurface*[
fillcolor=cyan,r=1,
ngrid=.25 .25,incolor=yellow,grid,
algebraic](-1,-1)(1,1){ e^(x*y) }
\psSolid[object=cylindre,r=1,h=2,action=draw,ngrid=1 18]
\psPoint(0,0,1){O}
\psPoint(0,0,3){Z}
\psline{->}(O)(Z)
\uput[r](Z){$z$}
\psPoint(0.5,0.5,0){C}
\psdot[linecolor=red,dotstyle=x,dotscale=2](C)
\end{pspicture}
%
\begin{pspicture}(-5,-4)(6,6)
\psSolid[object=grille,base=-2 2 -2 2,action=draw]%
\axesIIID(0,0,0)(2,2,1)
\psPoint(0.5,0.5,0){Origin}
\rput(Origin){%
\psSurface*[
fillcolor=cyan,r=1,
ngrid=.25 .25,incolor=yellow,grid,
algebraic](-1,-1)(1,1){ e^(x*y) }}
\psSolid[object=cylindre,r=1,h=2,action=draw,ngrid=1 18](0.5,0.5,0)
\psPoint(0,0,1){O}
\psPoint(0,0,3){Z}
\psline{->}(O)(Z)
\uput[r](Z){$z$}
\psPoint(0.5,0.5,0){C}
\psdot[linecolor=red,dotstyle=x,dotscale=2](C)
\end{pspicture}

\end{document}

Herbert

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bildschirmfoto vom 2017-03-02 09-11-27.png
Type: image/png
Size: 61606 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20170302/2b530da5/attachment-0001.png>