[pstricks] two questions re pst3d-solides

Zbigniew Nitecki zbigniew.nitecki at tufts.edu
Sat Jul 24 20:14:18 CEST 2010

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.

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 Jul 24, 2010, at 12:23, Florian Schubert wrote:

> Question 1 (there was no question :) ):
> I think the problem is, that you fuse the psSurface with nothing else. I dont know if it is what you want, but
>
>   \psSolid[
>   action=draw**,
>   ]
>
>
> > \psSolid[
> > object=fusion,
> > action=draw**,
> > base=graphsurf,
> > ]
>
> should work.
**********************************************************
It doesn't:  (the reason I am doing this roundabout way is that
eventually I want to fuse this surface with two curves, one of
which is the subject of the other question)
############################################
% !TEX TS-program = latex
\listfiles
\documentclass[11pt]{article}
\usepackage{pst-3d}
\begin{document}
\begin{pspicture}(-0.5,-2)(3,3)
\psset{solidmemory}
\psset{lightsrc=50 20 50, viewpoint=15 60 70 rtp2xyz,
Decran=50}
\psSurface[
fillcolor=gray,
incolor=green,
ngrid=0.1 0.1,
algebraic,
grid,% comment it out to see meaning of ngrid
action=none,
name=graphsurf,
](-1,-1)(1,1){ (x^2-3*y^2)/2 }
\psSolid[
action=draw**,
base=graphsurf,
]
\composeSolid

\end{pspicture}
\end{document}
############################################
> Operand stack:
>    --nostringval--
> Execution stack:
>    %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1862   1   3   %oparray_pop   1861   1   3   %oparray_pop   1845   1   3   %oparray_pop   1739   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--
> Dictionary stack:
>    --dict:1150/1684(ro)(G)--   --dict:0/20(G)--   --dict:80/200(L)--   --dict:777/1012(L)--   --dict:175/300(L)--   --dict:38/200(L)--   --dict:183/200(L)--   --dict:777/1012(L)--
> Current allocation mode is local
> Last OS error: 2
> Current file position is 399767
> GPL Ghostscript 8.70: Unrecoverable error, exit code 1
> ### FAILED to generate /tmp/altpdflatex.67410-1279993536/pst3d test 1.2.2.pdf ()
*********************************************************
>
> Question 2:
> > \defFunction[algebraic]{curvey}(t){0.5-1.5*t^2}{}{}
>
> Empty brases are to be provided with a null.
> \defFunction[algebraic]{curvey}(t){0.5-1.5*t^2}{0}{0}
>
> And you have to use \psSolid instead of \psProjection.

There are two parts to the second question.
Replacing \psProjection with \psSolid makes no difference: it still crashes.
In the example I copied, what was being drawn was the graph of the function
on a vertical plane.  In fact, I want to do the same thing, but am totally suspicious
of the function definition (the only difference between the definition in
section 10.11 of the documentation is the function name and the defining formula,
neither of which looks problematic to me.  But of course this is a strange use.
If instead I look at the example of the object courbe on p. 22 of the documentation,
I think I understand that the function can act precisely like a \parametricplotThreeD
with one argument.  But in my case this doesn't work either:
#########################################################
> % !TEX TS-program = latex
> \listfiles
> \documentclass[11pt]{article}
> \usepackage{pst-3d}
> %\usepackage{graphicsmacros}
> \begin{document}
> 		\begin{pspicture}(-0.5,-2)(3,3)
> 			\defFunction[algebraic]{curvey}(t){t}{1}{0.5-1.5*t^2}%{}{}
> %			\defFunction[algebraic]{curvey}(t){0.5-1.5*t^2}{}{}
> 			\psSolid[%
> 				object=courbe,
> 				r=0,
> 				range=-1.0 1.0,
> 				resolution=720,
> 				linecolor=blue,
> 				linewidth=1.5pt,
> 				function=curvey,
> 				action=draw**
> 				]%
>
> 		\end{pspicture}
> \end{document}
#########################################################
(I put in "r=0" mimicking the example) yields an empty page (but no crash)
while uncommenting  "r=0" yields a surface:

>
> Florian
> _______________________________________________
> 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/68043644/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/68043644/attachment-0001.pdf>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20100724/68043644/attachment-0003.html>
`