[pstricks] two questions re pst3d-solides

Zbigniew Nitecki zbigniew.nitecki at tufts.edu
Sat Jul 24 23:04:41 CEST 2010

Thanks, Herbert.  Your example does one thing beautifully: draws two surfaces intersecting.
The "load" option was just my response to a suggestion from another email; I was initially using "fusion".

But what I want to do is to draw the (first) surface and then draw a curve on that surface,
which corresponds to the intersection of the first surface with a vertical plane.
The latter detail is only relevant insofar as it tells you that the curve is in a vertical plane
and is the graph of a function.
So far I haven't succeeded within pst3d-solides in creating the curve
(when I did it as I usually do with \parametricplotThreeD, it sat slightly above
the top of the curve, and of course I also couldn't get the hidden line effect.
This is why I want to create the curve as an object in pst3d-solides and then
fuse it with the surface.

I have some confusion about how to create such an object.
My sources are two examples, one in section 10.11.1 (p. 165) of the 
English documentation for pst3d-solides, which shows a graph of a function
on a vertical plane, and the other on p. 22, which appears to give the 
pst3d-solides analogue of \parametricplotThreeD.
I have tried to mimic both examples, but in both cases have encountered 
a number of difficulties that I can't figure out how to overcome.

First, the example on p. 22:  this seems light a totally straightforward analogue of
\parametricplotThreeD (except that I don't understand the role played by r=0)
The code below
% !TEX TS-program = latex
\usepackage{pst-solides3d, pst-3dplot, pst-math,pstricks-add}
				range=-1.0 1.0,
gives me a blank page, whereas if I just comment out the line r=0,
I get the following surface:

How do I get the curve given parametrically by
As to the second example (p. 165), I realize that this probably requires the naming of the
plane which precedes the \psSolid[object=curve... in the example.  But on the evidence 
of the experiment described above, it seems that the function definition may be a more
pressing problem.  And in this particular context I don't understand the syntax of the function definition
from the example:
with two trailing empty braces;  Florian Schubert says that these are equivalent to {0}, but I don't feel any more
enlightened by that translation.

My impulse is to ignore the example on p. 165, and concentrate on reproducing the behavior of the example
on p. 22.  Once I can get it to actually draw the curve I want, then I can change the action to none and fuse it 
with the graph surface on which it is supposed to live.

Can you help me see why the code produces either nothing (with r=0) or what appears to be a surface (with no such line)?
Is my interpretation of the example on p.22 correct, when I presume that the syntax is
	 \defFunction{<function name>}(<name of independent variable, say t >}{x(t)}{y(t)}{z(t)}


Zbigniew Nitecki
Department of Mathematics
Tufts University
Medford, MA 02155

Office    (617)627-3843
Dept.    (617)627-3234
Dept. fax    (617)627-3966

On Jul 24, 2010, at 14:47, Herbert Voss wrote:

> 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
> _______________________________________________
> 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/20100724/bbc982a3/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pst3d test 1.2.1.pdf
Type: application/pdf
Size: 26088 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20100724/bbc982a3/attachment-0001.pdf>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20100724/bbc982a3/attachment-0003.html>

More information about the PSTricks mailing list