[pstricks] Countor lines withe pst-3dplot

Herbert Voss LaTeX at zedat.fu-berlin.de
Fri Jul 22 22:46:09 CEST 2005


Denis Vergès wrote:

> I have do draw the surface $z = 2x + 0.5y^2 + 4$. You can open :
> 
> www.fis.edu.hk/News/files/Bac%202005%20Maths%20Spec%20ES.pdf
> 
> (page 6)
> 
> How can I draw the countor lines 20-40, 60-80, 100-120 ?

that is the problem, especially for the line with z=20.
You can define some 3d nodes and then the 2d \pscurve(A)(B)...
An option z= for the 3d plot maybe a good idea.

The 3d plain is not a problem.

Herbert


\documentclass{article}

\usepackage{pstricks}%
\usepackage{pst-3dplot}%
\SpecialCoor
\begin{document}


\psscalebox{0.5}{
\begin{pspicture}(-1,-3)(23,16)
%\psset{xunit=0.5, yunit=0.1}
   \psset{Beta=20,Alpha=165,subticks=7}
 
\pstThreeDCoor[xMin=0,yMin=0,zMin=0,xMax=20,yMax=12,zMax=12,linewidth=1pt]
   \psset{linewidth=0.1pt,linecolor=gray!40}
   \pstThreeDPlaneGrid[xsubticks=5,ysubticks=6](0,0)(20,12)
 
\pstThreeDPlaneGrid[planeGrid=xz,planeGridOffset=12,xsubticks=5,ysubticks=6](0,0)(20,12)
   \pstThreeDPlaneGrid[planeGrid=yz,xsubticks=5,ysubticks=6](0,0)(12,12)
   \psset{xPlotpoints=20,yPlotpoints=12,drawStyle=xyLines,%
	linecolor=black,linewidth=1.5pt}
   \psplotThreeD(0,20)(0,12){ x dup add y dup mul 2 div add 4 add 10 
div}  % 10 div only for scaling
% 
\pstThreeDCoor[xMin=0,yMin=0,zMin=0,xMax=20,yMax=12,zMax=12,linewidth=1pt]
\end{pspicture}}
\end{document}




More information about the PSTricks mailing list