Surface Evolver Documentation

Back to top of Surface Evolver documentation.       Index.

Surface Evolver syntax

Both the datafile and user commands follow a common general syntax described in this file, with a few differences as noted.

Lexical format

For those who know about such things, the datafile and commands are read with a lexical analyzer generated by the lex program. The specification is in datafile.lex. Commands are further parsed by a yacc-generated parser.

In parsing an expression, the longest legal expression is used. This permits coordinates to be specified by several consecutive expressions with no special separators.


Comments

Comments may be enclosed in /* */ pairs (as in C) and may span lines. // indicates the rest of the line is a comment, as in C++.

Lines and line splicing

The file is made up of lines. Line breaks are significant. The next physical line can be spliced onto the current line by having \ be the last character of the current line. Line splicing is not effective in // comments. Blank lines and comment lines may be placed freely anywhere. The various combinations of CR and NL that various computer systems use are all recognized

Case

Upper and lower case is not significant in the datafile, except in #define macro names. In run-time commands, case is only significant for single-letter commands.

Whitespace

In the datafile, whitespace consists of spaces, tabs, commas, colons, and semicolons. So it's fine if you want to use commas to separate coordinate values, and colons to prettify constraint definitions. In commands, whitespace consists of spaces and tabs. CTRL-Z is also whitespace, for the benefit of files imported from DOS.

Identifiers

Identifiers follow standard C rules (composed of alphanumeric characters and '_' with the leading character not a digit) and must not be keywords. Identifiers are used for macro names (in the datafile) and user-defined variables and commands. Identifiers must have at least two characters, since single characters can be confused with commands. To find out if a name is already in use as a keyword or user-defined name interactively, use help command. In scripts, one can use the is_defined function, which has the syntax
 is_defined(stringexpr)
The stringexpr must be a quoted string or other string expression. The return value is 0 if the name is undefined, 1 if defined. This function is evaluated at run-time, but variables in the whole command are parsed before the command is executed, so a command like if is_defined("newvar") then newvar := 1 else newvar := 2 will give newvar the value 1 even if this is its first appearance. A better way in scripts to test is to use the define command to define the variable without initialization, and then test to see if it has the default value, i.e. 0 for a numeric variable and a sizeof 0 for a string variable.

Numbers

Constant values may be in any of the usual forms. This includes integers, fixed point, and scientific notation such as
      2    -3    .5    23.    5e-10    +0.7D2
Hexadecimal integers starting with 0x, as in 0x12Af, are also accepted, as are binary numbers such as 11001b, indicated by a trailing 'b'. Color names are interpreted as integers.

Colors

The colors of edges and facets are recorded as integers in the range -1 through 15. How these integers translate to colors on the screen is determined by how Evolver's graphics drivers are written. The following synonyms are supplied, and it is hoped that the graphics drivers will be written to display these correctly:
-1 CLEAR
0 BLACK
1 BLUE
2 GREEN
3 CYAN
4 RED
5 MAGENTA
6 BROWN
7 LIGHTGRAY
8 DARKGRAY
9 LIGHTBLUE
10 LIGHTGREEN
11 LIGHTCYAN
12 LIGHTRED
13 LIGHTMAGENTA
14 YELLOW
15 WHITE
The special color value CLEAR (-1) makes a facet transparent. "Transparent" is a synonym for clear.

These tokens are simply translated to integer values wherever they occur, so these are reserved words. Edge and facet colors may be set in the datafile or by the set command.


Arithmetic expressions

Arithmetic expressions evaluate to real numbers. Boolean expressions are a subclass, with zero as false and nonzero as true; true results evaluate as 1. Ordinary algebraic notation is used.

Constant expressions

Constant expressions are evaluated when parsed. They are denoted by constexpr in various syntax definitions. They occur mostly in the datafile. Although they may contain variables, changing the variable value after parsing has no effect. Variable expressions (denoted by expr in syntax definitions) are recorded as parse trees and are re-evaluated each time needed.

Atomic values

The following evaluate to single numbers in expressions:
number
An integer, real, or hexadecimal constant. Hex numbers begin with 0x.
pi
Mathematical constant, ratio of circle circumference to radius.
x1,x2,...; x,y,z,w
Depending on context, space coordinates, vertex coordinates, edge vector components, or facet normal components.
p1,p2,...
Parameters of vertices on boundaries.
G
Current gravitational constant for calculating gravitational energy.
user-defined variables
Arbitrary variables defined in the datafile or at runtime.
Indexed array variables.
User-defined multidimensional arrays of reals or integers, and some internally defined arrays.
internal variables
Special pre-defined variables.
element attributes
Things like vertex coordinates, edge length facet area, colors.
named quantity attributes
Including modulus, target, value, pressure.
method instance attributes
Including modulus, value.
toggle name
Any toggle command name may be used as a Boolean variable in an expression (full word toggles, not single letters). But beware the ambiguity in interpreting a toggle as a command or a value. You may have to force the toggle to be interpreted as a value. "ad := autodisplay" sets ad as a command synonym for autodisplay, while "ad := (autodisplay)" records the current boolean value.

String expressions

A string expression evaluates to a string of characters. At present, the only ways to produce strings are:

Arithmetic operators

These are the arithmetic operators that may appear in expressions:
+,-,*,/
Usual real arithmetic; +,-,* also work with arrays. NOTE: A '+' or '-' preceded by whitespace and followed by a number is taken to be a signed number. Thus "3 - 5" and "3-5" are single expressions, but "3 -5" is not. This is for convenience in separating multiple expressions listed on the same line for vertex coordinates, metric components, etc. in the datafile.

idiv
Integer divide. Rounds toward zero, then does integer division. Ex: 7 idiv 2 is 3; -3.5 idiv 2.1 is -1; -3 idiv 2 is -1.

%, mod
Real arithmetic modulus, x % y = x - floor(x/y)*y.

imod
Integer arithmetic modulus, x imod y = floor(x) - floor(floor(x)/floor(y))*floor(y).

=
NOT an assignment operator. Treated as low-precedence '-' so level-set constraint formulas like x^2 + y^2 - R^2 may be written naturally as x^2 + y^2 = R^2.

(,)
Parentheses for grouping and functional notation.

^,**
Raise to real power.

? :
Conditional expression, as in the C language. x ? y : z evaluates to y if x is nonzero and to z if x is zero.

++,--
C-style pre- and post-increment and decrement commands. These work only on single variables and only as stand-alone commands, as in "for" loops for example:
           for ( inx := 1 ; inx <= 10 ; inx++ )  

Boolean operators

Boolean expressions are a subclass of arithmetic expressions, with zero as false and nonzero as true; true results evaluate as 1.
==,>,<,>=,<=,!= Numerical or boolean comparison.
NOT, ! Boolean NOT
AND, && Boolean AND, with short-circuit evaluation.
OR, || Boolean OR, with short-circuit evaluation.

Operator precedences

Here is the order of operator precedence, listed from high to low with equal precedence on same line, with associativity.
Operator Associativity
^,** left associative
unary - right associative
*,/,%,IMOD,IDIV left associative
+,- left associative
on_boundary
on_constraint
hit_constraint
on_quantity
on_method_instance
nonassociative
==,>,<,>=,<=,!= right associative
NOT, ! right associative
AND, && left associative
OR, || left associative
? : left associative
= left associative

Math functions

These are the math functions available in expressions. They take one argument in parentheses, except where noted.
abs(x)
Absolute value.

sqr(x)
Square.

sqrt(x)
Square root. Argument must be nonnegative.

sin(x), cos(x), tan(x)
Trig functions, argument in radians.

acos(x), asin(x), atan(x)
Inverse trig functions (acos, asin arguments clamped to [-1,1]). Output in radians.

atan2(y,x)
Inverse tangent, range -pi to pi.

log(x), exp(x)
Natural log, exponentiation base e.

sinh(x), cosh(x), tanh(x)
Hyperbolic functions.

asinh(x), acosh(x), atanh(x)
Inverse hyperbolic functions.

pow(x,y)
Raise x to real power y; x may be negative if y is an integer.

ceil(x), floor(x)
Round up or down to integer.

minimum(a,b), maximum(a,b)
Extreme of two arguments.

ellipticE(x), ellipticK(x)
Complete elliptic functions.

incompleteEllipticE(phi,m), incompleteEllipticF(phi,m)
Incomplete elliptic functions of parameters (phi,m); agrees with Mathematica definition.

matrix_multiply(A,B,C)
Built-in matrix multiplication of arrays. Stores A*B in C. A, B, and C must be stand-alone 1 or 2 dimensional array variables with appropriately matching dimensions; in particular, you cannot get a scalar product of vectors with this, unless you declare A to be 1xN, B to be Nx1, and C to be 1x1. C must be different from A and B. Does not return a value. Also doesn't work with array attributes yet. Obsolete, since the * operator now works with vectors and arrays.

matrix_inverse(A,B)
Built-in matrix inversion of an array. Stores the inverse of A in B. A and B must be stand-alone 2 dimensional array variables with matching dimensions. B can be the same as A. Returns a value, 1 for success, 0 for failure or singular matrix.

matrix_determinant(A)
Built-in matrix determinant of a square array. Has function syntax, so it returns the value of the determinant.

Syntax: det := matrix_determinant(A)

  Enter command: define aaa real[2][2]
  Enter command: aaa[1][1] := 2; aaa[1][2] := 3; aaa[2][1] := 4; aaa[2][2] := 5
  Enter command: print matrix_determinant(aaa)
                  -2
Also works on square 2D array attributes of elements. Does not modify the array.

wrap_inverse(w)
Inverse of symmetry group element w, in numerical representation. Useful only if a symmetry group has been declared in the datafile.

wrap_compose(w1,w2)
Composition of symmetry group elements w1, w2, in numerical representation. Useful only if a symmetry group has been declared in the datafile.

usrn
user-defined functions


Miscellaneous functions

IS_DEFINED

To find out if a name is already in use as a keyword or user-defined name, use the is_defined function, which has the syntax
 IS_DEFINED(stringexpr)
The stringexpr must be a quoted string or other string expression. The return value is 0 if the name is undefined, 1 if defined. This function is evaluated at run-time, but variables in the whole command are parsed before the command is executed, so a command like if is_defined("newvar") then newvar := 1 else newvar := 2 will give newvar the value 1 even if this is its first appearance. A better way in scripts to test is to use the define command to define the variable without initialization, and then test to see if it has the default value, i.e. 0 for a numeric variable and a sizeof 0 for a string variable.

SIZEOF

Returns the number of entries in an array or array extra attribute. Can also be applied to a string or string variable to get the number of characters in the string. Syntax:
  SIZEOF(name)
  SIZEOF(string)
In the first form, name is the name of the array or extra attribute, not in quotes.

VALID_BOUNDARY

Boolean function. Returns 1 or 0 depending on whether a parametric boundary with the given number exists (note that the name of a named boundary is internally interpreted as a number). Syntax:
 VALID_BOUNDARY(expression)
One use is in looping through all parametric boundaries, in conjunction with the high_boundary internal variable. For example,
  for ( bnum := 1 ; bnum <= high_boundary ; bnum += 1 )
    if valid_boundary(bnum) then
       printf "Boundary %d has %d vertices on it\n",bnum,
          sum(vertex,on_boundary bnum);

VALID_CONSTRAINT

Boolean function. Returns 1 or 0 depending on whether a level-set constraint with the given number exists (note that the name of a named constraint is internally interpreted as a number). Syntax:
 VALID_CONSTRAINT(expression)
One use is in looping through all level-set constraints, in conjunction with the high_constraint internal variable. For example,
  for ( cnum := 1 ; cnum <= high_constraint ; cnum += 1 )
    if valid_constraint(cnum) then
       printf "Constraint %d has %d vertices on it\n",cnum,
          sum(vertex,on_constraint cnum);

VALID_ELEMENT

Boolean function. Returns 1 or 0 depending on whether an element of a given index exists. Syntax:
 VALID_ELEMENT(indexed_element)
Examples:
   if valid_element(edge[12]) then refine edge[12]
   if valid_element(body[2]) then set body[2].facet color red

User-defined built-in functions

User-defined functions can be defined in C in userfunc.c, so you have to be compiling your own Evolver if you want to use these. They are meant for situations where expression interpretation is too slow, or functions such as elliptic integrals are wanted. Currently, they are automatically functions of the coordinates. Do not give any arguments in the expression; for example "(usr1 + usr3)/usr10".

Aggregate functions

The maximum, minimum, sum, or average of an expression over a set of elements may be done with aggregate functions. The syntax is
   aggregate(generator,expr)
where aggregate is max, min, sum, or avg, and generator is an element generator. Example: this prints the total area of all green facets:
   print sum(facet where color == green, area)
"Count" is an aggregate function that gives the number of elements generated, regardless of the expression.

Element attribute values in expressions

The value of any element attribute may be used in an expression. The attribute name alone may be used if there is a default element active. Example:
   foreach facet do print area
Otherwise the attribute is referred to as a field of the element:
   foreach facet ff do print ff.area
Indexed extra attributes need an index in square brackets:
   foreach facet ff do print ff.something[3]
Index values are rounded down to integer values. Indexing starts with 1.

Most attributes are numerical or boolean, but some are element generators.

The following attributes are available (for details, see elements):

X1,X2,...,X,Y,Z,W
Coordinates of vertices, components of edge vector or facet normal. May also be referred to in index form as x[1], x[2], etc.
P1,P2
Parameters for parametric boundaries.
ID
Element identifying number.
OID
Oriented element identifying number.
ORIGINAL
Number of parent datafile element.
COLOR
Integer representing color of facet (color of front if back different) or edge.
FRONTCOLOR
Color of front of facet.
BACKCOLOR
Color of back of facet.
VALENCE
Number of edges on a vertex, facets on edge, edges on a facet, or facets, or on a body.
AREA
Area of facet.
LENGTH
Length of edge.
VOLUME
Actual volume of body.
TARGET
Target fixed volume of body.
VOLCONST
Constant added to calculated volume of body.
DENSITY
Density of edge, facet, or body.
DIHEDRAL
Dihedral angle of facets on an edge.
ORIENTATION
Sign for oriented integrals of edges or facets.
ON_CONSTRAINT n
True if element on given constraint. n may be a constraint number or a constraint name.
HIT_CONSTRAINT n
True if element is exacty on a constraint. Useful for one-sided constraints. n may be a constraint number or a constraint name.
ON_BOUNDARY n
True if element on given boundary. n may be a boundary number or a boundary name.
ON_QUANTITY quantityname
True if the given named quantity applies to the element.
ON_METHOD_INSTANCE instancename
True if the given method instance applies to the element.
WRAP
Numerical edge wrap in torus model or other quotient space.
quantity_name
Contribution of an element to a named quantity.
instance_name
Contribution of an element to a named method instance.
extra_attribute[expr]
Name of user-defined extra attribute, with subscript if needed.
VERTEX
Generator of edge or facet vertices.
MIDV
Id of edge midpoint in quadratic model.
EDGE
Generator of edges attached to vertex, or edges around a facet.
FACET
Generator of facets around a vertex or an edge.
BODY
Generator of bodies that a facet is on.

Variables

The Evolver command language has its own version of the user-defined variables common to most programming languages. Variables are typed according to the types of the values assigned to them: numeric or string. Users may define numeric variables either by variable declarations in the datafile, or both types by assigning a value to an identifier in a command. A variable may be subjected to optimization by declaring it an optimizing_parameter in the datafile.

Arrays

It is possible to define multidimensional arrays of integers or reals with the syntax
   DEFINE variablename  REAL|INTEGER|STRING expr]...
This syntax works both in the datafile header and at the command prompt. If the array already exists, it will be resized, with old elements kept as far as possible. Do not resize with a different number of dimensions. Note that array indexing starts at 1. A size of 0 is legal, and useful if you are not using an array at the moment and want to free storage space. There is runtime checking of array bounds. Example:
   define fvalues integer[10][4]
   define basecoord real[10][space_dimension]
   define primcol string[3]
Identifier names declared local can be used in array declarations in procedures and functions; dynamic sizes can be used, but static sizes may be a bit faster since memory doesn't need to be dynamically allocated.

In the top of the datafile, arrays may be initialized with nested bracket initializers following the definition. For example:

   define qwerty integer[4] = { 23, 45, 12, 2 }
   define vmat real[3][2] = {{1,2},{3,4},{5,6}}
   define primcol string[3] = {"red","green","blue"}
Initializers need not be complete; missing values will be zero.

Array elements may be assigned and referenced as is usual for programming languages:

   fvalues[3][4] := 234;
   if basecoord[3][1] > 2 then print "hello world!\n";

Array initialization syntax works for runtime assignments to arrays and array slices, including element attributes that are arrays. The entries in the initializer must be single numbers, not arrays. The number of dimensions on the left and right side of the assignment must agree, but the sizes in each dimension need not agree. Missing elements on the right side are regarded as zero. Examples:

   vertex[1].__x := { 1.2, 3.1, 4.7 }
   define mat real[2][2];
   mat := {{1,2},{3,4}}
The right side is evaluated each time the assignment is executed, so the entries on the right can be any expressions that evaluate to numbers. Assignment with += and -= also work, as does *= and /=, but note that all of these work element-wise (i.e. *= and /= are not matrix multiplication and division).

The print command may be used to print whole arrays or array slices in bracketed form. Example:

   print fvalues
   print fvalues[4]
There are some basic whole-array operations that permit arrays on the left side of an assignment statement:
   array := scalar
   array := array 
   array := scalar * array
   array := array + array
   array := array - array
   array := array * array
   scalar := array * array  // dot product if both rhs arrays one-dimensional
Here "array" on both sides of the assignment means a single whole array; not an array-producing expression or array slice. But "scalar" can be any expression that evaluates to a single value. For multiplication, the arrays must be two-dimensional with properly matching sizes. These operations also apply to element attributes that are arrays.

There is also a matrix_inverse procedure and a matrix_determinant function.

For one-dimensional arrays, the * operator gives the sum of the product of corresponding entries. Example:

   print vertex[1].__velocity * facet[3].__facet_normal

Internal variables

These are pre-defined names for some of Evolver's internal variables. They may be used in the same way as user-defined variables, except the values of read-only variables may not be changed by the user.
ambient_pressure_value
Internal read-write variable. Value of the external pressure in the ideal gas model.
background
Internal read-write variable. Background color used in certain screen graphics (xgraph and Windows, at the moment).
body_count
Internal read-only variable. Number of bodies.
breakflag
Internal read-write variable. When set to a non-zero value, causes the command interpreter to abort and return to the command prompt. Software equivalent of hitting the keyboard interrupt (typically CTRL-C). The break doesn't happen immediately, but at a certain point in the interpreter loop when it periodically checks for user interrupt. Meant for bailing out of nested commands, since return only breaks out of the current procedure.
body_dissolve_count
Internal read-only variable. Number of bodies dissolved by dissolve command. Prints and resets to 0 at the end of a command execution, or when flush_counts is done. Also reset by reset_counts.
brightness
Internal read-only variable. Median gray level used in PostScript output and screen graphics.
check_count
Internal read-only variable. Number of errors found by the most recent C command.
clock
Internal read-only variable. Total elapsed Evolver execution time in seconds. Reads system process elapsed time, which often has a fairly coarse resolution of 0.01 seconds. For nanosecond timing, see cpu_counter.
console_title
Internal read-write string variable. This is the title that is displayed on the Evolver command console window. The default value is "Surface Evolver - datafilename" (with the name of the current datafile, of course). Useful when you are simultaneously running various instances, and you want to tell which is running in which console window. Just assigning a string to console_title automatically changes the title on the window.
constraint_tolerance
Internal read-write variable. When vertices are projected to level-set constraints, projection by Newton's method is repeated until the level-set function is smaller than constraint_tolerance. Default value 1e-12.
cpu_counter
Internal read-only variable. Processor cycle counter, available only on systems I know how to access this (x86 for now). Gives the number of CPU cycles since the system booted. Note that this is wall clock time, not process time. Also note that it resets to zero when a computer hibernates, so it is not guaranteed to be monotone increasing during the life of a process! Also, multiple processors in a machine may not have identical CPU counters, so the Evolver process should be assigned to a particular processor (in Windows, this may be done in Task Manager by setting the process "affinity" in its properties). For process elapsed time, see clock.
datafilename
Internal read-only variable. String containing name of current datafile.
delete_count
Internal read-only variable. Sum of edge_delete_count and facet_delete_count. Kept for backwards compatibility.
detorus_epsilon
Internal read-write variable that is the tolerance for detorus to identify vertices when detorus_sticky is toggled on.
display_origin
Internal read-write vector. For a torus mode surface, if clipped mode is in effect, the center of the clip box is set with this array, whose dimension is the dimension of the ambient space. This array does not exist by default, it has to be created by the user. Details.
dissolve_count
Internal read-only variable. Sum of vertex_dissolve_count edge_dissolve_count, facet_dissolve_count, and body_dissolve_count. Kept for backwards compatibility.
date_and_time
Internal read-only variable. String containing current date and time.
edge_count
Internal read-only variable. Number of edges.
edge_delete_count
Internal read-only variable. Number of edges deleted by delete command. This does not count the secondary edge deletions caused by deleting an edge. Prints and resets to 0 at the end of a command execution, or when flush_counts is done. Also reset by reset_counts.
edge_dissolve_count
Internal read-only variable. Number of edges dissolved by dissolve command. Prints and resets to 0 at the end of a command execution, or when flush_counts is done. Also reset by reset_counts.
edge_refine_count
Internal read-only variable. Number of edges refined by refine edges command. Prints and resets to 0 at the end of a command execution, or when flush_counts is done. Also reset by reset_counts.
edge_pop_count
Internal read-only variable. Number of edges popd by pop edges, o, or O, commands. Prints and resets to 0 at the end of a command execution, or when flush_counts is done. Also reset by reset_counts.
edgeswap_count
Internal read-only variable. Number of edges swapped by edgeswap command. Prints and resets to 0 at the end of a command execution, or when flush_counts is done. Also reset by reset_counts.
eigenneg
Internal read-only variable. Number of negative eigenvalues in last Hessian factoring.
eigenpos
Internal read-only variable. Number of positive eigenvalues in last Hessian factoring.
eigenvalues[]
Internal read-only array. Contains the list of eigenvalues produced by the ritz command. Example: print eigenvalues[2]
eigenzero
Internal read-only variable. Number of zero eigenvalues in last Hessian factoring.
equi_count
Internal read-only variable. Number of edges flipped by equiangulation. Prints and resets to 0 at the end of a command execution, or when flush_counts is done. Also reset by reset_counts.
estimated_change
Internal read-only variable. Estimated change of energy during last iteration with estimate option in effect.
facet_count
Internal read-only variable. Number of facets.
facetedge_count
Internal read-only variable. Number of facetedges.
facet_delete_count
Internal read-only variable. Number of facets deleted by delete command. Prints and resets to 0 at the end of a command execution, or when flush_counts is done. Also reset by reset_counts.
facet_dissolve_count
Internal read-only variable. Number of facets dissolved by dissolve command. Prints and resets to 0 at the end of a command execution, or when flush_counts is done. Also reset by reset_counts.
facet_refine_count
Internal read-only variable. Number of facets refined by refine facets command. Prints and resets to 0 at the end of a command execution, or when flush_counts is done. Also reset by reset_counts.
fix_count
Internal read-only variable. Number of elements fixed by fix command. Prints and resets to 0 at the end of a command execution, or when flush_counts is done. Also reset by reset_counts.
graphics_title
Internal read-write string variable. This is the title that is displayed on the Evolver graphics window. The default value is the datafile name. Useful when you are simultaneously running various instances, and you want to tell which is running in which graphics window. Just assigning a string to graphics_title automatically changes the title on the window. There are also graphics_title2 and graphics_title3 variables if you have a second or third graphics window.
gravity_constant
Internal read-write variable. Value of the gravitational constant, which can also be set by the G command.
hessian_epsilon
Internal read-write variable. Magnitude regarded as zero by hessian command when factoring the Hessian matrix. If a zero appears on the diagonal at the pivot during factoring, a check is made to see if the rest of the row is zero. If it is, then a 1 is placed on the diagonal; else an error is reported.
hessian_slant_cutoff
Internal read-write variable. Hessian commands treat vertices whose normal vector is nearly perpendicular to constraints as fixed. hessian_slant_cutoff is the cosine of angle. Works on vertices with one degree of freedom in hessian_normal mode. Default value 0.
high_boundary
Internal read-only variable giving the number of the highest parametric boundary defined. Remember that the name of a named boundary is internally interpreted as a number, and that boundary may be referred to by that number. Useful in iterating through all boundaries, for example
  for ( bnum := 1 ; bnum <= high_boundary ; bnum += 1 )
    if valid_boundary(bnum) then
       printf "Boundary %d has %d vertices on it\n",bnum,
          sum(vertex,on_boundary bnum);
high_constraint
Internal read-only variable giving the number of the highest level-set constraint. Remember that the name of a named constraint is internally interpreted as a number, and that constraint may be referred to by that number. Useful in iterating through all constraints, for example
  for ( cnum := 1 ; cnum <= high_constraint ; cnum += 1 )
    if valid_constraint(cnum) then
       printf "Constraint %d has %d vertices on it\n",cnum,
          sum(vertex,on_constraint cnum);
instance_name.modulus
Internal read-write variable. Modulus of a named method instance.
instance_name.value
Internal read-only variable. Value of a named method instance.
inverse_periods[expr][expr]
Internal read-only variable. Inverse matrix of the torus_periods matrix. Uses 1-based indexes. Useful for normalizing vertex coordinates to period basis. The syntax for calculating the period basis coordinates would be like
   define perx real[space_dimension];
   perx := vertex[1].__x * inverse_periods
integral_order
Internal read-write variable. Order of polynomial done by 1D and 2D Gaussian integration. Much better to set 1D and 2D separately. Synonym: integration_order
integral_order_1d
Internal read-write variable. Order of polynomial done by 1D Gaussian integration. Synonym: integration_order_1D
integral_order_2d
Internal read-write variable. Order of polynomial done by 2D Gaussian integration. Synonym: integration_order_2D
iteration_counter
Internal read-only variable. Loop count of last loop in a command.
jiggle_temperature
Internal read-only variable. Current temperature for jiggling.
lagrange_order
Internal read-only variable. Order of Lagrange model. Set with the lagrange n command.
last_eigenvalue
Internal read-only variable. Eigenvalue from last saddle or ritz command.
last_error
Internal read-write variable. Has error number of last error message.
last_hessian_scale
Internal read-only variable. Stepsize from last saddle or hessian_seek command.
linear_metric_mix
Internal read-write variable. Fraction of linear interpolation in Hessian metric.
memory_arena
Internal read-only variable. Total memory allocated to the program's heap. Available only on SGI and Win32 versions.
memory_used
Internal read-only variable. Total memory used in the program's heap. Available only on SGI and Win32 versions.
notch_count
Internal read-only variable. Number of edges notched in last notch command.
pickvnum
Internal read-write variable. Number of last vertex picked in the graphics window.
pickenum
Internal read-write variable. Number of last edge picked in the graphics window.
pickfnum
Internal read-write variable. Number of last facet picked in the graphics window.
pop_count
Internal read-only variable. Sum of vertex_pop_count and edge_pop_count. Kept for backwards compatibility.
pop_edge_to_tri_count
Internal read-only variable. Number of edges flipped to triangles by the pop_edge_to_tri command. Prints and resets to 0 at the end of a command execution, or when flush_counts is done. Also reset by reset_counts.
pop_quad_to_quad_count
Internal read-only variable. Number of quadrilaterals flipped by the pop_quad_to_quad command. Prints and resets to 0 at the end of a command execution, or when flush_counts is done. Also reset by reset_counts.
pop_tri_to_edge_count
Internal read-only variable. Number of triangles flipped to edges by the pop_tri_to_edge command. Prints and resets to 0 at the end of a command execution, or when flush_counts is done. Also reset by reset_counts.
quadratic_metric_mix
Internal read-write variable. Fraction of linear interpolation in Hessian metric in the quadratic model. Not very useful.
quantity_name.modulus
Internal read-write variable. Modulus of a named quantity.
quantity_name.pressure
Internal read-only variable. Lagrange multiplier for a constrained named quantity.
quantity_name.target
Internal read-write variable. Constrained value of a named quantity.
quantity_name.value
Internal read-only variable. Value of a named quantity.
random
Internal read-only variable. Random number between 0 and 1.
random_seed
Internal read-write variable. Seed for random number generator, used for example in jiggling or in finding random initial vectors in various Hessian eigenvector algorithms. Defaults to 1 at start of datafile.
refine_count
Internal read-only variable. Number of elements refined in last refine command.
rotation_order
Internal read-write variable. Order of rotation group for symmetry groups rotate and flip_rotate.
scale
Internal read-write variable. Current scale factor for multiplying the force to get the motion in the 'g' command.
scale_scale
Internal read-write variable. Multiplier for the scale factor used in the 'g' command. Default value 1.
scrollbuffersize
Internal read-write variable. The command window scroll buffer size on Windows machines. Meant for non-NT Windows that don't have menu properties option for this.
self_sim_coeff
Internal read-write variable. Used as magnitude coefficent when self_similar is toggled on.
simplex_representation
Internal read-only variable. Whether the simplex model is in effect.
space_dimension
Internal read-only variable. Dimension of ambient space.
sq_curvature_modulus
Internal read-write variable. Multiplier for the squared_curvature energy when it is declared the old way in the top of the datafile.
string_curve_tolerance
Internal read-write variable. In the quadratic model, the smoothness of graphing of curved quadratic edges can be controlled with the internal variable string_curve_tolerance, which is the desired angle in degrees between successive graphed segments making up the edge.
surface_dimension
Internal read-only variable. Dimension of surface.
symmetry_group
Internal read-only variable. Whether any symmetry group is active (Boolean).
t1_edgeswap_count
Internal read-only variable. Number of edges swapped by t1_edgeswap command. Prints and resets to 0 at the end of a command execution, or when flush_counts is done. Also reset by reset_counts.
target_tolerance
Internal read-write variable. When volume constraints or named quantity constraints are enforced, Newton's method is repeated until the total deviation from target values is less than target_tolerance. Default value 1e-4.
temperature
Internal read-only variable. Amplitude for jigglinge.
thickness
Internal read-only variable. Thickness for thickened surfaces in graphics output in P command. Used when facet frontcolor and backcolor are different. Default value 0.001 times the maximum linear dimension of the surface. If you get backside color showing through, increase the thickness.
torus
Internal read-only variable. Whether the torus model is in effect. (Boolean).
torus_periods[expr][expr]
Internal read-only variable. Current values of the period vectors in the torus model. Torus_periods[i][j] is component j of vector i. Uses 1 based indexes. For changing the torus_periods, define the periods in the datafile with variables, and alter the variables.
total_area
Internal read-only variable. Total area of the surface in soapfilm or simplex models. Beware that this is not continuously updated with every change in the surface, but rather upon return to the command prompt. If a script needs the current total_area recalculated, it should do the "recalc" command before using total_area.
total_energy
Internal read-only variable. Total energy of the surface. Beware that this is not continuously updated with every change in the surface, but rather upon return to the command prompt. If a script needs the current total_energy recalculated, it should do the "recalc" command before using total_energy.
total_length
Internal read-only variable. Total length of the surface in the string model.
total_time
Internal read-only variable. Elapsed evolution time in the form of total scale factors.
transform_count
Internal read-only variable. Number of image transforms active, as generated by the transform_expr command.
fix_count
Internal read-only variable. Number of elements unfixed by unfix command. Prints and resets to 0 at the end of a command execution, or when flush_counts is done. Also reset by reset_counts.
vertex_count
Internal read-only variable. Number of vertices.
vertex_dissolve_count
Internal read-only variable. Number of vertices dissolved by dissolve command. Prints and resets to 0 at the end of a command execution, or when flush_counts is done. Also reset by reset_counts.
vertex_pop_count
Internal read-only variable. Number of vertices popped by pop or o command. Prints and resets to 0 at the end of a command execution, or when flush_counts is done. Also reset by reset_counts.
view_transforms_unique_point
Internal read-write vector variable. Used by view_transforms_use_unique_point mode for the definition of duplicate view transforms.
where_count
Internal read-only variable. Number of items satisfying last where condition. Prints and resets to 0 at the end of a command execution, or when flush_counts is done. Also reset by reset_counts.
window_aspect_ratio
Internal read-write variable. The ratio of the the vertical to horizontal dimensions of the display window. If set, this locks the aspect ratio to the given value. The window may be resized with the mouse, but the aspect ratio will stay the same. The unset value of window_aspect_ratio is 0; setting window_aspect_ratio to 0 will unlock the aspect ratio. Applies also to the PostScript bounding box, if full_bounding_box is on. Currently implemented only in Evolver with GLUT graphics. Caveat: the window doesn't always fully follow the mouse; just keep trying.

Back to top of Surface Evolver documentation.       Index.