[pstricks] Re : Some questions about slicing in pst-solides3D

Nitecki, Zbigniew H. Zbigniew.Nitecki at tufts.edu
Sat Jul 23 16:51:09 CEST 2011


Manuel:
Thanks very much for the suggestions.  See below

Zbigniew Nitecki
Department of Mathematics
Tufts University
Medford, MA 02155

telephones:
Office    (617)627-3843
Dept.    (617)627-3234
Dept. fax    (617)627-3966
http://www.tufts.edu/~znitecki/




On Jul 23, 2011, at 5:45, Manuel Luque wrote:

Dear Nitecki,

To draw of the intersection, write

intersectionplan = {[0 1 0.5 1295]

instead of

intersectionplan = {[0 1 -1.31 0.5]
But isn't that an entirely different plane?

For the default display, delete certain facets: rm =... (as in
my example)
This defect appears after the partition of the solid.
I am not clear on this.  What defect, what partition?


The computing time of the cutting of the solid is proportional
to the number of facets and thus sides. This is why I advise
to save the data in order to finalize the drawing.

http://manuel.luque.perso.neuf.fr/Zbigniew/
I am studying this example a bit, but find it hard to understand.

At least, it is better to calculate the intersection (here an
ellipse): the drawing is nicer.
This will probably be my solution, but I still want to figure out how to put in the circle in the earlier picture (right-hand picture in file Zbigniew1.pdf)

Computed files are here. To write yourself the data files,
uncomment the lines (%)

Best regards

ML




-----E-mail d'origine-----
De : Nitecki, Zbigniew H. <Zbigniew.Nitecki at tufts.edu<mailto:Zbigniew.Nitecki at tufts.edu>>
A: PSTricks PSTricks <pstricks at tug.org<mailto:pstricks at tug.org>>
Envoyé le : Vendredi, 22 Juillet 2011 20:38
Sujet : [pstricks] Some questions about slicing in pst-solides3D


I am attaching the output from the code below, which is modelled on the last
example at
http://tug.org/PSTricks/main.cgi?file=Examples/Gallery3D/Gallery3D
I have modified a few details, like the specific cutting plane and the grid and
color, but the definition of bicone is verbatim from the example, as is most of
the code.
I have two questions about this:
1. Why doesn't the intersection curve show up? In the example, it is there in
red.
2. The definition of bicone using faces, etc leads to some strange behavior near
the cone vertex (see picture).  I had better luck creating a cone using the code
shown at the very bottom, but when I tried to incorporate it into the larger
picture here I appear to have hit an infinite loop: the program ran very long
and still hadn't created any pdf.
3. How would I go about putting in some more curves on the plane, and perhaps
fuse this with another, horizontal plane also containing some lines and curves?

Since the original example appears to have been written by Manuel Luque, perhaps
he is the best person to address questions 1 and 2.
************************************************************************************************
\def\bicone{% generation du bicone
         /dZ 0.5 def
         /Rayon 3 def % rayon de la base
         /Hauteur 3 def % hauteur d'un cone
         /THETA Rayon Hauteur atan def
         /tanTHETA {Rayon Hauteur div} bind def
         /dPHI 10 def
         /tableau_des_sommets [
             Hauteur neg dZ Hauteur dZ sub{/Z exch def
             0 dPHI 360 {/PHI exch def
                  /r1 Z abs tanTHETA mul def
                  /r2 Z dZ add abs tanTHETA mul def
                  r1 PHI cos mul % x0
                  r1 PHI sin mul % y0
                  Z             % z0
                  r1 PHI dPHI add cos mul % x1
                  r1 PHI dPHI add sin mul % y1
                  Z                      % z1
                  r2 PHI dPHI add cos mul % x2
                  r2 PHI dPHI add sin mul % y2
                  Z dZ add               % z2
                  r2 PHI cos mul % x3
                  r2 PHI sin mul % y3
                  Z dZ add       % z3
             } for
             } for
                  ]
           def
         /Sommets {tableau_des_sommets aload pop} def
         /NbrePoints tableau_des_sommets length 3 div cvi def
        /Faces  {0 4 NbrePoints 4 sub {
                 /Ni exch def
               [ Ni Ni 1 add  Ni 2 add Ni 3 add]
                                     } for
              } def
        /Faces_internes {0 4 NbrePoints 4 sub {
                 /Ni exch def
               [Ni 3 add Ni 2 add Ni 1 add Ni]
                                     } for
             } def
             }

\psset{unit=0.5}
\psset{lightsrc=viewpoint}
\psset{lightsrc=40 180 30,viewpoint=30 40 25 rtp2xyz},

\begin{pspicture}(-7.5,-7.5)(7,7)
\pstVerb{\bicone}%
\psset{solidmemory}
\psSolid[object=new,sommets=Sommets,faces={Faces},
   hollow,
   plansepare={[0 0.5 1 -1.3]},
   name=partbicone,
   grid,
   action=none]
\psSolid[object=load,
   hollow,rm=0,
   fillcolor=lightgray,
   incolor=lightgray,
   grid,
   load=partbicone1,
   intersectiontype=0,
   intersectionlinewidth=2,
   intersectioncolor=(rouge),
   intersectionplan={[0 0.5 1 -1.31]}
   ]
\psSolid[object=plan,definition=equation,
   args={[0 0.5 1 -1.3] 180},
   base=-3 3 -3 3.5,linewidth=0.01,
   action=draw]
\end{pspicture}



_______________________________________________
PSTricks mailing list
PSTricks at tug.org<mailto:PSTricks at tug.org>
http://tug.org/mailman/listinfo/pstricks
archive: http://www.tug.org/pipermail/pstricks/


<Zbigniew1.pdf><Zbigniew1.tex>_______________________________________________
PSTricks mailing list
PSTricks at tug.org<mailto:PSTricks at tug.org>
http://tug.org/mailman/listinfo/pstricks
archive: http://www.tug.org/pipermail/pstricks/




More information about the PSTricks mailing list