[pstricks] projections onto different planes in one picture
Zbigniew Nitecki
zbigniew.nitecki at tufts.edu
Sun Aug 29 20:52:31 CEST 2010
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?
******************************************************
\documentclass[11pt]{article}
\usepackage{pst-solides3d, pst-3dplot, pst-math,pstricks-add}
\usepackage{pst-3d}
\begin{document}
\begin{pspicture}(-3,-1.5)(3,5.5)
\psset{unit=0.35}
\psset{lightsrc=40 50 50, viewpoint=18 65 30 rtp2xyz}
\psset{solidmemory}
\psSolid[object=plan,
definition=equation,
args={[1 0 0 0] 90},
base=-2 2 -0.5 4.5,
fillcolor=blue!10,
opacity=0,
name=xplane,
]
\psset{plan=xplane}
\defFunction[algebraic]{xcutfcn}(y){y*y}{}{}
\psProjection[object=courbe,
linecolor=blue,
range=-2 2,
resolution=720,
function=xcutfcn,
name=xcut,
]
\psSolid[object=plan,
definition=equation,
args={[0 1 0 0]},
base=-2 2 -0.5 4.5,
fillcolor=red!10,
opacity=0,
name=yplane,
]
\psset{plan=yplane}
\defFunction[algebraic]{ycutfcn}(x){4*x*x}{}{}
\psProjection[object=courbe,
linecolor=red,
range=-1 1,
resolution=720,
function=ycutfcn,
name=ycut,
]
\psSolid[object=fusion,
base=xplane_s yplane_s,
% base=yplane_s xplane_s,
action=draw**,
% base=xcut ycut,
% base=xplane_s,
% base=yplane_s,
]
\composeSolid
\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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20100829/f1419f2f/attachment.html>
More information about the PSTricks
mailing list