[pstricks] just a little more help

Cyrille Piatecki cyrille.piatecki at univ-orleans.fr
Fri Dec 21 22:42:19 CET 2012


Thanks all for your kindly help

I just wonder how to plot with dash line the masked part of the red line 
and how tho fill with a color the U_0 cut

\documentclass{article}
\usepackage{pst-solides3d}

\begin{document}
  \begin{center}
   \psset{lightsrc=viewpoint,viewpoint=40 30 16 rtp2xyz,Decran=20}
  \psscalebox{.7 .7}{ \begin{pspicture}(-8,-8)(9,7)
   %\psgrid
   \psSurface[fillcolor=cyan!10,%algebraic,%axesboxed,
    ngrid=.25 .25,incolor=yellow,linewidth=0.125\pslinewidth,grid,
    intersectionplan={[0 0 1 -8.4] [0 0 1 -3.6] },
    intersectioncolor=(bleu) (rouge),
    intersectionlinewidth=1  1,
    intersectiontype=0,](-3,-3)(15,15){ x 4 sub dup mul y 4 sub dup mul
add -5 div 10 add
      dup -2 lt {pop -2}if }
%  {-((x-4)^2+(y-4)^2)*0.2+10}
   \axesIIID[linecolor=gray,linewidth=0.4pt,labelsep=18pt,axisnames={x,y,U}](0,0,0)(13,13,12)
\psLineIIID[linecolor=blue, linewidth=0.1pt,linearc=0.,
   doubleline=false](0,0,0)(6,0,0)(6,6,0)(6,6,8.4)
\psLineIIID[linecolor=blue, linewidth=0.1pt,linearc=0.,
   doubleline=false](0,0,0)(0,6,0)(6,6,0)
\psLineIIID[linecolor=red, linewidth=0.1pt,linearc=0.,
   doubleline=false](0,0,0)(8,0,0)(8,8,0)(8,8,3.6)
\psLineIIID[linecolor=red, linewidth=0.1pt,linearc=0.,
   doubleline=false](0,0,0)(0,8,0)(8,8,0)
\defFunction[algebraic]{inter}(t){t}{t}{-(t-4)^2*0.4+10}
\psSolid[object=courbe,r=0,linecolor=green,linewidth=1pt,range=6 8,
ngrid=.15 .15,
          function=inter,grid,action=draw]
%\pscurve[linecolor=green](-0.32,0.45)(-0.33,.9)(-0.6,2.4)
\rput(-1.8,-.5){\tiny $x_1$}
\rput(-2.6,-1){\tiny $x_0$}
\rput(4,-0.4){\tiny $y_0$}
\rput(3,-0.25){\tiny $y_1$}
\rput(-1.5,.8){\tiny $U_0$}
\rput(1.1,4.1){\tiny $U_1$}
\psline[linecolor=yellow](1.4,.9)(2,.3)
\psline[linecolor=yellow](1.4,-1.4)(2,-2)
%\psgrid
   \end{pspicture}}
   \end{center}
\end{document}


Cyrille Piatecki


More information about the PSTricks mailing list