[pstricks] projections onto different planes in one picture

Zbigniew Nitecki zbigniew.nitecki at tufts.edu
Mon Aug 30 15:43:07 CEST 2010


Thanks, Herbert.  
I hope that my inclusion of the picture doesn't make this too large to post (I am not so adept at posting a picture on my web page).

This eliminates the \psset{plan=??}, and (after some fiddling) I managed to get the two planes intersecting properly.  However, while the first projected curve (blue) shows up fine, the second (red) does not.  This is true even if I comment out all references to the first (blue) plane and the curve on it.  I thought that maybe it was projecting on the "back side" of the red plane, but it fails to appear whether I rotate it 180 degrees or not.

Modified code:
*********************************
\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] 180},
		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,
		opacity=0,
		]
	\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,
		opacity=0,
		]
	\defFunction[algebraic]{xcutfcn}(y){y*y}{}{}%
	\psProjection[object=courbe,
		linecolor=blue,
		linewidth=2pt,
	   	plan=xplane,
		range=-2 2,
		resolution=720,
		function=xcutfcn,
	   	action=draw**,
		opacity=0,
		]

	\psSolid[object=plan,
		definition=equation,
		args={[0 1 0 0] 90},
		base=-2 2 -0.5 4.5,
		name=yplane,
		linewidth=0.5pt,
		ngrid=10 10,
		action=none,
		opacity=0,
		]
	\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**,
		opacity=0,
		]
\end{pspicture}

\end{document}
*********************************************


Zbigniew Nitecki
Department of Mathematics
Tufts University
Medford, MA 02155

telephones:
Office    (617)627-3843
Dept.    (617)627-3234
Dept. fax    (617)627-3966
http://www.tufts.edu/~znitecki/

On Aug 30, 2010, at 3:15, Herbert Voss wrote:

> 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
> _______________________________________________
> PSTricks mailing list
> PSTricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
> archive: http://www.tug.org/pipermail/pstricks/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20100830/de846a50/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pst3dtest1.1.1.pdf
Type: application/pdf
Size: 199944 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20100830/de846a50/attachment-0001.pdf>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20100830/de846a50/attachment-0003.html>


More information about the PSTricks mailing list