[pstricks] \psVolume

Hamed hhaalsalmi at kau.edu.sa
Thu Oct 11 08:11:43 CEST 2007


Hi all,

 Can any one explain the following code 

 

 

\def\psVolume(#1,#2)#3#4{{%

  \psplot{#1}{#2}{#4}\psplot{#1}{#2}{#4 neg}

  \multido{\iA=1+1}{#3}{%

    \pscustom[fillcolor=pink,fillstyle=solid]{%

      \code{

        /dX #2 #1 sub #3 div def

        /Start dX \iA\space 1 sub mul #1 add def

        /End Start dX add def

        /Height End Start add 2 div /x ED #4 def }

      \psellipticarc(!Start 0)(!Height 8 div Height){90}{270}

      \rlineto(!dX 0)

      \psellipticarc(!End 0)(!Height 8 div Height){270}{90}

      \rlineto(!dX neg 0)}}

  \psellipticarc(#2,0)(! #2 dup #1 sub #3 div 2 div sub

    /x ED x 4 div #4){90}{270}

 

\psset{plotstyle=line,linestyle=dashed,plotpoints=40,dotstyle=*,dotsize=0.5p
t}

  \psplot{#1}{#2}{#4}\psplot{#1}{#2}{#4 neg}%

}

\ignorespaces}

 

Thanks a lot.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20071011/3456fb44/attachment.html 


More information about the PSTricks mailing list