## File: elements.htm

package info (click to toggle)
evolver 2.70+ds-4
• area: main
• in suites: bullseye, buster, sid
• size: 17,148 kB
• sloc: ansic: 127,395; makefile: 209; sh: 98
 file content (2315 lines) | stat: -rw-r--r-- 95,971 bytes parent folder | download | duplicates (2)
 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315  Surface Evolver geometric elements

Surface Evolver Documentation

Geometric elements

The surface is defined in terms of its geometric elements of each dimension. Each element has its own set of attributes. Some may be set by the user; others are set internally but may be queried by the user. It is also possible to dynamically define extra attributes for any type of element, which may be single values or vectors of values. Attribute values can be specified in the datafile, and queried with commands.

Elements:

Vertices

A vertex is a point in space. The coordinates of the vertices are the parameters that determine the location of the surface. It is the coordinates that are changed when the surface evolves. A vertex carries no default energy, but may have energy by being on a level set constraint in the string model, or by having a named quantity energy applied to it. The vertices of the original surface are defined in the vertices section of the datafile.

Vertex attributes (grouped somewhat relatedly):

Full descriptions of vertex attributes.

Edges

An edge is a one-dimensional geometric element. In the linear model, an edge is an oriented line segment between a tail vertex and a head vertex. In the quadratic model, an edge is defined by quadratic intepolation of two endpoints and a midpoint. In the lagrange model, an edge is defined by the appropriate order interpolation with the edge vertices. In the string model, edges carry a default surface tension energy proportional to their length. Edges may also carry energy by being on level set constraints in the soapfilm model, or by having named quantity energies applied to them. The edges of the original surface are defined in the edges section of the datafile.

Edge attributes (grouped somewhat relatedly>:

Facets

In the soapfilm model, a facet is an oriented triangle defined by a cycle of three edges. In the linear model, a facet is a flat triangle. In the quadratic model, the facet is a curved surface defined by quadratic interpolation among the three facet corner vertices and the three edge midpoints. In the Lagrange model, lagrange_order interpolation is done among (lagrange_order+1)(lagrange_order+2)/2 vertices. Although individual facets are oriented, there are no restrictions on the orientations of adjacent facets. By default, a facet carries a surface tension energy equal to its area.

In the string model, a facet is a chain of an arbitrary number of edges. The chain need not be closed. Usually a facet is defined in the string model in order to define a body, so the space dimension is 2 and the facet is planar, one facet corresponding to a body. Facets carry no energy by themselves.

In the simplex model, a facet is a simplex of dimension surface_dimension defined by surface_dimension+1 vertices. The surface_dimension may be any dimension less than or equal to the space_dimension. The simplex is oriented according to the order of the vertices. By default, a simplex carries a surface tension energy proportional to its volume.

Facets may carry additional energy by having named quantity energies applied to them.

The facets of the original surface are defined in the faces section of the datafile.

Facet attributes (grouped somewhat relatedly):

Bodies

A body is a full-dimensional region of space. Bodies are not triangulated. Rather, they are determined by their boundary facets (or edges in 2D). These facets are used for calculating body volume and gravitational energy. Only those facets needed for correct calculation need be given. In the string model, usually a body corresponds to one facet. Bodies of the original surface are defined in the bodies section of the datafile.

Body attributes:

Facetedges

A facetedge is a pairing of a facet and one of its edges, with orientation such that the edge orientation is consistent with the facet orientation. Facetedges are used internally by Evolver, and are seldom of interest to the user. They carry no energy. The 'C' integrity-checking command will sometimes refer to facetedges if the surface is inconsistent. Facetedge can be used as an element generator.

Facetedge attributes:

Element attributes

Below is a list of possible element attributes. The first few apply to all types of elements. Then come those applying specifically to vertices, edges, facets, and bodies. See Geometric elements for lists of attributes for each type element.

Attributes for all types of elements

id

Geometric element read-only integer attribute. The id of an element is a positive integer uniquely associated with that element. The Evolver will assign id's to elements read from the datafile in the order they are read, unless the -i command line option or keep_originals is in the top of the datafile, in which case the datafile element number is the id. In either case, you can access the datafile id with the original attribute. Examples:
list vertex where id < 10    set edge color red where id == 4 or id == 6 or id == 9    foreach facet ff do     { printf "%d  %d %d %d\n",ff.id,ff.edge[1].id,ff.edge[2].id,ff.edge[3].id }

oid

Geometric element read-only integer attribute. The oid of an element is the "oriented id" of an element as used in an expression. It is the id number signed according to whether the use of the element is with the same or opposite orientation as the way it is stored. Example: to get an edge list for a facet as in the datafile, use oid instead of id:
foreach facet ff do { printf "%d  %d %d %d\n",ff.id,ff.edge[1].oid,       ff.edge[2].oid,ff.edge[3].oid }

fixed

Geometric element read-write boolean attribute. For vertices, fixed means they don't move during various evolution and triangulation grooming commands. For edges and facets, fixed means vertices generated from them by refinement are fixed, although declaring a facet or edge fixed does not automatically make its vertices fixed.

For a body, fixed means its volume is constrained to be its target value. Likewise, fixed as an attribute of a named quantity means the quantity value is constrained.

Fixedness can be changed with the fix and unfix commands.

Examples:

fix vertex where z = 0    unfix vertex where on_constraint 1    list edge where fixed    print body[1] fixed

on_constraint

Vertex, edge, or facet read-only attribute. Boolean attribute for whether an element is on a given constraint. The full syntax of the attribute is "on_constraint n" where n is the number or name of the constraint. Examples:
list edge where on_constraint 3    print vertex[3].on_constraint floorcon

on_boundary

Vertex, edge, or facet read-only boolean attribute. The status of whether an element is on a parametric boundary The full syntax of the attribute is "on_boundary n" where n is the number or name of the boundary. Examples:
list vertex where on_boundary 1   list edge where on_boundary topbdry

on_quantity

Vertex, edge, or facet read-only attribute. Boolean attribute for whether an element contributes to a given named quantity. Actually, it tests whether the element is on any of the method instances comprising a quantity. The full syntax of the attribute is "on_quantity quantityname". Examples:
list facet where on_quantity  center_of_mass_x    print vertex[3].on_quantity blue_area

on_method_instance

Vertex, edge, or facet read-only attribute. Boolean attribute for whether an element contributes to a given named method instance. The full syntax of the attribute is "on_method_instance instancename". Examples:
list facet where on_method_instance  center_of_mass_x_edges    print vertex[3].on_method_instance blue_area_1

original

Geometric element read-write integer attribute. For elements read from the datafile, this is the number given to the element in the datafile, which may be overridden by an explicit original attribute value in the datafile line defining the element. The value is inherited by all elements of the same type that result from subdivision. For elements otherwise generated at run time, the original attribute value is -1. Example: to show which facets descended from face 1 in the datafile:
set facet color red where original == 1

Named quantity values as attributes

Named quantities and method instances can be applied to geomtric elements either in the datafile (by adding the quantity or method name to the line defining an element) or with the set command. Nonglobal quantities or methods can be unset for individual elements. The values for individual elements can be accessed using attribute syntax. Examples: Suppose there is a named quantity "xmoment" that can be evaluated for facets. Then one could give commands
foreach facet do printf "%d %f\n",id,xmoment    list facet where xmoment > 4

Extra attributes

Geometric element read-write attributes. If extra attributes have been defined in the datafile or with a define command, they can be accessed with attribute syntax. Extra attribute values in the datafile can be initialized for an element by adding the attribute name and value to the line defining the element. Extra attributes may also be arrays of numeric values (global arrays can be strings, but attributes cannot yet), initialized with standard nested bracket syntax. Example:
define vertex attribute newx real   define vertex attribute vmat real[3][2]   vertices   1   2 0 0 newx 3 vmat {{1,2},{3,4},{5,6}}
The command language can use the name with the same syntax as built-in attributes, and can define extra attributes at run time:
set vertex newx x   define edge attribute vibel real[2]   set edge[2] vibel[1] 3; set edge[2] vibel[2] 4   print vertex[3].newx
Attribute array sizes may be changed at run time by executing another definition of the attribute, but the number of dimensions must be the same. Array entry values are preserved as far as possible when sizes are changed.

The value of an extra attribute can also be calculated by user-supplied code. The attribute definition is followed by the keyword "function" and then the code in brackets. In the code, the keyword "self" is used to refer to the element the attribute is being calculated for. Example: To implement the lowest z value of a facet as an attribute:

define facet attribute minz real function 	 {self.minz := min(self.vertex,z);}

Vertex attributes

Vertex id

See id for general elements.

Vertex original

See original for general elements.

Vertex coordinates: x,y,z, x[], __x[]

Vertex read-write real attribute. The coordinates of a vertex are its location in space. By default, these are Euclidean coordinates, but they may represent any coordinate system if the user defines appropriate length, area, volume, etc. integrals. But graphics always treat the coordinates as Euclidean. The individual coordinates may be referred to as x,y,z, w or x1,x2,x3,.., or x[1], x[2], x[3], ... or __x[1], __x[2], __x[3], .... In the vertices section of the datafile, vertices of the original surface have their coordinates given unless they are on a parametric boundary. Vertices on parametric boundaries have their coordinates calculated from their parameter values. Coordinates may be read or modified with the command language. The form __x is useful to refer to the coordinates as a vector, for example in dot products. Examples:
foreach vertex do printf "%d  %f %f %f\n",id,x,y,z   set vertex z z+.1*x   print vertex[3].x[2]   dotprod := vertex[1].__x * vertex[2].__x

Vertex edges

Vertex read-only generator attribute. Generates edges attached to a vertex, oriented so vertex is the edge tail. The edges are in no particular order. Examples:
list vertex[3].edges   foreach vertex vv do { foreach vv.edge do print id }
Always use ".edges" to generate vertex edges; using "edges" with an implicit element, as in "foreach vertex do list edges" will list all edges in the surface over and over again.

Vertex facets

Vertex read-only generator attribute. Generates facets attached to a vertex, with positive facet orientation. The facets are in no particular order. Examples:
list vertex[3].facets   foreach vertex vv do { foreach vv.facet do print id }
Always use ".facets" to generate vertex facets; using "facets" with an implicit element, as in "foreach vertex do list facets" will list all facets in the surface over and over again.

Vertex valence

Vertex read-only integer attribute. The valence of a vertex is defined to be the number of edges it is a member of. Example:
list vertices where valence == 6   histogram(vertex,valence)

Vertex bare

Vertex read-write boolean attribute. Declaring a vertex bare says that a vertex is not supposed to have any adjacent edges. Useful in avoiding warning messages. A vertex may be declared bare in the vertices section of the datafile by adding the keyword bare to the line defining the vertex. Bare is not simply a synonym for zero valence; it is a separate attribute you set to say you intend for it to have zero valence. Examples:
set vertex bare where valence==0    list vertex where bare

Vertex fixed

Vertex read-write boolean attribute. A fixed vertex will not move during iteration (except to satisfy level set constraints) or other operations, except if coordinates are explicitly changed by a "set vertices ..." command. A vertex may be declared fixed in the datafile by putting fixed on the line defining the vertex, after the coordinates. From the command prompt, one can fix or unfix vertices with the fix and unfix commands. Examples: formula
list vertex where fixed   fix vertex where on_constraint 1   unfix vertices where on_boundary 1

Vertex constraints

Vertex read-write attribute. A level-set constraint is a restriction of vertices to lie on the zero level-set of a function. A constraint declared nonnegative in the datafile forces a vertex to have a nonnegative value of the function. A nonpositive constraint forces a vertex to have a nonpositive value of the function. A constraint may be declared global, in which case it applies to all vertices. A vertex may be put on a constraint in the vertices section of the datafile by listing the constraint numbers after the keyword constraint. See mound.fe for an example. In commands, the status of a vertex can be read with the on_constraint and hit_constraint attributes. The status can be changed with the set or unset commands. Examples:
Datafile:
constraint 1   formula: z = 0   constraint wallcon nonpositive   formula: x = 4
Runtime:
list vertex where on_constraint wallcon   set vertex constraint 1 where id == 4 or id == 6   unset vertex constraint 1

See the on_constraint attribute for general elements.

Vertex hit_constraint

Vertex read-only attribute. Boolean attribute for whether a vertex exactly satisfies a given constraint. Particularly meant for vertices on one-sided constraints. The full syntax of the attribute is "hit_constraint n" where n is the number or name of the constraint. Examples:
list vertex where hit_constraint 3    print vertex[3].hit_constraint 1

Vertex value_of_constraint

Vertex read-only attribute giving the value of a level-set constraint for the current position of a vertex. Particularly meant for vertices on one-sided constraints. The full syntax of the attribute is "value_of_constraint n" where n is the number or name of the constraint. Examples:
print vertex[4] value_of_constraint 1    list vertex where on_constraint topcon and value_of_constraint topcon > 1e-5

Vertex v_constraint_list

This read-only integer array attribute gives access to the list of constraints a vertex is on. v_constraint_list[1] is the number of constraints in the list, followed by the numbers of the constraints. Note that for named constraints, the internally assigned numbers are used. Because this is the actual internal datastructure, the entries may have some high bits used as flags, so to get the plain constraint numbers you should mask out the high bits with "imod 0x100000". Example:
foreach vertex vv do    { for ( spot := 2 ; spot <= vv.v_constraint_list[1]+1  ; spot++ )      { connum := vv.v_constraint_list[spot] imod 0x100000;        if vv hit_constraint connum then          printf "Vertex %d hits constraint %d.\n",vv.id,connum;      }    };

Constraint normal

The unit normal vector of a level-set constraint at a vertex may be found with the vertex vector attribute
constraint[number].normal or      constraint[name].normal
"number" may be an expression; "name" is the unquoted name of the constraint, if it has one. Example:
print vertex[1].constraint[floorcon].normal
would print the unit normal of constraint floorcon at vertex 1. And you can put on a subscript to get individual components. For example, the y component:
print vertex[1].constraint[floorcon].normal[2]
There is no necessity for the constraint to be applied to the vertex; the vertex is just used as a source of coordinates for evaluating the gradient of the constraint formula.

Vertex boundary

Vertex read-write attribute. A vertex may be on a parameterized boundary, in which case its position is specified by parameter values; i.e. the space coordinates are functions of the parameters. The keyword boundary is used as an attribute only in the datafile declaration of elements being on boundaries. At runtime, one uses the attributes p1, p2, .. for the parameter values, on_boundary to see if a vertex is on a particular boundary, and v_boundary to get the number of the boundary. If you want to set a vertex on a boundary at runtime (tricky, since you have to set the parameters yourself), the use the "set vertex boundary ..." command.

Vertex parameters p1, p2, p[]

Vertex read-write real attribute. Vertices on parametric boundaries are located according to the parameter values. Parameters are referred to as p1,p2,... Usually only p1 is used, since one-parameter curves used as boundary wires are most common. There is also an array form of the name, p, which is useful in array computations such as dot product in the case of multiple parameters. Such vertices in the original surface have their parameter values given in the vertices section of the datafile instead of their coordinates. Vertex parameters may be read or modified with the command language. Example:
foreach vertex do printf "%d %f\n",id,p1   set vertex[1] p1 1.2   dotprod := vertex[1].p * vertex[2].p

Vertex on_boundary

See on_boundary for general elements.

Vertex v_boundary

Vertex read-only integer attribute. Internal attribute containing the number of any parameterized boundary the vertex is on. Recall that named boundaries have internal id numbers, which are used here.

Vertex extra attributes

See extra attributes for general elements.

Vertex named quantity

See named quantities for general elements.

Vertex on_quantity

See on_quantity for general elements.

Vertex named method instances

See named quantities for general elements.

Vertex on_method_instance

See on_method_instance for general elements.

Vertex v_method_list

Vertex read-only integer array attribute. Internal name for the array holding the id numbers of the method instances to which this vertex contributes. Vertices do not directly record which quantities they are on, they only record which method instances.

Vertex vertex_normal or vertexnormal

Vertex read-only real array attribute. One-dimensional, size is space dimension. This is an indexed attribute consisting of the components of a normal to the surface at a vertex, normalized to unit length. This is the same normal as used in hessian_normal mode. For most vertices in the soapfilm model, the normal is the number average of the unit normals of the surrounding facets. Along triple edges and such where hessian_normal has a multi-dimensional normal plane, the vertex_normal is the first basis vector of the normal plane. Example: To print the normal components of vertex 3:
print vertex[3].vertex_normal[1];  print vertex[3].vertex_normal[2];  print vertex[3].vertex_normal[3];
The vertex_normal can also be printed as an array:
print vertex[3].vertex_normal
Vertexnormal is an old synonym for vertex_normal.

Vertex dihedral

Vertex read-only real attribute in the string model. This is the angle in radians from straightness of two edges at a vertex. If there are less than two edges, the value is 0. If two or more edges, the value is 2*asin(F/2), where F is the magnitude of the net force on the vertex, assuming each edge has tension 1. Upper limit clamped to pi.

Vertex mid_edge

Vertex read-only boolean attribute. True (1) if the vertex is on an edge but not an endpoint. Relevant in the quadratic model or Lagrange model. Example:
list edge[23].vertex vv where vv.mid_edge

Vertex mid_facet

Vertex read-only boolean attribute. True (1) if the vertex is an interior control point of a facet in the Lagrange model. Example:
list facet[23].vertex vv where vv.mid_facet

Vertex mean_curvature

Vertex read-only ral attribute, available in the string and soapfilm model. The mean curvature is calculated as the magnitude of the gradient of area (or length in the string model) divided by the area (or length) associated with the vertex, which is one-third the area of the facets adjacent to the vertex (or one-half of the length of adjacent edges). It is divided by 2 in the soapfilm model to account for the "mean" part of the definition. The sign of the mean curvature is relative to the orientation of the first adjacent facet (or edge) Evolver finds. This calculation can be done even if the vertex is on a triple junction or other non-planar topology, even if it doesn't interpret well as mean curvature there.

Vertex sqcurve

Geometric element read-only real attribute. Sqcurv is the squared mean curvature at a vertex. This is only a discrete approximation, of course, The method used to calculate it is the same as the sq_mean_curvature named method, except if the normal_curvature toggle is on, in which case the calculation is as in the normal_sq_mean_curvature named method. Does not require any other square mean curvature features to be active.

Vertex axial_point

Vertex read-write boolean attribute. Certain symmetry groups (e.g. cubocta or rotate) have axes of rotation that are invariant under some non-identity group element. A vertex on such an axis must be labeled in the datafile with the attribute axial_point, since these vertices pose special problems for the wrap algorithms. If you are only using a subgroup of the full group, then you only need to label vertices on the axes of the subgroup. The net wrap around a facet containing an axial point need not be the identity. Edges out of an axial point must have the axial point at their tail, and must have zero wrap. Facets including an axial point must have the axial point at the tail of the first edge in the facet. It is your responsibility to use constraints to guarantee the vertex remains on the axis.

Vertex triple_point

Vertex read-write boolean attribute. For telling Evolver three films meet at this vertex. Used when effective_area is on to adjust motion of vertex by making the effective area around the vertex 1/sqrt(3) of actual.

Vertex tetra_point

Vertex read-write booloean attribute. For telling Evolver six films meet at this vertex. Used when effective_area is on to adjust motion of vertex by making the effective area around the vertex 1/sqrt(6) of actual.

Vertex v_force

Vertex read-only real array attribute. This is an indexed attribute giving the components of the force (negative energy gradient as projected to constraints). One-dimensional, size is space dimension. Meant for debugging use. This is not directly used for the motion; see v_velocity.

Vertex v_velocity

Vertex read-only real array attribute. This is an indexed attribute giving the components of the vector used for vertex motion in the 'g' command. The motion of a vertex is the scale factor times this vector. The velocity vector is calculated from the force vector by applying area normalization, mobilty, etc. Also, if a vertex is on a boundary, the velocity is projected back to parameters. One-dimensional, size is space dimension.

Vertex raw_velocity

Vertex read-only real array attribute. Internal vertex attribute used when one-sided level-set constraints are present, so the Lagrange multipliers for said constraints can be calculated. This is the velocity before any projection to volume or level-set constraints. One-dimensional, size is space dimension. Not of interest to the ordinary user.

Vertex v_oldx

Vertex read-only real array attribute. Internal vertex array attribute used to store old coordinates when doing an optimizing move. One-dimensional, size is space dimension.

Vertex no_hessian_normal

Vertex read-write attribute. If you wish to run in hessian_normal mode but exempt particular vertices from the restriction, you can "set" the vertices' no_hessian_normal attribute, for example
set vertex no_hessian_normal where z > 1.2

Edge attributes

Edge id

See id for general elements.

Edge oid

See oid for general elements.

Edge original

See original for general elements.

Edge length

Edge read-only real attribute. Length of the edge. Examples:
histogram(edge where on_constraint 1, length)  print edge[3].length

Edge density or tension

Edge read-write real attribute. "Density" and "tension" are synonyms. Energy per unit length of edge. Default 1 in string model, 0 in soapfilm model. The tension may be modified in the datafile edges section by adding "tension value" to the line defining the edge. The tension may be modified with the set command. Examples:
set edge tension .5 where id < 10   loghistogram(edge,density)

Fixed edge

Edge read-write attribute. For an edge to be "fixed" means that any vertex or edge created by refining the edge will inherit the "fixed" attribute. Declaring an edge fixed in the datafile will not fix vertices on the edge, and fixing an edge from the command prompt will not fix any vertices. An edge may be declared fixed in the datafile edges section by adding fixed to the line defining the edge. From the command prompt, one can fix or unfix edges with the fix and unfix commands. Examples:
fix edge where on_constraint 1   list edges where fixed   set edge color red where fixed   unfix edge[3]

Edge vertices

Edge read-only attribute. Acts as a generator for the vertices on an edge. In the linear model, this means the tail and head vertices. In the quadratic model, it means the tail, head, and middle vertices. For the Lagrange model, it means all the vertices from tail to head in order. For the simplex model, it means the vertices in the stored order. Example:
list edge[2].vertices    list edge ee where ee.vertex[1].on_constraint 1

Edge midv

Edge read-only attribute. In the quadratic model, gives the id of the midpoint vertex of an edge. Example:
print edge[23].midv

Edge facets

Edge read-only attribute. Generates facets attached to an edge, in order around the edge when meaningful, with facet orientation agreeing with edge orientation. Examples:
list edge[2].facets    foreach edge ee do print max(ee.facets,area)

Edge valence

Edge read-only integer attribute. The valence of an edge is the number of facets adjacent to it. Examples:
list edges where valence == 1   refine edge where valence != 2

Bare edge

Edge read-write boolean attribute. Declaring an edge "bare" indicates that an edge does not have an adjacent facet (soapfilm model). Best declared in the datafile, by adding the keyword bare to the line defining an edge. Useful in avoiding warning messages. Bare edges are useful to show wires, frameworks, outlines, axes, etc. in graphics. Example:
list edge where bare

Edge constraints

Edge read-write attribute. An edge may be put on a level set constraint. For such an edge, any vertices and edges generated by refining the edge will inherit the constraint. An edge may be put on constraints in the edges section of the datafile by listing the constraint numbers after the keyword constraint on the line defining the edge. Putting an edge on a constraint does not put its existing vertices on the constraint. In commands, the status of an edge can be read with the "on_constraint" attribute. The status can be changed with the set or unset commands. Examples:
list edge where on_constraint 2   set edge constraint 1 where id == 4 or id == 6   unset edge constraint 3

Edge on_constraint

See the on_constraint attribute for general elements.

Edge e_constraint_list

This read-only attribute gives access to the list of constraints an edge is on. e_constraint_list[1] is the number of constraints in the list, followed by the numbers of the constraints. Note that for named constraints, the internally assigned numbers are used.

Edge boundary

Edge read-write attribute. If an edge is on a parametric boundary, then any edges and vertices generated from the edge will inherit the boundary. By default, new vertex parameter values are calculated by extrapolating from one end of the edge. This avoids wrap-around problems that would arise from interpolating parameter values. But if the interp_bdry_param toggle is on, then interpolation is used. The status of whether an edge is on a boundary can be queried with the Boolean attribute on_boundary. Edges can be unset from boundaries, and set on them (but care is needed to do this properly). Examples:
list edges where on_boundary 1   unset edges boundary 2

Edge on_boundary

See on_boundary for general elements.

Edge e_boundary

Edge read-only integer attribute. Internal edge attribute holding the id numbers of the boundary an edge is on. Recall that named boundaries have internal id numbers, which are used here.

Edge color

Edge read-write attribute. Color for graphics. The default color is black. Color may be set in the datafile, or with the set command. In geomview, the edge color will show up only for edges satisfying the show edge condition, and then they will have to compete with the edges geomview draws, unless you turn off geomview's drawing of edges with "ae" in the geomview window. Examples:
set edge color red where length > 1   show edge where color != black

Edge edge_vector

Edge read-only attribute. The components of the edge vector in the linear model can be accessed as edge attributes x,y,z or x1,x2,x3,..., or x[1],x[2],x[3]. edge_vector is another way to refer to the vector as a vector; it is useful for expressions like dot products where x won't work. In a command, the vector between edge endpoints is used in quadratic model or lagrange model. But when used in an integral, the tangent is evaluated at the Gaussian integration points. Not defined in the simplex model. Example to list nearly vertical edges:
list edges where z^2 > 10*(x^2 + y^2)    print edge[1].edge_vector * edge[2].edge_vector

Edge no_refine

Edge and facet read-write Boolean attribute. An edge with the "no_refine" attribute will not be refined by the r command. This is useful for avoiding needless refining of lines or planes that are used only for display. The no_refine attribute may be specified on the datafile line for an edge, or the set command may be used. Examples:
set edge no_refine where fixed   unset edge[2] no_refine   list edge where no_refine   print edge[3].no_refine

Edge no_transform

Edge and facet read-write Boolean attribute. An edge or facet with the "no_transform" attribute will not be duplicated by the view_transform mechanism; only the original element will occur. For example, you might have edges that form a display of coordinate axes, which you would not want duplicated. Example:
set edge no_transform where valence == 0

Edge wrap

Edge read-write attribute. When a symmetry group is in effect (such as the torus model) and an edge crosses the boundary of a fundamental domain, the edge is labelled with the group element that moves the edge head vertex to its proper position relative to the tail vertex. The label is internally encoded as an integer, the encoding peculiar to each symmetry group. Edge wrappings are set in the datafile. The torus model has its own peculiar wrap representation in the datafile: * for no wrap, + for positive wrap, and - for negative wrap. Wraps are maintained automatically by Evolver during surface manipulations. The numeric edge wrap values can be queried with attribute syntax. Example:
list edge where wrap != 0
Unfortunately, the torus model wraps come out rather opaquely, since one cannot print hex. The torus wrap number is the sum of numbers for the individual directions: +x = 1; -x = 31; +y = 64; -y = 1984; +z = 4096; -z = 127040. Caution: even though this attribute can be written by the user at runtime, only gurus should try it.

Edge wrap_list

Edge read-write integer array attribute. In a torus or symmetry model, this holds the integer used to encode the wrap of an edge. Note that this is implemented as an array of length 1 rather than just a value; I forget why, maybe so it could be length 0 if not needed. Example:
print edge[3].wrap_list[1]

Edge show

Edge and facet read-only Boolean attribute giving the current status of an edge or facet according to the show edge or show facet criterion in effect.

Edge orientation

Edge integer read-write attribute. Controls the sign of oriented integrals on an edge. Value +1 or -1. Useful when triangulation manipulations create an edge going the wrong way. Example:
set edge[2] orientation -1

Edge frontbody

Edge read-only integer attribute. In the string model, this is the id number of the body attached to the front of the edge, that is, the body on the facet that has positive orientation with respect to the edge. Invalid in the soapfilm model.

Edge backbody

Edge read-only integer attribute. In the string model, this is the id number of the body attached to the back of the edge, that is, the body on the facet that has negative orientation with respect to the edge. Invalid in the soapfilm model.

Edge dihedral

Edge read-only real attribute. The angle in radians between the normals of two facets on an edge. Zero if there are not exactly two facets. This attribute is not stored, but recalculated each time it is used. If there are not exactly two facets on the edge, the value is 0.

Edge noncontent

Edge read-write boolean attribute. When set, indicates this facet should not be used in volume calculations in the soapfilm model or facet area calculations in the string model. Useful, for example, if you want to have edges be part of a body boundary for display purposes, but want to use constraint integrands for greater accuracy in volume calculations. Example:
set edge noncontent where on_constraint 1

Edge named quantity

See named quantities for general elements.

Edge on_quantity

See on_quantity for general elements.

Edge named method instances

See named quantities for general elements.

Edge on_method_instance

See on_method_instance for general elements.

Edge e_method_list

Edge read-only integer array attribute. Internal edge attribute holding the id numbers of the method instances that this edge contributes to. Size expands as needed. Read-only. Use "set edge method ... " or "unset edge method .." to change the status of a edge.

Edge extra attributes

See extra attributes for general elements.

Facet attributes

Facet id

See id for general elements.

Facet oid

See oid for general elements.

Facet original

See original for general elements.

Facet tension or density

Facet read-write attribute. Energy per unit area of facet; surface tension. Default 0 in string model, 1 in soapfilm model. May be set in the datafile by adding "tension value" to the line defining the facet. The density is inherited by any facets generated by refining. "Tension" and "density" are synonyms. Examples:
set facet tension 3 where original == 1   list facet where density < .4

Facet area

Facet read-only attribute. The area of the facet. Example:
list facet where area < .1

Facet fixed

Facet read-write attribute. For a facet to be "fixed" means that any vertex, edge, or facet created by refining a facet will inherit the fixed attribute. Fixing a facet in the datafile or at the command prompt does not fix any edges or vertices. A face may be declared fixed in the datafile by putting fixed on the line defining the face, after the coordinates. From the command prompt, one can fix or unfix facets with the fix and unfix commands.

Facet vertices

Facet read-only attribute. Generates vertices around a facet, oriented as the facet boundary. "vertex" and "vertices" are synonymous. In the string model, if the facet is not a closed loop of edges, the vertices will be generated in order from one end. If the given facet has negative orientation, then the vertices will be generated accordingly. Example:
list facet[3].vertex

Facet edges

Facet read-only attribute. Generates edges around a facet, oriented as the facet boundary. "edge" and "edges" are synonymous. In the string model, if the edges of the facet do not make a closed loop, then the edges will be listed in order starting from one end. If the given facet has negative orientation, the edges will be listed accordingly. Example:
list facet[3].edges   list facet[-3].edges

Facet bodies

Facet body generator attribute. Generates the bodies adjacent to a facet, in frontbody-backbody order. Example:
list facet[2] bodies

Frontbody

Facet read-write attribute. The id of the body of which the facet is on the positively oriented boundary. Useful after creating a new body with the new_body command. As a read attribute, the value is 0 if there is no such body. Examples:
newb := new_body; set facet frontbody newb where color == red   print facet[2].frontbody
Frontbody also works for adding edges to a facet in the string model, but the added edge must be attach to one end of the edge arc, or close the arc.

Backbody

Facet read-write attribute. The id of the body of which the facet is on the negatively oriented boundary. Useful after creating a new body with the new_body command. As a read attribute, the value is 0 if there is no such body. Examples:
newb := new_body; set facet[1] frontbody newb;   set facet backbody newb where id == 2 or id == 4;   print facet[4].backbody
Backbody also works for adding edges to a facet in the string model, but the added edge must be attach to one end of the edge arc, or close the arc.

f_body_list

Facet internal array attribute. Contains the frontbody and backbody ids of the facet. Not too useful directly; listed here because it shows up in list_attributes.

Facet valence

Facet read-only attribute. The valence of a facet is the number of edges (or vertices) that it contains. Most useful in the string model. Example:
list facets where valence != 3

Facet constraints

Facet read-write attribute. Putting a facet on a constraint means that every vertex, edge, or facet generated by refining the facet will inherit that constraint. Setting a facet on a constraint does not set any of its existing edges or vertices on the constraint. Facets may be put on constraints in the datafile by listing the constraint numbers after the keyword constraint on the line defining the facet, or with the set command. They may be removed with the unset command. Examples:

list facets where on_constraint 1   set facet[2] constraint 2   unset facet constraint 1

Facet on_constraint

See the on_constraint attribute for general elements.

f_constraint_list

This read-only attribute gives access to the list of constraints a facet is on. f_constraint_list[1] is the number of constraints in the list, followed by the numbers of the constraints. Note that for named constraints, the internally assigned numbers are used.

Facet boundary

Facet read-write attribute. If a facet is on a parametric boundary, then any facets, edges, and vertices generated from the facet will inherit the boundary. By default, new vertex parameter values are calculated by extrapolating from one vertex of the facet. This avoids wrap-around problems that would arise from interpolating parameter values. But if the interp_bdry_param toggle is on, then interpolation is used. The status of whether a facet is on a boundary can be queried with the Boolean attribute on_boundary. The actual boundary number is stored in the attribute f_boundary, which can be read but should not be written directly. Facets can be unset from boundaries, and set on them (but care is needed to do this properly). Examples:
list facets where on_boundary 1   unset facet[2] boundary 2

Facet f_boundary

Facet read-only integer attribute. The number of any parameterized boundary the facet is on. Note that named boundaries have internal numbers, and those are used here.

Facet color

Facet read-write attribute. Color of both sides of facet for graphics. Default is white. Datafile example:
Faces   1   1 2 3 color red
Command examples:
list facets where color == red   set facet[3] color green   set facet color red where area > 2

Facet frontcolor

Facet read-write attribute. Color of positive side of facet for graphics. Default is white. Datafile example:
Faces   1   1 2 3 frontcolor green backcolor red
Command examples:
list facets where frontcolor == red   set facet[3] frontcolor green   set facet frontcolor red where area > 2

Facet backcolor

Facet read-write attribute. Color of negative side of facet for graphics. Default is white. Set also when the "color" attribute is set. Datafile example:
Faces   1   1 2 3 frontcolor green backcolor red
Command examples:
list facets where backcolor == red   set facet[3] backcolor green   set facet backcolor red where area > 2

Facet opacity

Facet read-write attribute for transparency. Syntax: set facet opacity value where condition where value is between 0 (clear) and 1 (opaque). Screen graphics will show transparency, but PostScript output will not. Hitting the 'O' key in the graphics window will toggle transparency, if the opacity attribute has been assigned values. Datafile example:
Faces   1   1 2 3  opacity 0.5
Command examples:
set facet opacity 0.6   set facet opacity 0.6 where original == 2

Facet facet_normal

Facet read-only attribute. The components of the facet normal vector may be referred to as x,y,z or x1,x2,x3 or x[1],x[2],x[3] in the linear model. Length is equal to facet area. facet_normal is the internal name of the attribute, and is useful to refer to the entire vector in array expressions such as dot product. In quadratic model or lagrange model, only the three facet corner vertices are used to calculate the normal. When used in integrals, the normal is calculated at each integration points. Not defined in simplex model.

Facet no_display

Facet read-write attribute. When set, suppresses the display of the facet in graphics. Can be set in the datafile by adding nodisplay to the line defining the facet. Can also be manipulated by the set and unset commands. No_display is a synonym provided since that's what I kept typing in. Example:
set facet nodisplay where color != red

Facet no_refine

Facet read-write Boolean attribute. Giving a facet the no_refine attribute has no effect except that edges created within the facet by refining will inherit the no_refine attribute. So to avoid refinement of a plane, all edges and facets in the plane must be given the no_refine attribute. The no_refine attribute may be specified on the datafile line for a facet, or the set command may be used. Examples:
set facet no_refine where fixed   unset facet[2] no_refine   list facet where no_refine   print facet[3].no_refine

Facet no_transform

Edge and facet read-write Boolean attribute. An edge or facet with the "no_transform" attribute will not be duplicated by the view_transform mechanism; only the original element will occur. For example, you might have facets that form a display of outer walls which you would not want duplicated. Example:
set facet no_transform where color == brown

Facet orientation

Facet read-write attribute. Controls the sign of oriented integrals on a facet. Value +1 or -1. Useful when triangulation manipulations create a facet with an undesired orientation. Example:
set facet[123] orientation -1
Also see the reverse_orientation command to physically reverse a facet's orientation.

Facet noncontent

Facet read-write attribute. When set, indicates this facet should not be used in volume calculations. Useful, for example, if you want to have facets be part of a body boundary for display purposes, but want to use constraint integrands for greater accuracy in volume calculations. Example:
set facet noncontent where on_constraint 1

Facet phase

Facet read-write attribute. If there is a phasefile, this attribute determines the edge tension of an edge between two facets in the string model. Example:
list facet where phase == 1

Facet named quantity

See named quantities for general elements.

Facet on_quantity

See on_quantity for general elements.

Facet named method instances

See named quantities for general elements.

Facet on_method_instance

See on_method_instance for general elements.

Facet extra attributes

See extra attributes for general elements.

Facet f_method_list

Facet array attribute. Internal name for the array holding the id numbers of the method instances to which this facet contributes. Read-only.

Facet f_next_bfacet

Facet read-only attribute. Used internally when iterating over the facets comprising a body.

Facet f_next_vfacet

Vertex integer attribute. Internal attribute used for the linked list that is used when iterating over the facets adjacent to a vertex. Not accessible to user since it uses internal element id type.

Body attributes

Body id

See id for general elements.

Body original

See original for general elements.

Body facets

Body read-only attribute. Generates facets bounding a body, with proper facet orientation with respect to the body. Example:
list body[1].facets

Body density

Body read-write attribute. Density used for gravitational potential energy. It can be set in the bodies section of the datafile, or with the set command, or by assignment. Command examples:
print body[2].density   set body density 3   body[2].density := 5

Body volume

Body read-only attribute. Actual volume of a body. This is the sum of three parts, in the soapfilm model:
• An integral over the facets bounding the body. This is \int z dx dy normally, but \int (x dy dz + y dz dx + z dx dy)/3 if symmetric_content is in effect.
• Any constraint content edge integrals applying to the body.
• The body's volconst attribute.
In the string model, the parts are
• An integral over the edges bounding the body's facet. This is \int -y dx.
• Any constraint content vertex integrals applying to the body.
• The body's volconst attribute.
Body volumes can be displayed with the v command, or with standard attribute syntax. Example:
print body[1].volume   foreach body where volume > 2 do print id

Body target

Body read-write attribute. The target volume of a volume constraint. May be set in the datafile, by the b command, or the set command. A volume constraint may be removed by the unset, or with the b command. Command examples:
set body[1] target 23   unset body target where id == 2   print body[2].target

Body volfixed

Body Boolean read-only attribute. Value is 1 if the volume of the body is fixed, 0 if not.

Body volconst

Body read-write attribute. A constant added to the calculated volume. Useful for correcting for omitted parts of body boundaries. Also used internally as a correction in the torus model , which will use the target volume to calculate volconst internally. In the torus model, the target volume should be set within 1/12 of a torus volume of the actual volume for each body, so the correct volconst can be computed. Each volconst will be adjusted proportionately when the volume of a fundamental torus domain is change by changing the period formulas. Volconst can be set in the datafile bodies section, or interactively by the set command or by assignment. Examples:
print body[1].volconst   set body[2] volconst 1.2   body[2].volconst := 1.2
It is best to avoid using volconst except in the torus model. Rather, use edge content integrals so that the proper adjustments will be made if the boundary of the surface is moved, or rebody is done.

Body actual_volume

Body datafile attribute. Actual_volume is a number that can be specified in the datafile definition of a body in the rare circumstances where the torus model volume volconst calculation gives the wrong answer; volconst will be adjusted to give this volume of the body.

Body pressure

Body read-write real attribute. If a body has a prescribed volume, this is a read-only attribute, which is the Lagrange multiplier for the volume constraint. If a body is given a prescribed pressure, then there is an energy term equal to pressure times volume. A body cannot have a prescribed volume and a prescribed pressure at the same time. Prescribed volume or pressure can be set in the bodies section of the datafile. If pressure is prescribed, then the value can be changed interactively with the b command, the set command, or by assignment. Examples:
print body[2].pressure   body[2].pressure := 1.3   set body[2] pressure 1.3

Body phase

Body read-write attribute. If there is a phasefile, this attribute determines the facet tension of an edge between two bodies in the soapfilm model. Example:
list body where phase == 1

Body centerofmass

Body read-write boolean attribute. Boolean body attribute. Applies to the "connected" bodies mode of graphical display in the torus model. When this is set for a body, the center of mass of the body as displayed is remembered, and the next time a body is graphed, its wrap is such that its new center of mass is near its previous center of mass. This prevents bodies near the boundaries of the fundamental region from jumping back and forth as they shift slightly during evolution. Default on. Example:
set bodies centerofmass

Body quantities

There are no named methods currently implemented for bodies, so named quantities and methods do not apply.

Facetedge attributes

Facetedge id

See id for general elements.

Facetedge oid

See oid for general elements.

Facetedge edge

Facetedge read-only attribute. Generates the single edge of the facetedge. Example:
print facetedge[1].edge[1].id

Facetedge facet

Facetedge read-only attribute. Generates the single facet of the facetedge. Example:
print facetedge[1].facet[1].id

Facetedge nextedge

Facetedge internal attribute. Oriented id number of the next facetedge in the facet edge loop. May be 0 in the string model for the last edge of a facet. Not available to users except in the output of a "list facetedges ... " command.

Facetedge prevedge

Facetedge internal attribute. Oriented id number of the previous facetedge in the facet edge loop. May be 0 in the string model for the first edge of a facet. Not available to users except in the output of a "list facetedges ... " command.

Facetedge nextfacet

Facetedge internal attribute. Oriented id number of the next facetedge in the loop of facets around the edge. Not available to users except in the output of a "list facetedges ... " command.

Facetedge prevfacet

Facetedge internal attribute. Oriented id number of the previous facetedge in the loop of facets around an edge. Not available to users except in the output of a "list facetedges ... " command.

Back to top of Surface Evolver documentation.       Index.