[pstricks] subtraction of two figures

Marco Daniel marco.daniel at mada-nada.de
Sat Apr 17 21:41:01 CEST 2010


Hello,

usually I am using psclip. (substract=Subtrahieren)

But it didn't work here. I solved it in the following example:

\documentclass{article}
\parindent0pt
\pagestyle{empty}
% \usepackage[cmyk,gray]{pstricks}
\usepackage{pst-3dplot}
\usepackage{pst-gr3d}
\usepackage{pst-solides3d}
\usepackage{pstricks-add}
\usepackage{amsmath,amsfonts}
\definecolor{myblack}{cmyk}{0 0 0 1}
\begin{document}
\psset{lightsrc=viewpoint,linewidth=0.5\pslinewidth}
\begin{pspicture}(-7,-4)(7,12)
\psset{unit=1cm,linecolor=myblack}

  \psset{viewpoint=20 -60 20 rtp2xyz,Decran=50}
% \axesIIID(-3,-3,-3)(3,3,3)
%    \psSolid[object=cube,a=4,transform={1 1 0.65 scaleOpoint3d 0 0 -0.9 
addv3d},ngrid=5,action=draw,name=myCube](0,0,0)
\psset{action=draw}
\psSolid[object=grille,base=-2 2 -2 2,ngrid=8](0,0,-2.5)
\psSolid[object=grille,base=-2 2 -2.5 0.4,ngrid=8 4,RotX=90](0,2,0)

\psSolid[object=grille,base=-2 0 -2 2,ngrid=4 8,RotY=90](-2,0,-2.5)
\psSolid[object=grille,base=-2 2 -2.5 -0.4,ngrid=8 4,RotX=90,](0,-2,0)
\psSolid[object=grille,base=-2 0.9 -2 2,ngrid=4 8,RotY=90](2,0,-1.6)

\defFunction{MyFuncG}(x,y){y 1 x x mul add div}{}{}
    \psSolid[object=surface,base=-2 2 -2 2,transform={1 1 1 
scaleOpoint3d},function=MyFuncG,ngrid=0.25 
0.25,linecolor=myblack,action=draw*,name=myFunc](0,0,0)
\end{pspicture}
\end{document}

The problem is the hidden lines are not dashed. :-)

Thanks
Marco




More information about the PSTricks mailing list