DINO: Visualizing Structural Biology
Table of Contents
Previous
Next
User Manual

10 Geometric Primitives Dataset

The geometric primitives dataset is designed to allow arbitrary geometrical objects - points, lines, triangles and rectangles - to be implemented in the scene, along with the other objects. Its concept and syntax are similar to the above datasets. This dataset is an experimental feature and its implementation is far from complete.

As mentioned above (see "5.2.2 Creating Datasets" on page 26), a geometric dataset is created with the dbm command new . Then, one or more objects can be generated with the dataset command new . The objects will at first contain nothing; the object command add is used to append new primitives.

Syntax: new geom [-name N]
        .geom new [-name N]
        .geom.obj add PRIMITIVE POSITION

Valid PRIMITIVEs are point , line , tri and rect . POSITION depends on the PRIMITIVE:

point : p={x1,x2,x3}
line : p={{x1,y1,z1},{x2,y2,z2}}
tri : p={x1,y1,z1},{x2,y2,z2},{x3,y3,z3}}
rect : p={{x1,y1,z1},{x2,y2,z2},{x3,y3,z3},{x4,y4,z4}}

Properties that can be modified with set are color ( c ) and radius ( r ):

Syntax: .geom.obj set [c=COLOR] [r=RADIUS]

Rendering geometric objects can be modified with the object command render . The two modes on and off switch between sphere/dot ( point ), cylinder/line ( line ) and filled/outline ( tri & rect ) representation. The radius has an effect only in cylinder and sphere representation. Specific line render properties are stipple , stipplei and stippleo .

Syntax: .geom.obj render [on|off] [[!]stipple][,]  [stipplei=VAL][,]  [stippleo=VAL]]

stipplei and stippleo are floats that describe the length of the segments ( stipplei ) and the gaps ( stippleo ).

Example: // axis at origin
        new geom -name g
        .g new // name is ommited and defaults to g
        .g.g add line p={{0,0,0},{10,0,0} // x-axis
        .g.g add line p={{0,0,0},{0,10,0} // y-axis
        .g.g add line p={{0,0,0},{0,0,10} // z-axis
        .g.g set c=green,r=0.3
        .g.g render on                            // cylinder mode
        // turn stippling on
        .g.g render stipple, stipplei=0.8, stippleo=0.7
        // turn stippling off
       .g.g render !stipple
       .g.g render off                        // line mode

 

Please see the DINO homepage for examples involving the geom datatset.