Screen graphics appear in their own window but can be controlled by typing graphics commands at the "graphics command: " prompt in the main window. OpenGL graphics can also be controlled by mouse and keyboard actions in the graphics window.
Main prompt commands relevant to screen graphics:
s
for starting screen graphics and entering
graphics command mode
D
or
autodisplay
for toggling automatic redraw when the surface changes.
Default is automatic redraw.
close_show
for ending screen graphics
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 elements may be
read or set at runtime by view_matrix[i][j]
, where
the indices start at 1. In particular, one can write
command scripts to save and reload particular view matrices;
see saveview.cmd
in the distribution package.
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'.
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.
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. |
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. In the native graphics window, the 'o' key does the same thing. The color of the bounding box can be changed by setting the bounding_box_color variable. |
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. |
s
' main prompt 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. Or you can use the
`showq
' command, which automatically returns to the main prompt.
t
(translate), r
(rotate), z
(zoom),
or c
(clockwise spin).
Default is r
mode.
M
' key in the graphics window,
the right button brings down a graphics window menu.
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. |
+ | Widen edges. |
- | 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. |
M | Have the right mouse button bring up a menu instead of picking. |
P | Have the right mouse button do picking instead of menu (default). |
p | Toggle orthogonal/perspective projection. |
s | Toggle cross-eyed stereo. |
e | Toggle showing edges, regardless of "show edge" condition. |
f | Toggle showing facets obeying "show facet" condition or no facets. |
F | Move the rotate/zoom origin to the last picked vertex. |
G | Start another graphics window with independent camera. |
o | Toggle drawing a bounding box. |
g | Toggle Gourard (smooth) shading. |
l | Enable clipping plane in translation mode. |
L | Disable clipping plane. |
k | Enable clipping plane in rotation mode. |
x | Close the graphics window. |
arrow keys | Translate a bit. |
And some more advanced commands most users will never use, but are listed here for completeness: | |
H | Print advanced help. |
a | Toggle using OpenGL element arrays. |
i | Toggle interleaved elements in OpenGL arrays. |
I | Toggle indexed OpenGL arrays. |
S | Toggle OpenGL triangle strips. |
Y | Toggle strip coloring (I was curious as to what OpenGL triangle strips would look like). Original colors are restored when toggled off. Implicitly invokes 'S' |
D | Toggle using a display list. |
Q | Toggle printing drawing statistics. |
Main prompt commands relevant to geomview:
geomview
or P 8
to start geomview
P 9
to end geomview
geompipe
to pipe geomview input someplace else
geomview
string
to send user commands to geomview
gv_binary
toggle to control interface mode
view_4D
to toggle sending 3D or 4D info to geomview
view_matrix[i][j]
, where
the indices start at 1. In particular, one can write
command scripts to save and reload particular view matrices;
see saveview.cmd
in the distribution package.
The view matrix is saved in dump files.
The file saveview.cmd
in the fe
subdirectory of the Evolver
distribution package has a script saveview
which writes out the
current values of the view matrix in a format that can be read back in
to restore a view. Example:
Enter command: read "saveview.cmd" Enter command: saveview >>> "thisview.cmd" ... Enter command: read "thisview.cmd"
view_transforms[][][]
.
Because some transformations may reverse the front and back sides of
surfaces, transforms can be made to swap frontcolor and backcolor
attributes of facets; see
view_transforms or
view_transform_generators)
for syntax. The read-only array view_transform_swap_colors[]
has a 1 entry for the transforms that do swap
Transforms may be turned into actual copies of the surface with the detorus command.
Picked vertex, edge, and facet numbers are stored in the internal variables
pickvnum
, pickenum
, and pickfnum
, respectively.
The 'F' key command on the graphics window sets the rotation and scaling
center to the pickvnum vertex. Pickvnum is settable with ordinary assignment
commands, so the user can zoom in on any vertex desired.
Be wary that pick output can confuse things a bit in the command window, particularly if you partially type a command, then pick, then try to complete the command.
clip_coeff[][]
,
with the first plane coefficientsa,b,c,d stored in clip_coeff[1][1]
through clip_coeff[1][4]
, etc.
The user does not have to create clip_coeff[][]
.
To use clip view,
first set the coefficients of however many clip planes you want
and then use the clip_view
toggle.
For example, to get a vertical clipping plane parallel to the y and z axes
and a little in front of them:
clip_coeff[1][1] := 1; clip_coeff[1][2] := 0; clip_coeff[1][3] := 0; clip_coeff[1][4] := .2; clip_view;With OpenGL graphics, the first clip plane plane can be varied interactively by hitting the '
l
' key (lower case L)
in the graphics
window and dragging the mouse horizontally.
The 'k
' key will make mouse dragging change the orientation of the
clip plane.
Hit 'r
' or 'c
' or 't
' to
get back to another mouse mode. 'L
' will turn off clip_view.
Clip view works separately, and after, torus model viewing modes such as clipped and connected, so it is no problem to have them together.
In case clip_view
and slice_view
are both in effect, slice_view
operates instead of clip_view
.
slice_coeff[]
(which the user does not have to create). To use slice view,
first set the coefficients and then use the slice_view toggle.
For example, to get a vertical slice parallel to the x and y axes
and a little in front of them:
slice_coeff[1] := 1; slice_coeff[2] := 0; slice_coeff[3] := 0; slice_coeff[4] ;= .2; slice_view;The cross-section will be in the form of line segments of the same color as the facets they are sections of. With OpenGL graphics, the slice plane can be varied interactively by hitting the '
l
' key (lower case 'L')
in the graphics
window and dragging the mouse horizontally.
The 'k
' key will make mouse dragging change the orientation of the
clip plane.
Hit 'r
' or 'c
' or 't
' to
get back to another mouse mode.
'L
' will turn off slice_view
.
Slice view works separately, and after, torus model viewing modes such as clipped and connected, so it is no problem to have them together.
In case slice_view
and clip_view
are both in effect, slice_view
operates instead of clip_view
.
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?
show edges
command).
Default 'n'.
The postscript command
uses the ps_gridflag toggle to control this.
Do colors?
Do crossings?
Do labels? (i for ids, o for originals)
ps_labelsize
variable, whose default value is 3.0.
Enter file name (.ps will be added):
.ps
"
extension will be added if ".ps
" or ".eps
"
is missing. Not a good idea to just
hit RETURN, since that will produce the file ".ps
".
ps_linewidth
is
defined, that value is used as the edge width. Otherwise
some internal read-write variables are consulted for
various types of edges, in order:
ps_stringwidth
- edges in the string model, default 0.002 ps_bareedgewidth
- "bare" edges, no adjacent facets, default 0.0025 ps_fixededgewidth
- "fixed" edges, default 0.002 ps_conedgewidth
- edges on constraints or boundaries, default 0.002ps_tripleedgewidth
- edges with three or more adjacent facets, default 0.0015 ps_gridedgewidth
- other edges, default 0.001
Visibility testing. PostScript files of complicated surfaces
may contain a high proportion of facets not visible in the final image.
This takes much extra file space and rendering time. There is an option
to process the list of PostScript facets to eliminate the non-visible
facets, the visibility_test
option command. For my own
debugging purposes, there is a visibility_debug
toggle,
which causes printing of verbose information; don't use it.
Internal Evolver state information relevant to graphics:
show
,
showq
, and
show_expr
for controlling which elements are displayed.
set edge color
set facet color, frontcolor, backcolor
transforms
toggle
transform_expr
thickness
raw_cells
,
clipped
, or
connected
show_inner
and show_outer
toggles
display_text
delete_text