next up gif contents index
Next: Help Up: Menus Previous: Macros

 

Graphics

  This menu allows a degree of control over some of the graphics options.

Viewpoint

There are several options which relate to the current viewpoint, or more precisely, the viewing transformation.  

Reset View

  This option resets the viewpoint to the default viewpoint, removing all translations and rotations, and re-centers the molecule in the display.  

Reset Rotations

  Unlike the reset view option above, this option only resets the rotation components, leaving the center, scale and translations intact.  

Center

  This option removes any applied translations and moves the center of rotation back to the center of the display. This is the same as the center command.  

Center on selection

  This option prompts for a selection string to specify the center of rotation. It also removes any applied translations and moves the center of rotation back to the center of the display. This is the same as the set center command.  

Center on coordinates

  This option prompts for the X, Y, and Z coordinates to use as the center of rotation. It also removes any applied translations and sets the center of display to be at the new coordinates.  

Center on cell

      If the crystal parameters are defined (§6.7.11), this option will set the origin of rotation and the center of the display to be the midpoint of the unit cell. It also resets the global projection and clipping planes to be large enough to accommodate the unit cell.  

Undo last orientation change

  This command will undo the last rotation or translation orientation change entered either via the mouse or by a rotation/translation text commands (e.g. xr=10). For mouse rotations/translations, the previous viewing orientation is considered to be the state before the button was pushed. This means you can do a complicated series of rotations (while holding down the mouse button), and after you release the mouse button, the orientation may be reverted to the previous viewpoint (before the series of rotations) with this command. Note that this is also accessible via the Edit->undo menu option.

Scene antialiasing

There are two options which affect the antialiasing of the entire scene, which will smooth out jagged edges.  

Antialias scene

    Unlike the antialias lines option, the scene antialiasing is only performed once. However, it will also antialias polygons, and therefore results in a much nicer overall appearance. The performance penalty for scene antialiasing is too much for interactive graphics, which is why it's a one-time-only command. The most common use of this command is to generate high-quality images on screen to photograph. As such, it should probably be used in full-screen mode, and users should define a simple macro to access the command in order not to have to toggle the menu bar on and off, which would re-draw the scene, and negate the antialiasing. Note that it it not necessary to antialias files which are to be exported via the ``Save image'' commands, as the image saving routine automatically antialiases the scene before saving it.  

Antialias level

This option prompts for the level of antialiasing to be performed, which may range from 1 to 7. This is not a linear scale, but is instead roughly exponential. The level controls the number of times the image is redrawn with a slightly different viewpoint in order to effect the antialiasing. The levels correspond to: 0: no antialiasing; 1: 2 redraws; 2: 3 redraws; 3: 4 redraws; 4: 8 redraws; 5: 15 redraws; 6: 24 redraws; and 7: 66 redraws. The antialias level is used by both the Antialias scene command of the graphics menu, and the automatic antialiasing applied by the save image commands.  

Graphics parameters 

These sub-menus control various aspects of the graphics display.  

Graphics modes

 

Stereo

    This submenu controls the stereo parameters for spock. Users can select either side-by-side or hardware stereo on SGI systems. There are also options to prompt for the twist (the stereo rotation angle) and the separation (the distance views in side-by-side mode). The separation is entered in fractional screen coordinates, where 1.0 is the entire width of the viewing area. Users may wish to set their preferred stereo viewing angle, and then copy the relevant portion of the history file to their .spockrc startup file.  

Mouse Bindings 

  This submenu controls the binding of mouse button 2. By default, pressing this button and moving the mouse controls the scale and the Z-rotation. It may also be used to control several other properties. Since the scale/rotation combination is often needed even while using the other modes, pressing control, shift or alt before the mouse button temporarily reverts the mouse control back to those parameters.

 

Viewing matrices

These options set and print the current viewing transformation matrices. See Appendix E for details on how to specify matrices in spock.

 

Coloring 

These menu items allow users to view and set various parameters which have to do with coloring.     Note: If you don't like the default color definitions spock supplies, and you edit the color map, you can save your preferences with the Save preferences command of the File menu. This adds the colormap to your personal .spockrc file. The default Spockrc setup file (§ 3) defines the variables $white, $red, $green, $blue, $yellow, $cyan, $magenta, $orange, $purple, and $sky to refer to colors 1-10, respectively. If you've edited the colormap, you may need to define your own names for colors in your .spockrc files. If the definitions for colors 1-10 are changed, the variables should also be changed to names appropriate for the new colors. The literal definition of the color variable names is simply a number, so if you change color 1 (white) to be mauve, don't be surprised when $white results in mauve! If you change any of colors 1-10, you should re-define the variables to point to color numbers that are appropriate, for instance, set $white=11. See §5.2.4 for information about setting environment variables. See §7 for details on history files, including the .spockrc file.

 

Clip Tool

    This pops up a window showing the top view of the scene in the main window. There are four sliders on the sides of this view, which control the front and rear main clipping planes, and the front and rear auxiliary clipping planes. Moving the sliders will move the appropriate clipping plane and draw a line across the image indicating where the plane intersects the view. The four sliders and the indicating lines are color coded to help keep them straight. The outermost sliders control the main clipping planes, and the innermost sliders control the aux clipping planes. All objects are clipped by the main clipping planes, but only the items specified in the Aux Clipping menu are affected by the aux clipping planes. This allows you to (for instance) show a cut-away surface, while still showing all of the bonds in a structure. The aux clipping planes will also clip the top view, but the main clipping planes won't. Be aware that there is a performance penalty for using the aux clipping planes, so that if you don't need them you should make sure the sliders are all the way to the top or bottom.

Note that normally the position of the clipping planes (and their indicator lines) aren't updated until the slider ``thumb'' is released. If you wish the clipping planes to be updated as you drag the slider, press shift, alt, or control before clicking on the thumb, and hold it down as you drag. This forces the display to be updated at each position, but this can be slow with complicated graphics.

The clip tool's top view can also be useful when to help position a subset that you're manipulating independent of the rest of the molecule (see § 6.8).   Finally, it's worth mentioning that the dial box (§cross_ref_motif.) and the fake dial box (§6.11.5) provide a way of altering the slab thickness (the slab dial).   The Aux Clipping menu also has an entry which allows you to set the box depth. Spock's geometry is all contained in a cube whose depth is generally determined from the coordinates of whatever atoms or surfaces are currently loaded. If, for any reason, you wish to change the size of this cube, you may enter a value here. The value entered should be large enough to contain all the geometry you wish to display. Selecting this option also resets all clipping planes to their default values. Be aware that the scaling factor does not influence this box, so if you've zoomed out (and consequently have a small scaling factor and image) and set a really tiny box, say 1.0 Ångstrom, you may be able to see much more than 1 Ångstrom. Also note that choosing ``Reset View'' from the graphics menu will re-calculate the box size from the loaded atoms or surfaces, and thereby override any entered value for the box size.     The ``Clip Type'' menu of the Clipping Tool switches the clipping tool back and forth between controlling the clipping planes, which is the default behavior, and controlling the interpolation plane, which shows the 2D contours §6.4.6. Selecting ``Interpolation Plane'' from this menu will hide all of the clipping plane sliders, and show a single slider to control the interpolation plane. Moving the slider up and down will change the apparent screen Z coordinate of the interpolation plane. Of course, 2D contours must be selected in the display menu, there must be an active potential map, and at least one 2D contours must be defined before moving this slider will appear to have any effect. To return to controlling the clipping planes, simply select ``Clipping Planes'' from the Clip Type menu.    

Material Tool

  The appearance of most objects in spock is largely determined by the material properties assigned to that object type. This menu entry allows users to change the material properties associated with an object, and thus alter the appearance. A detailed description of the lighting/material properties is beyond the scope of this manual; consult the OpenGL Programming Guide [10]. However, the material properties are briefly described below.       The materials tool menu has a list of objects; selecting any object displays the material editor for that object. Most of the objects are normal spock objects, bonds, atoms, or surfaces. There are, however, two special objects available through the materials menu: the ``global material'', and the ``back-face Material''. The global material is an easy way to set material properties for all other materials (except for the back-face material) at once. The back-face material controls the appearance of the back faces of polygons, for instance the inside of surfaces. Normally, the back face is shown in a different material and color than the front face, to indicate that you're seeing the ``wrong'' side of the polygon. All objects share the same back-face material, which by default is a dull grey color. Users can elect to use the same color scheme for both the front and back face of objects via the ``Tie Faces'' submenu of the graphics menu (§6.11.5).

The material properties:

   

Light Tool

  The light tool box allows users to toggle on and off each of the lights spock uses. There are currently two light sources in spock. The first light (Light 0) is the headlight, which is assumed to be infinitely distant and points into the screen. The second light's position and direction may vary as described below.

Users may also set the light parameters, as described in detail in the OpenGL Programming Guide [10]. Even though a detailed explanation of the lighting parameters is beyond the scope of this manual, the brief explanation of the material properties for the Material Editor (§6.11.4) also applies to the light properties.   The second light's (Light 1's) position may be placed under mouse control using this Graphics tex2html_wrap_inline6800 Mouse Binding menu option. Initially, the second light's position is also assumed to be infinitely distant, so only it's direction is important. The light position is assumed to ride on a sphere centered at the origin of rotation, and moving the mouse left and right or up and down changes the position of the light accordingly. A yellow sphere (the ``sun'') moves around to indicate the light position. The sun is also visible if the Light 1 editor is displayed.     Users may use the Distance control of the Light 1 editor to alter the distance to the second light source. As stated above, initially the second light source is treated as an infinite light source which simplifies (and thus speeds) the lighting calculations. However, setting the distance control to a value of other than +1 or -1 changes the interpretation of the light position. The distance value is the distance from the center of rotation expressed as a fraction of the distance to the front or rear clipping plane, and so the light's coordinates are calculated to lie at the specified distance from the origin of rotation along the current direction vector. Setting the distance to 0.0 will place the light source at the center of rotation, and negative distances will backlight the scene. Using the clipping tool's (§6.11.4) top view may aid in positioning the light in 3D coordinates. Using a local light model like this may have a better appearance, but there is an associated performance penalty.    

Tie faces

          This submenu controls the representation of the back face of polygons. Normally, the back face of all polygons is rendered with the currently defined backface material as controlled by the material editor (§ 6.11.4), usually an amorphous gray color. This is what you'll usually see if you clip into a 3D contour or surface, for example, so that the inside is exposed. Occasionally, users may wish for the inside surface of an object to be rendered in the same color as the outside surface. Toggling on the appropriate option here will accomplish this. Note that selecting the ``Thin Ribbon'' worm drawing style automatically sets this option for worms, but it can be turned back off, resulting in thin ribbon worms that have different colors on the two sides. Also note that only the color property is shared between front and back faces when this option is selected. If you've defined some special material properties for the front face of an object, (such as specularity) it will not be applied to the back face, unless that property is set for the backface material as well via the Material Editor (§ 6.11.4).  

Fake dial box

  This option puts up a dialog box with buttons which act as fake dials. Each button is labeled with its function. These buttons are sensitive to the mouse position within the button. Pressing on the right side of the button increases the parameter, and pressing on the left side decreases the parameter (or applies a positive or negative rotation, respectively). Button presses far from the middle of the button (in the horizontal dimension) have a greater effect than button pushes closer to the middle. Unlike most buttons, the fake dials are activated on the button push rather than the button release. The fake dial buttons also have an auto-repeat feature, where if you hold the button down, the command is repeated. If you move the mouse while holding the button down, the parameter will increase or decrease according the the current mouse position. Note that there are separate dials for controling the world rotations and translations, and for controling subset rotations/translations. In order for subset rotations/translations to work, you must have created a subset with the subset menu (or the subdef= command), and attached motion to that subset with the Subset->Attach motion menu (§6.8).     Besides world and subset rotations, there are dials for altering the stereo twist and separation (§6.11.3, § 6.11.3), and for altering the slab thickness.  

Customize Dial Box

      This menu allow users to set what parameter each dial controls. It is intended to allow users familiar with the dial layout of some other program to configure spock to use the same layout. The use of the dial box is described in §4.4. To use these options, first select a dial, and then select the parameter you wish for that dial to control from the pop-up menu. The current dial bindings will be printed when you select a dial. Note that changes here will also affect the fake dial box. After you've set the dial layout you want, you may wish to copy the add the appropriate commands from the current .spockhist file to your .spockrc file.

Note that there are more than eight possibilities for dial functions, but only 8 dials in the standard dial box. The only the first 8 dial options are configurable via this menu, and these 8 functions are mapped onto the 8 dials.  


next up gif contents index
Next: Help Up: Menus Previous: Macros

Jon Christopher
Tue Sep 14 16:44:48 CDT 1999