[pstricks] two questions re pst3d-solides
Herbert Voss
Herbert.Voss at FU-Berlin.DE
Sat Jul 24 20:47:38 CEST 2010
Am 24.07.2010 20:14, schrieb Zbigniew Nitecki:
> Detailed answers are below; for context, what I am trying to do is do draw the
> surface (graphsurf)
> in Question 1 together with the curves obtained by intersecting with two planes,
> each parallel
> to a coordinate plane, through a given point (the intersection with the plane
> y=1/2 would be the
> graph of the function curvey in Question 2 if I used 0.5 instead of 1 in the
> second input slot).
> Fusion will give me the useul hidden lines feature. My two parts were trying to
> separate the fusion
> problem from the definition of the curve, which on the face of it appears to be
> the problem.
Here is your example for a fusion. When you use the object load
then you have to create an external file for the data.
\listfiles
\documentclass[11pt]{article}
\usepackage{pst-solides3d}
\begin{document}
\begin{pspicture}(-0.5,-2)(3,3)
\psset{lightsrc=50 20 50, viewpoint=15 60 20 rtp2xyz,Decran=50}
% first surface
\defFunction[algebraic]{Func}(x,y){}{}{ (x^2-3*y^2)/2 }{}{}
\psSolid[
object=surface,
incolor=green,
function=Func,
base=-1 1 -1 1,
ngrid=0.1 0.1,
grid,
action=none,
name=graphsurfA]
% second surface, also with action=none
\defFunction[algebraic]{Func2}(x,y){}{}{ (y^2-3*x^2)/2 }{}{}
\psSolid[
object=surface,
incolor=yellow,
function=Func2,
base=-1 1 -1 1,
ngrid=0.1 0.1,
grid,
action=none,
name=graphsurfB]
% combine both surfaces
\psSolid[
object=fusion,
action=draw**,
base=graphsurfA graphsurfB]
\end{pspicture}
\end{document}
Herbert
More information about the PSTricks
mailing list