[pstricks] Re : Re : Re : pst-solides3d and parametric surfaces
Leon Free
leon.free at free.fr
Mon Jul 18 14:04:24 CEST 2011
Le 16/07/2011 08:37, Manuel Luque a écrit :
> Second draft.
> The "properly" computed and draw trace of the intersection.
> Happy holidays. Goodbye
>
> ML
>
Manuel,
Thank you again for spending so much of your time on finding a solution.
Your first attempt did work fastly and perfectly and I made my own
modifications to produce exactly what I initially aimed at (namely
illustrating the notion of directional derivative, as you may guess...)
Your second attempt is soooooo slow in generating the dat files...
In my modifications (see attachements), I made two files to make a
separation :
* 1 file is for generating once and forall the dat files
* 1 file is for adding to these elements other parts of the graphic and
producing the pdf.
Generation of the dat files is much faster that way
> \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}
>
>
>
>
>
>
> <http://www.tug.org/pipermail/pstricks/>
>
>
> _______________________________________________
> PSTricks mailing list
> PSTricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
> archive: http://www.tug.org/pipermail/pstricks/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plan.pdf
Type: application/x-download
Size: 30664 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20110718/a2729d8d/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plan.tex
Type: text/x-tex
Size: 3071 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20110718/a2729d8d/attachment-0003.bin>
More information about the PSTricks
mailing list