Antiprism Up Next

Using edges in Antiprism

Working with Edges

The OFF format is generally used to hold face and coordinate data. Using the OFF format to work with edges is less well established. This is an overview of how edges are managed within Antiprism.

What is an edge?

There are two ways that an edge can be read from an OFF file. The two types are handled differently in the programs
Explicit Edges
These are set up from any OFF faces having exactly two vertices. Their colour is the OFF face colour.

Implicit Edges
These are extracted from all the OFF faces. They are the edges of the faces. Any pair of neighbouring vertices in an OFF face is considered an implicit edge. Implicit edges are coloured with the default colour.

How are edges read and written?

When an Antiprism program reads an OFF file the two-vertex faces are converted to edges - they are added to the edge list rather than the face list. A particular program may then manipulate the edge list and add implicit edges, or clear all the edges, etc.

When an Antiprism program writes an OFF file its current list of edge elements is written out as two-vertex OFF faces, with their colour if they have one. These will be interpreted as explicit edges when the file is next read by an Antiprism program.

An edge joining any pair of vertices can only appear once in the edge list. If the OFF input includes more than one two-vertex face with the same vertices, in either order, then the edge will have its colour overwritten.

How can edges be manipulated?

off_color colours edges. If the edge is not already in the program's edge edge list it will be added. Otherwise, the new colour will overwrite the old one. The colouring of explicit and implicit edges can be controlled with off_color -E

off_util -x e will clear the edge list.

off_util -x vf will isolate the edge list. The faces section of the OFF file output will contain only the edges.

off_util -s will make a skeleton. Edges not already in the edge list will be coloured with the colour of an adjoining face, then all the faces will be removed.

How do particular programs use edges?

Model programs: polygon, also named models
These tend not to include edges in the OFF output. Edges can be added afterwards with off_color -e. However, some programs e.g. lat_grid, use edges to represent struts.

Model programs that use another model as a base: poly_kscope, kcycle
These tend to preserve edge elements in the output, if it is sensible to do so.

Geometric transformation programs: off_trans, off_align
These will preserve edge elements

Antiview and most conversion programs: off2pov, off2vrml, off2m
The default behaviour is to set up the explicit and implicit edges, and to use the explicit edge colours for any duplicated edges.

If the implicit faces aren't wanted then they can be hidden by colouring them transparent black with option -E x.

If only implicit faces are wanted then the two-vertex OFF faces can be stripped before using the conversion program. This can be done with off_util -x e.

Reporting programs: off_report, off_query
The default behaviour is to set up the explicit and implicit edges for the report or query. This can be changed with option -E

Minmax, (and off2eig)
These use edges as connecting elements. If there are any explicit edges then just these will be used. If there are no explicit edges then the implicit edges will be used.

If only implicit faces are wanted then the two-vertex OFF faces can be stripped with off_util -x e.

If both explicit and implicit edges are wanted then the implicit edges can be added in with off_color -E i -e 0

     Next: OFF format description
     Up: Programs and Documentation

Home   |   Programs   |   Examples   |   Album   |   Download   |   Development   |   Forum   |   About

Contact:      -      Modified 12.9.2016