[pstricks] Re : Re : Re : pst-solides3d and parametric surfaces

Manuel Luque mluque5130 at aol.com
Sat Jul 16 08:37:55 CEST 2011


 Second draft.
The "properly" computed and draw trace of the intersection.
Happy holidays. Goodbye

ML

\documentclass{article}
\usepackage[dvipsnames,svgnames]{xcolor}
\usepackage{pst-solides3d}
\begin{document}
\begin{center}
%\codejps{
%/biface false def
%-.5 3 0.85 3.5 [0.1 0.1]
%{/y exch def
% /x exch def
%%-.35*x^2-(y-2)*(y-1.5)+(x*.2*y)+4.5
% -0.35 x dup mul mul
%  y 2 sub y 1.5 sub mul sub
%  0.2 x mul y mul add
%  4.5 add }
%  true
%  newsurfaceparametree
%(Surface) writesolidfile
% }
 \begin{pspicture}(-4,-4)(7,10)
 \psset{lightsrc=viewpoint,viewpoint=100 30 35 rtp2xyz,Decran=150}
%\psset{solidmemory}
%\psSolid[object=new,fillcolor={[rgb]{0.5 0.72 0.5}},incolor=yellow!20,
%    linewidth=0.5\pslinewidth,
%    hollow,
%    sommets={(Surface-sommets.dat) run},
%    faces={(Surface-faces.dat) run},
%    plansepare={[0.707 0.707 0 -2.5]},
%    name=SurfaceXplane,
%    action=none]
%\psSolid[object=load,
%   load=SurfaceXplane1,
% enregistre les caractéristiques du solide
%   file=SurfaceXplane1,
%   action=writesolid
%   ]%
%\psSolid[object=load,
%   load=SurfaceXplane0,
% enregistre les caractéristiques du solide
%   file=SurfaceXplane0,
%   action=writesolid
%   ]%
\axesIIID(0,0,0)(5,5,7)
\psPoint(0,0,0){O}
\psPoint(0.707 2.5 mul,0.707 2.5 mul,0){H}\psdot(H)
\psline(O)(H)
\psSolid[object=datfile,
         hollow,
         incolor=yellow!30,
         fillcolor=red!30,
         linewidth=0.5\pslinewidth,
         rm=0 508,
         file=SurfaceXplane1]
\psSolid[object=plan,
%          definition=equation, args={[0.707 0.707 0 -2.5] 180 },
          definition=normalpoint,
          args={0.707 2.5 mul 0.707 2.5 mul 0 [0 0 1 0.707 0.707 0 -90]},
          opacity=.5,
          plangrid,planmarks,showBase,
          fillcolor=ForestGreen!20, linecolor=gray!50,base=-3 3 0 5]
\psSolid[object=datfile,
         hollow,
         incolor=yellow!30,
         fillcolor=red!30,
         linewidth=0.5\pslinewidth,
         rm=0 456,
%         intersectiontype=0,
%         intersectionplan={ [0.707 0.707 0 -2.51] },intersectioncolor=(rouge),
%         intersectionlinewidth=2,
         file=SurfaceXplane0]
\pstVerb{/yInter {2.5 0.707 t mul sub 0.707 div} def}%
\defFunction{intersection}(t){t}{yInter}{%
 -0.35 t dup mul mul
  yInter 2 sub yInter 1.5 sub mul sub
  0.2 t mul yInter mul add
  4.5 add}
\psSolid[object=courbe,r=0,
        range=0.045 2.8,
        linecolor=red,
        linewidth=2\pslinewidth,
        function=intersection]%
      \end{pspicture}
\end{center}
\end{document}



 


 

 



 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20110716/8bbb23c4/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: surfaceXplane_v03.pdf
Type: application/pdf
Size: 49371 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20110716/8bbb23c4/attachment-0001.pdf>


More information about the PSTricks mailing list