[pstricks] Re : Re : Re : plansepare with a surface
Markus Krebs
markuskrebs at web.de
Tue Mar 8 09:45:15 CET 2011
Dear Manuel!
Looks great without errors. I've used the pst-solides3d.pro file.
Thanks for your help improving my teaching! I will use it again for
calculating the volume of revolution.
Markus
Am 08.03.2011 08:17, schrieb Manuel Luque:
> Some suggestions to represent this surface, non-polygonal, with
> pst-solides3d.(It's more beautiful).
>
> 1. Change the following definition of pst-solides3d:
>
> %%%%% ### solidnormaleface ###
> %% syntaxe : solid i solidnormaleface --> u, vecteur normale a la
> %% face d indice i du solide
> /solidnormaleface {
> .
> etc.
>
> to
>
> %%%%% ### solidnormaleface ###
> %% syntaxe : solid i solidnormaleface --> u, vecteur normale a la
> %% face d indice i du solide
> /solidnormaleface {
> 4 dict begin
> /i exch def
> /solid exch def
> solid issolid not {
> (Error : mauvais type d argument dans solidgetsommetface) ==
> quit
> } if
> %% solid 0 i solidgetsommetface /G defpoint3d
> %% G
> %% solid 1 i solidgetsommetface
> %% vecteur3d
> %% G
> %% solid 2 i solidgetsommetface
> %% vecteur3d
> %
> /n solid i solidfacenombresommets def
> n 3 ge {
> % [
> % solid 0 i solidgetsommetface
> % solid 1 i solidgetsommetface
> % solid 2 i solidgetsommetface
> % ] isobarycentre3d /G defpoint3d
> solid i solidcentreface /G defpoint3d
> } {
> solid i solidcentreface /G defpoint3d
> } ifelse
> %% debug %% G 3dto2d point
> G
> solid 0 i solidgetsommetface
> /A defpoint3d
> % gsave bleu A point3d grestore
> A
> vecteur3d normalize3d
> G
> solid 1 i solidgetsommetface
> /A defpoint3d
> % gsave orange A point3d grestore
> A
> vecteur3d normalize3d
> vectprod3d
> /resultat defpoint3d
> resultat normalize3d
> end
> } def
>
> %%%%% ### solidtransform ###
> %% syntaxe : solid1 {f} solidtransform --> solid2, solid2 est le
> %% transforme de solid1 par la transformation f : R^3 -> R^3
> /solidtransform {
> 3 dict begin
> /@f exch def
> /solid exch def
> solid issolid not {
> (Error : mauvais type d argument dans solidtransform) ==
> quit
> } if
> /les_sommets
> solid solidgetsommets {@f} papply3d
> def
> solid les_sommets solidputsommets
> solid
> end
> } def
>
>
> Or, use the file with the modification included:
>
> http://manuel.luque.perso.neuf.fr/paraboloid/pst-solides3d.pro
>
>
> 2. Generate the vertices and faces with the following file:
> (ghostscript -dNOSAFER)
>
> http://manuel.luque.perso.neuf.fr/paraboloid/part-paraboloid.ps
>
> You change the smoothness of the path with the parameter /resolution
>
> 3. Run LaTeX and DVIPS with the following file:
>
> http://manuel.luque.perso.neuf.fr/paraboloid/demi-paraboloid.tex
>
> http://manuel.luque.perso.neuf.fr/paraboloid/
>
> Best regards,
>
> M.L.
>
>
>
>
>
> _______________________________________________
> 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/20110308/aa5ec3fb/attachment.html>
More information about the PSTricks
mailing list