# [pstricks] drawing level curves with pst-3dplot

In-Sung Cho ischo2k at gmail.com
Fri Feb 16 12:03:20 CET 2007

Hi,

I am looking for a trick to draw level curves on the graph of a
function and its projection onto the plane, for example, with the
funciton $z=\sqrt{xy}$ or any other function.

Specifically, I want to draw the level curve $1=\sqrt{xy}$ on the xy
plane and the same thing up on the graph itself.

I am working with the following code:

\begin{pspicture}(-1.2,-1)(3.5,2.5)\scriptsize%\psgrid
\psset{unit=1.2}
\psset{Alpha=150,Beta=15}%Alpha=60
\def\Fxy{x y mul sqrt}
\psplotThreeD[plotstyle=curve,xPlotpoints=20,yPlotpoints=30,%
drawStyle=xyLines,linecolor=lightgray](0,3)(0,3){\Fxy}
\psplotThreeD[plotstyle=curve,xPlotpoints=20,yPlotpoints=30,%
drawStyle=xyLines](1,1)(0,3){\Fxy}
\pstThreeDDot[drawCoor=true](1,1,1)  \pstThreeDDot(1,1,0)
\pstThreeDDot[drawCoor=true](2,2,2)  \pstThreeDDot(2,2,0)
\pstPlanePut[plane=yz](2,2.1,0){$(x,y)=(2,2)$}
\pstPlanePut[plane=yz](2,2.1,2){$f(x,y)=2$}
\pstThreeDCoor[xMin=-.5,xMax=3.2,yMin=-.15,yMax=3.2,zMin=-.15,zMax=2]
\end{pspicture}

I hope there's a trick that I am looking for.

In-Sung