Introduction

There are 10 types of basic graphical items built into VMD,
which are used with `graphics` and `draw` commands. These are:

**point {**-*x y z*}draws a point at the given position

**line {**-*x1 y1 z1*} {*x2 y2 z2*} [width*w*] [style solid`|`

dashed]draws either a solid or dashed line of the given width from the first point to the second. By default, this is a solid line of width 1. A caution about the line width from the SGI man page for

`linewidth(3G)`:The maximum width of aliased lines is 255. IRIS-4D VGX model supports antialiased line widths 1.0 and 2.0, and aliased line widths one through 255. IRIS-4D G, GT, and GTX models, the Personal Iris, Indy, Iris Entry, XL, XS, XS24, XZ, Elan and Extreme systems support antialiased line width 1.0, and aliased line widths one through 255.

Note that there is a known bug in VMD which causes it to mix up and lose track of the anti-alias and depth-cue modes.

**cylinder {**-*x1 y1 z1*} {*x2 y2 z2*} [radius*r*] [resolution*n*] [filled yes`|`

no]draws a cylinder of the given radius (default

`r`1) from the first point to the second. The cylinder is actually drawn as an`n`sided polygon. If the`filled`option is true (default), the ends are capped with flat disks, otherwise the cylinder is hollow.**cone {**-*basex basey basez*} {*tipz tipy tipz*} [radius*r*] [resolution*n*]draw a cone with the center of the base at the first point and the tip at the second. The radius(default

`r`1) determines the width of the base. As with`cylinder`, the resolution determines the number of polygons used in the approximation.**triangle {**-*x1 y1 z1*} {*x2 y2 z3*} {*x3 y3 z3*}draws a triangle with endpoints at each of the three vertices

**trinorm {**-*x1 y1 z1*} {*x2 y2 z3*} {*x3 y3 z3*} {*nx1 y1 z1*} {*nx2 ny2 nz3*} {*nx3 ny3 nz3*}draws a triangle with endpoints at each of the first three points. The second group of three values specify the normals for the three points. This is used for making a smooth shading across the triangle.

**sphere {**-*x y z*} [radius*r*] [resolution*n*]draws a sphere of the given radius (default

`r`1) centered at the vertex. The resolution (default`n`6) determines how many polygons are used in the approximation of a sphere.**text {**-*x y z*} ``*text string*''displays the text string with the bottom left of the string starting at the given vertex.

**color**-*colorId***color**-*name***color**- Each of the above geometrical objects are drawn using the current color. Initially, that color is blue, which has the colorid of 0. The*trans_name*`color`command changes the current color, and stays info effect until the next`color`command. Thus, to draw a red cylinder then a red sphere, first use the command`color red`command to change the color, then use the`cylinder`and`sphere`commands.**materials on**- Material properties are used to make the graphical objects (lines, cylinders, etc.) be affected by the light sources. These make the objects look more realistic, but are slower on machines which don't implement materials in hardware (see chapter § and sections on color and colorinfo commands for the information on how to turn off material characteristics for all objects in VMD). One surprising effect of material characteristics is that lines are affected. In some lighting situations, the lines can even appear to disappear. Thus, you may want to turn off materials before drawing lines.`|`

off**material index**- Sets the material to use for the corresponding graphics molecule. 0 corresponds to Opaque, 1 corresponds to Transparent, and higher numbers correspond to user-defined materials as displayed in the Materials menu.