[pstricks] subtraction of two figures

Marco Daniel marco.daniel at mada-nada.de
Sat Apr 17 18:19:59 CEST 2010


Hi,

I have a question. First the minimal example:

\documentclass{article}
\parindent0pt
\usepackage{pst-3dplot}
\usepackage{pstricks}
\usepackage{pst-solides3d}
\usepackage{pstricks-add}
\usepackage{amsmath,amsfonts}
\definecolor{myblack}{cmyk}{0 0 0 1}
\begin{document}
  \psset{lightsrc=30 -10 10,linewidth=0.5\pslinewidth}
  \psset{viewpoint=50 -60 20 rtp2xyz,Decran=70}
  \begin{pspicture}(-7,-4)(7,12)
\psset{unit=1cm,linecolor=myblack}
\psset{solidmemory}
  \defFunction{MyFunc}(x,y){y 1 x x mul add div}{}{}
    \psSolid[object=surface,base=-2 2 -2 2,function=MyFunc,ngrid=0.25 
0.25,linecolor=myblack,action=draw,name=myFunc]
    \psSolid[object=cube,a=4,ngrid=4,action=none,name=myCube](0,0,0)
    \psSolid[object=fusion,action=draw,base= myCube myFunc](0,0,0)
  \composeSolid
\end{pspicture}
\clearpage
\psset{unit=1cm,linecolor=myblack}
\psset{linewidth=1.2\pslinewidth}
   \begin{pspicture}(-6,-4)(6,5)
\psset{xunit=2cm,yunit=2cm}
    \psset{RotSequence=zxy, RotZ=-10,RotY=-20,RotX=20,}
    
\psplotThreeD[yPlotpoints=25,xPlotpoints=50,linewidth=0.3pt,algebraic=false](-2,2)(-2,2){y 
1 x x mul add div}
         \pstThreeDBox(-2,-2,-2)(0,0,4)(4,0,0)(0,4,0)
\end{pspicture}
\end{document}

I don't know how to subtract  the figures?

regards
Marco


More information about the PSTricks mailing list