ewPage-->

Surface Evolver Documentation

Surface Evolver graphics

Surface Evolver graphics consists of drawing edges and facets. There is a single graphics driver routine which produces colored edges and facets in 3D and sends them to a set of display routines. There are three main sets of display routines: Internal Evolver state information relevant to graphics: Datafile features that are relevant to graphics are: Main prompt commands that are relevant to all graphics are:

Native screen graphics

The Surface Evolver has the ability to produce its own simple screen graphics directly. For the Mac, MS-Windows, and DOS versions, it is already built in (the niftiest is the OpenGL version for Windows 95/98/NT). Those compiling unix versions must link in the appropriate module.

Screen graphics appear in their own window but are controlled by typing graphics commands at the "graphics command: " prompt in the main window.

Main prompt commands relevant to screen graphics:

Note: native mode graphics are assumed to be slow, and don't automatically redraw by default. In particular, there may be no polling for window redraw events from the operating system, so after moving or resizing a graphics window you may have to give an explicit s command to redraw. Some versions (Mac, Windows) are a little more intelligent and handle their own redrawing upon receiving redraw messages from the operating system. These versions (and DOS) will rotate the object in response to dragging the mouse across the graphics window. The rotation happens only when the mouse is released, unlike the continous rotation done in geomview.

The native screen graphics view is controlled by a view transformation matrix, which may be specified in the datafile, and which is dumped by the d or list topinfo commands. The view matrix may be changed with graphics mode commands. The view matrix does not affect geomview.

The display consists entirely of facets and edges. Special edges (fixed edges, boundary edges, constraint edges, triple edges, bare edges) are always shown, unless you make their color CLEAR. The individual facet edges can be toggled with the graphics mode command `e'.


Graphics mode commands

When the native graphics display is invoked by the '
s' command or the various `show' commands, the Evolver enters graphics mode, with the prompt `Graphics command: '. A graphics command is a string of letters followed by RETURN. Each letter causes an action. Some commands may be preceded by an integer count of how many repetitions to do. Example command: 15u2z, which does 'u' 15 times and 'z' twice. Rotation commands may be preceded by a real number giving the degrees of rotation; an integer will give a repetition count with the default angle of 6 degrees. A real number is indicated by including a decimal point.

Repeatable commands:

u
Graphics mode command. Tip up. Rotates image about horizontal axis, default 6 degrees. Example: `15u' does 90 degree rotation, `15.0u' does 15 degree rotation.
d
Graphics mode command. Tip down. Rotates image other way, default 6 degrees. Example: `15d' does 90 degree rotation, `15.0d' does 15 degree rotation.
r
Graphics mode command. Rotate right. Rotates about vertical axis, default 6 degrees. Example: `15r' does 90 degree rotation, `15.0r' does 15 degree rotation.
l
Graphics mode command. Rotate left. Rotates about vertical axis, default 6 degrees. Example: `15l' does 90 degree rotation, `15.0l' does 15 degree rotation.
c
Graphics mode command. Rotate clockwise about center of screen, default 6 degrees. Example: `15c' does 90 degree rotation, `15.0c' does 15 degree rotation.
C
Graphics mode command. Rotate counterclockwise about center of screen, default 6 degrees. Example: `15C' does 90 degree rotation, `15.0C' does 15 degree rotation.
z
Graphics mode command. Zoom. Expands image by factor, default 1.2. Examples: `z' zooms by 1.2, `2z' zooms by 1.44, '2.0z' zooms by 2.
s
Graphics mode command. Shrink. Contracts image by factor, default 1.2.
arrow keys
Graphics mode command. Move image in appropriate direction. May be prefixed by a real number, which is multiple of thirds of screen width to move. Default move is 1/12 screen width. May not work on all terminals.

Non-repeatable commands:

R
Graphics mode command. Reset viewing angles to original defaults and rescale the image to fit the viewing window.
m
Graphics mode command. Center image in viewing window.
e
Graphics mode command. Toggle showing all the facet edges.
h
Graphics mode command. Toggle hiding hidden surfaces. When ON, takes longer to display images, but looks better.
b
Graphics mode command. Toggles display of bounding box. Useful for visualizing orientation.
t
Graphics mode command. Reset mode of displaying torus model. Choice of raw unit cell, clipped unit cell, or connected bodies.
w
Graphics mode command. Toggles display of facets entirely on constraints. For a one-sided constraint, applies to facets whose vertices all hit the constraint. "w" stands for "wall".
B
Graphics mode command. Toggles display of facets on boundaries or equality constraints.
v
Graphics mode command. Toggles showing of convex and concave edges in different colors. "v" stands for "valleys".
+
Graphics mode command. Increments color number used for facet edges.
-
Graphics mode command. Decrements color number used for facet edges.
?
Graphics mode command. Prints help screen for graphics commands.
q ,x
Graphics mode command. Exit from graphics mode, and return to main command mode.

Geomview graphics

The best screen graphics are done through the free 3D viewing program geomview, which is only available for unix systems, unfortunately. Geomview can be started with the P command, option 8. One caution: geomview does not deal well with object sizes below 1e-5, so displaying micron-size objects using MKS units is ill-advised.

Picking. One of the big advantages of using geomview on an SGI (or the OpenGL version for Windows) is that you can pick vertices, edges, and facets in the geomview window by right-mouse-clicking, and the id numbers of the picked objects will be printed in the main window. Be careful when picking; it does not always work as you might hope. It may be necessary to zoom in on the surface to get a clear shot at the element you want. Be wary when the element returned is 1; that seems to be a common response when somebody is confused as to what element was picked. Also, Evolver polls geomview for pick results only when at a prompt awaiting user input. Unfortunately, picking does not seem to work in the X-windows version of geomview yet.

Main prompt commands relevant to geomview:


PostScript files

The Surface Evolver can generate PostScript files by either the postscript command or the P command option 3, or just "P 3". The image is the same one shown with the native screen graphics, so one should use the s command and graphics mode commands to get the image looking as desired. The variable brightness can be used to set the median gray level. The PostScript image is put into an 8 inch square at the lower left of the page.

With the P command, you will be prompted for options.

Show grid lines?
This is asked if you are graphing a 2D surface. If you reply 'y', all triangle edges will be plotted. If 'n', only special edges will be plotted (triple junctions, borders, etc.; this can be controlled with the show edges command). Default 'n'. The postscript command uses the gridflag toggle to control this.
Do colors?
If you reply 'y', edges and facets will be plotted with their color attributes and shading (if activated). If 'n', then all edges are plotted as black, and all facets as white with shading. Default 'n'. The postscript command uses the pscolorflag toggle to control this.
Do crossings?
This is asked if the surface is 1-dimensional (the string model) and the dimension of space is at least 3. If you reply 'y', a 3D effect will be created by plotting edges back to front, with each edge plotted first as a thick white line and then as a thin black line. This creates a broken back line and continuous foreground line at each crossing. Default 'n'. The postscript command uses the crossingflag toggle to control this.
Do labels? (i for ids, o for originals)
This PostScript P 3 command subprompt gives you a chance to put numeric labels on vertices, edges, and facets, which is useful for debugging or modifying a datafile. Edge labels are slightly displaced toward the head of the edge, and facet labels are signed according to which side of the facet is visible. Choose 'i' or 'y' for the current element id, or 'o' for the original element number. If you don't want any labels, just hit RETURN. The postscript command uses the labelflag toggle to control this.
Enter file name (.ps will be added):
Give the name of the PostScript output file. A ".ps" extension will be added if it is missing. Not a good idea to just hit RETURN, since that will produce the file ".ps".

OpenGL Evolver

There is a version of the Evolver for Windows 95/98/NT that uses OpenGL for its screen graphics. OpenGL is standard on Windows NT and 98, but Windows 95 users may have to download the appropriate OpenGL libraries (unzip and put in your system directory). Tbe graphics display is invoked with the 's' command, which leaves you at the graphics prompt, which you should quit 'q' right away since graphics commands are better given in the graphics window. Besides all the standard screen graphics commands, there are many geomview-like features. The left mouse button moves the surface continuously, and the right mouse button picks vertices, edges, and facets. Picked element id numbers are printed in the console window. With the graphics window in the foreground, these keyboard commands are active:


h Print a help screen on the console window.
r Rotate mode for left mouse button.
t Translate mode for left mouse button.
z Zoom mode for left mouse button (and use F to focus on particular vertex).
c Clockwise/counterclockwise spin mode for left mouse button.
W Widen edges.
w Narrow edges.
b Decrement edge front bias by .001.
B Increment edge front bias by .001 (to show edges more clearly).
R Reset the view.
m Center the image.
p Toggle orthogonal/perspective projection.
s Toggle cross-eyed stereo.
e Toggle showing all edges, regardless of "show edge" condition.
f Toggle showing all facets, regardless of "show facet" condition.
F Move the rotate/zoom origin to the last picked vertex.
arrow keys Translate a bit.


Back to top of Surface Evolver documentation.