[pstricks] can planes be fused with \pSolid surfaces? a desperate plea

Zbigniew Nitecki zbigniew.nitecki at tufts.edu
Tue Jul 27 21:16:09 CEST 2010


I'm repeating in modified form a posting from yesterday, since I've had no response so far and am getting desperate for a solution.

I want to draw a surface cut by a vertical plane, taking advantage of the lightsource and line-hiding features of \pst3d-solides.

Herbert sent me code earlier yesterday which worked beautifully to draw two intersecting objects of type \psSolid[object=surface.
I want to replace one of these with an object \psSolid[object=plan, (defined by a normal vector, etc.)

When I take Herbert's code and modify it as follows:  replace second surface with plane, comment out \psSolid[object=fusion,
and change all action=none to action=draw**, I get a reasonable picture:
(I have also added a \psset{solidmemory} at the start and a \composeSolid at the end, although his program as written
worked fine without them.)

##############################################################

% !TEX TS-program = latex
\listfiles
%\documentclass[11pt]{article}
%\usepackage{pst-solides3d, pst-3dplot, pst-math,pstricks-add}
%\usepackage{pst-3d}
%\usepackage{graphicsmacros}
\listfiles
\documentclass[11pt]{article}
\usepackage{pst-solides3d}
\begin{document}
\begin{pspicture}(-0.5,-2)(3,3)
\psset{solidmemory}

\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.5 -1 1.5,
 ngrid=0.1 0.1,
 grid,
 action=draw**,
 name=graphsurfA
	]
%
% second surface
\psSolid[object=plan,
	definition=normalpoint,
	args={1.0 0.5 0.125 [1 0 0]},
	fillcolor=lightgray!20,
	opacity=0.05,
	base=-0.5 1.5 -0.5 1.5,
	action=draw**,
	name=graphsurfB
		]
%
% combine both surfaces
%\psSolid[
% object=fusion,
% action=draw**,
% base=graphsurfA graphsurfB
% 	]
%
%\composeSolid
\end{pspicture}

\end{document}

######################################################################


#############################################################################

But when I change the action=draw** back to action=none and uncomment \psSolid[object=fusion,
the program crashes:

##########################################################################

### This is /usr/texbin/simpdftex, Version 20070809
### /usr/texbin/latex pst3d test 1.3.5.tex
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009)
entering extended mode
(./pst3d test 1.3.5.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, german-x-2009-06-19, ngerman-x-2009-06-19, ancientgreek, ibycus, ar
abic, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danish, dutc
h, esperanto, estonian, farsi, finnish, french, galician, german, ngerman, mono
greek, greek, hungarian, icelandic, indonesian, interlingua, irish, italian, ku
rmanji, latin, latvian, lithuanian, mongolian, mongolian2a, bokmal, nynorsk, po
lish, portuguese, romanian, russian, sanskrit, serbian, slovak, slovenian, span
ish, swedish, turkish, ukenglish, ukrainian, uppersorbian, welsh, loaded.
(/usr/local/texlive/2009/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2009/texmf-dist/tex/latex/base/size11.clo))
(/Users/zbigniewnitecki/Library/texmf/tex/latex/pst-solides3d/pst-solides3d.sty
(/usr/local/texlive/2009/texmf-dist/tex/latex/pstricks/pstricks.sty
(/usr/local/texlive/2009/texmf-dist/tex/generic/pstricks/pstricks.tex
`PSTricks' v1.29  <2009/05/19> (tvz)
(/usr/local/texlive/2009/texmf-dist/tex/generic/pstricks/pstricks.con))
(/usr/local/texlive/2009/texmf-dist/tex/latex/xcolor/xcolor.sty
(/usr/local/texlive/2009/texmf-dist/tex/latex/latexconfig/color.cfg)
(/usr/local/texlive/2009/texmf-dist/tex/latex/graphics/dvips.def)))
(/Users/zbigniewnitecki/Library/texmf/tex/latex/pst-solides3d/pst-solides3d.tex
(/usr/local/texlive/2009/texmf-dist/tex/generic/pstricks/pst-node.tex
 v1.01, 2008/11/26)
(/usr/local/texlive/2009/texmf-dist/tex/generic/xkeyval/pst-xkey.tex
(/usr/local/texlive/2009/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/local/texlive/2009/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/local/texlive/2009/texmf-dist/tex/generic/xkeyval/keyval.tex))))
(/usr/local/texlive/2009/texmf-dist/tex/generic/multido/multido.tex
 v1.41, 2004/05/18 <tvz>) `PSTSOLIDESIIID' v4.16, 2009/08/11))
(./pst3d test 1.3.5.aux) [1] (./pst3d test 1.3.5.aux)

 *File List*
 article.cls    2007/10/19 v1.4h Standard LaTeX document class
  size11.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
pst-solides3d.sty    2009/07/25 package wrapper for pst-solides3d
pstricks.sty    2008/11/26 v0.40 LaTeX wrapper for `PSTricks' (RN,HV)
pstricks.tex    2009/05/19 v1.29 `PSTricks' (tvz,hv)
  xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
   dvips.def    1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
pst-solides3d.tex    2009/08/11 v4.16 `PST-solides3D'
pst-xkey.tex    2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)
 xkeyval.sty    2008/08/13 v2.6a package option processing (HA)
 xkeyval.tex    2008/08/13 v2.6a key=value parser (HA)
 solides.pro    2008/10/30 v. 4.13, PostScript prologue file
 ***********

 )
Output written on "pst3d test 1.3.5.dvi" (1 page, 10092 bytes).
Transcript written on "pst3d test 1.3.5.log".
### /usr/texbin/dvips -R -Poutline  -o /tmp/altpdflatex.80720-1280257536/pst3d test 1.3.5.ps pst3d test 1.3.5.dvi
This is dvips(k) 5.98 Copyright 2009 Radical Eye Software (www.radicaleye.com)
' TeX output 2010.07.27:1505' -> /tmp/altpdflatex.80720-1280257536/pst3d test 1.3.5.ps
</usr/local/texlive/2009/texmf/dvips/base/tex.pro>
</usr/local/texlive/2009/texmf-dist/dvips/pstricks/pstricks.pro>
</usr/local/texlive/2009/texmf-dist/dvips/pstricks/pst-algparser.pro>
</usr/local/texlive/2009/texmf-dist/dvips/pstricks/pst-dots.pro>
</usr/local/texlive/2009/texmf-dist/dvips/pstricks/pst-node.pro>
</usr/local/texlive/2009/texmf-dist/dvips/pst-solides3d/solides.pro>
</usr/local/texlive/2009/texmf/dvips/base/texps.pro>
</usr/local/texlive/2009/texmf/dvips/base/special.pro>
</usr/local/texlive/2009/texmf/dvips/base/color.pro>. 
</usr/local/texlive/2009/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
[1] 
### ps2pdf13 /tmp/altpdflatex.80720-1280257536/pst3d test 1.3.5.ps /tmp/altpdflatex.80720-1280257536/pst3d test 1.3.5.pdf
Error: /typecheck in --length--
Operand stack:
   --nostringval--   S   result   2028   1.0
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--   0   --nostringval--   %repeat_continue   --nostringval--   --nostringval--   --nostringval--
Dictionary stack:
   --dict:1150/1684(ro)(G)--   --dict:0/20(G)--   --dict:80/200(L)--   --dict:746/1012(L)--   --dict:175/300(L)--   --dict:38/200(L)--   --dict:184/200(L)--   --dict:746/1012(L)--   --dict:2/11(L)--   --dict:5/5(L)--   --dict:2/3(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 364016
GPL Ghostscript 8.70: Unrecoverable error, exit code 1
### FAILED to generate /tmp/altpdflatex.80720-1280257536/pst3d test 1.3.5.pdf ()

#####################################################################################

The same phenomenon happens if instead of a \psSolid[object=plan I substitute a \psSolid[object=vecteur.

So does fusion work ONLY with objects of type surface?  
(Does it work, for example, with surfaceparametree?)
Since I can't create a vertical plane with object=surface (it is not a graph),
how can I create the picture above, but with the part of the plane "under" the surface hidden?


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


More information about the PSTricks mailing list