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

Manuel Luque mluque5130 at aol.com
Wed Jul 20 20:31:15 CEST 2011


 Léon,


 What you do is beautiful!

This is a version that tries to smooth the sides of the facets in the manner of Mathematica (who does so beautifully!). The computations of cutting are very long. The resulting files are here.

http://manuel.luque.perso.neuf.fr/solids-revolution/pst-solrev/plan2.tex
http://manuel.luque.perso.neuf.fr/solids-revolution/pst-solrev/plan2.pdf
http://manuel.luque.perso.neuf.fr/solids-revolution/pst-solrev/SurfaceXplane0-sommets.dat
etc

I use it for a version of pst-solides3d (pst-solrev) which is in the directory. 

http://manuel.luque.perso.neuf.fr/solids-revolution/pst-solrev/

It is not very developed, a draft documentation is in the same directory.
In the end, it is not very interesting for your problem, but here is another test...
 

 Best regards,

ML
 

 


 

 

-----E-mail d'origine-----
De : Leon Free <leon.free at free.fr>
A: Graphics with PSTricks <pstricks at tug.org>
Cc: Manuel Luque <mluque5130 at aol.com>
Envoyé le : Lundi, 18 Juillet 2011 14:04
Sujet : Re: [pstricks] Re : Re : Re : pst-solides3d and parametric surfaces


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 --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20110720/687612c7/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: surfaceVplan.png
Type: image/png
Size: 168826 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20110720/687612c7/attachment-0001.png>


More information about the PSTricks mailing list