next up previous contents
Next: -ggcylinder: A general cylinder Up: Geometric primitives Previous: -brick: a rectangular brick   Contents

-gccylinder: A circular cylinder in general direction

A gccylinder is a circular cylinder, with its axis in an arbitrary direction.
 ##############################################################################
 # Flags: nomenu, noprompt, nomessage,                                        #
 ##############################################################################
 # section -gccylinder                                                        #
 ##############################################################################
 # material  =  1                                                             #
 # whichcells= all, taboo= none                                               #
 #     show= off    -- [off|now|later|all]                                    #
 #     name= gccyl-000000000                                                  #
 # radius    = undefined                                                      #
 # length    = undefined                                                      #
 # origin    = ( undefined, undefined, undefined )                            #
 # direction = ( undefined, undefined, undefined )                            #
 ##############################################################################
 # doit, return, help                                                         #
 ##############################################################################

Note: You can revert the direction of the cylinder by negating the direction, or (easier) by negating the length.
Note: If you want eg. a quarter of a circular cylinder, you have to use -gbor, see pages [*] ff.
Example
 # /usr/local/gd1/examples-from-the-manual/gccylinder-example.gdf

 -general
     outfile= /tmp/UserName/example
     scratch= /tmp/UserName/scratch-

 -mesh
     pxlow= 0, pxhigh= 1e-2
     pylow= 0, pyhigh= 2e-2
     pzlow= 0, pzhigh= 1.5e-2
     
     cxlow= ele, cxhigh= mag
     cylow= ele, cyhigh= mag
     czlow= ele, czhigh= mag

     spacing= 0.2e-3

 -gccylinder
     material= 5, radius= 3e-3, length= 7e-3
     origin= ( 0.5e-2, 0.3e-2, 0.6e-2 )
     direction= ( -0.4, 1.5, 0.4 )
     doit
        
 -volumeplot
     scale= 3
     doit
Figure 1.2: A simple gccylinder, with its axis directing towards (-0.4, 1.5, 0.4).
\begin{figure}\centerline{
\psfig{figure=gccylinder-example.ps,width=18cm,bbllx=-2pt,bblly=-2pt,bburx=760pt,bbury=552pt,clip=}
}\end{figure}


Example

 # /usr/local/gd1/examples-from-the-manual/gccylinder-example2.gdf

 define(VeryLarge, 10000)

 -general
    outfile= /tmp/UserName/example
    scratch= /tmp/UserName/scratch

    text()= A chain of circular cylinders
    text()= The cylinders are partly outside of the bounding box.

 -mesh
    pxlow= -0.8, pxhigh= 10
    pylow= -2, pyhigh= 2
    pzlow= -0, pzhigh= 1.8

    spacing= 8e-2

 -brick
    material= 0
    volume= ( -VeryLarge, VeryLarge, \
              -VeryLarge, VeryLarge, \
              -VeryLarge, VeryLarge )
    doit

 define(RADIUS, 0.6)
 -gccylinder
    length= 1.7
    radius= RADIUS
    do jj= 0, 9, 1
       material= jj+3
       origin= ( jj*1.5*RADIUS, 0, 0 )
 define(PHI, jj*22.5*@pi/180 )
       direction= ( 0, cos(PHI), sin(PHI) )
       doit
    enddo

 -volumeplot
    eyeposition= ( 1.0, 2.30, 2 )
    scale= 5
    doit
Figure 1.3: A chain of simple circular cylinders. Each cylinder has its axis pointing in a different direction.
\begin{figure}\centerline{
\psfig{figure=gccylinder-example2.ps,width=18cm,bbllx=-2pt,bblly=-2pt,bburx=760pt,bbury=552pt,clip=}
}\end{figure}


next up previous contents
Next: -ggcylinder: A general cylinder Up: Geometric primitives Previous: -brick: a rectangular brick   Contents