[pstricks] projections onto different planes in one picture

Herbert Voss Herbert.Voss at FU-Berlin.DE
Mon Aug 30 09:15:38 CEST 2010


Am 29.08.2010 20:52, schrieb Zbigniew Nitecki:
> Is it possible to
> 1. Create within one picture projections onto several different planes, and if so
> 2. to fuse these?
> 
> I want (eventually) to draw a paraboloid (say $4x^2+y^2=z$) together with three planes, say the xz and yz planes as well as the plane z=2.  In each plane I would like to draw the curve of intersection of the given plane with the paraboloid.  I want to make the planes different colors, and to color the curves of intersection with the surface correspondingly.
> 
> The syntax for projections appears to involve a \psset{plan=??} command, after the definition of the plane of projection, but before the \psprojection command.  It looks to me as if the first such declaration supersedes all others.  Thus with the code below, I get the (blue) xz=-plane and the curve on it, but then the (red) yz=-plane appears with only the part of it that projects onto the already declared xz plane.  If I comment out all the commands giving the xz plane and its curve of intersection with the surface, I get the full (red) yz plane.  However (and this is certainly a separate issue) the (red) curve of intersection I have drawn on this does not appear.
> 
> How can I get both planes, each with its curve, to both appear in a single pspicture, and even better, to have them fuse, so that implicitly it is clear how they intersect with each other?

As far as I know, it is not possible. You can only draw the
projections after fusing the two planes.

\documentclass[11pt]{article}
\usepackage{pst-solides3d}

\begin{document}
\begin{pspicture}(-3,-1.5)(3,5.5)
\psset{unit=0.35,lightsrc=40 50 50,viewpoint=18 65 30 rtp2xyz,solidmemory}
\psSolid[object=plan,definition=equation,args={[1 0 0 0] 90},base=-2 2
-0.5 4.5,
	fillcolor=blue!10,name=xplane,ngrid=10 10,action=none]
\psSolid[object=plan,definition=equation,args={[0 1 0 0]},base=-2 2 -0.5
4.5,
	fillcolor=red!10,name=yplane,ngrid=10 10,action=none]
\psSolid[object=fusion,base=xplane_s yplane_s]
\composeSolid%
%
\psSolid[object=plan,definition=equation,args={[1 0 0 0] 90},base=-2 2
-0.5 4.5,
	name=xplane,ngrid=10 10,action=none]
\defFunction[algebraic]{xcutfcn}(y){y*y}{}{}%
\psProjection[object=courbe,
	linecolor=blue,linewidth=2pt,
    plan=xplane,range=-2 2,resolution=720,function=xcutfcn,
    action=draw**]
\psSolid[object=plan,definition=equation,args={[0 1 0 0]},base=-2 2 -0.5
4.5,
	name=yplane,linewidth=0.5pt,ngrid=10 10,action=none]
\defFunction[algebraic]{ycutfcn}(x){4*x*x}{}{}%
\psProjection[object=courbe,
	linecolor=red,linewidth=2pt,
    plan=yplane,range=-1 1,resolution=720,function=ycutfcn,action=draw**]
\end{pspicture}

\end{document}

Herbert


More information about the PSTricks mailing list