We looked at the SimpectialComplex on the previous page. Delta complexes give us an alternative way to encode topological structures. The difference is that the boundary of delta complexes does not have to have distinct faces, for instance, an edge can go from a point back to the same point. We also represent them differently, each dimension indexes into the dimension below it rather than everything being indexed into points as with simplectial complexes.
The dimension of a simplex no loger depends on the number of points in the simplex. So a delta complex can be created from any type of cell complex (no longer just triangles but also squares ...) or a mixture of them.
Advantages of Simpectial Complexes

Advantages of Delta Complexes

So it is worthwhile implementing both types in code with conversions between them.
It is possible to convert from and to simpectial complexes like this:
simpectial complexes > delta complexes > simpectial complexes
and get back to where we started. However it is not always possible to start with delta complexes and get back to where we started.
delta complexes > simpectial complexes > delta complexes
This is because the more compact coding of delta complexes is hard to translate because it can only be done by adding extra points. Also the two types are not exactly isomorphic as there are special cases which can only be coded in one type.
There are also other codings of cell complexes such as cubical complexes, we will discuss these on further pages.
Three types of cell complex are implemented:

Delta Complex
When we looked at the delta complex we got a chain of 'face maps' between each dimension and the next lower one. 
In homology we treat this as a chain of abelian groups (more detail on the page here).
The above representation defines faces, of any dimension, by their vertices. This is an efficient way to define them, the only disadvantage is that intermediate parts, such as edges, are not indexed. It is sometimes useful to be able to do this, for example, when generating homotopy groups such as the fundamental group.
To do this we represent the complex as a sequence of 'face maps' each one indexed into the next.
The ordering of the indexes is important. The indexes of any face are always ordered acording to their order in the next order face.
As an example consider the representation for a single tetrahedron:
The usual representation would be:  (1,2,3,4) 
which is very efficient but it does not allow us to refer to its edges and triangles.  
Here we have indexed:


This representation holds all these indexes so that we don't have to keep creating them and they can be used consistently.  
Face MapsSo the tetrahedron indexes its 4 triangles, each triangle indexes its 3 edges and each edge indexes its 2 vertices. Each face table therefore indexes into the next. To show this I have drawn some of the arrows (I could not draw all the arrows as that would have made the diagram too messy). 
Since edges, triangles, tetrahedrons, etc. are oriented we need to put the indexed in a certain order.
Edges are directed in the order of the vertex indices. That is low numbered index to high numbered index:  
For triangles we go in the order of the edges, except the middle edge is reversed. On the diagram the edges are coloured as follows:
This gives the triangles a consistent winding 

However the whole tetrahedron is not yet consistent because some adjacent edges go in the same direction and some go in opposite directions.  
This gives the orientation of the faces as given by the right hand rule. That is: if the thumb of the right hand is outside the tetrahedion, pointing toward the face, then the fingers tend to curl round in the direction of the winding. 
The higher order faces may continue on in this manor, however it is difficult to visualize.
So to represent this structure we use the following:
Rep := Record(VERTS:VS,SIMP:List(List(Integer)))
where:
 VS is a list of verticies in whatever form we are using.
 Integer is an index, a negative sign reverses the direction.
 The inner list represents one of the tables shown above, edge has 2 entries, triangle has 3, and so on.
 The outer list holds all the tables, edge first, then triangles and so on.
Geometric Realisation and Delta Complexes
There is a close connection between geometric realisation and delta complexes.
When we embed a simplicial set or cell complex into a topological space we have a dimension for each vertex and the vertex is represented by a vector from 0 to 1 in that dimension. We can do the same for lines, triangles ... There in now a linear mapping between vertices, lines, triangles... (that is a matrix). So a topological shape is now represented by a sequence of matrices.
More information:
 page about geometric realisation here
 page about delta complexes here
Creating Delta Complexes
Here are 3 ways to construct a delta complex:
From DeltaComplexFactory  Some simple complexes are provided by factory functions. We cab easily construct from factory functions like this: 
(5) > cD := circle()$DeltaComplexFactory(Integer) (5) 1D:[[1, 1]] 0D:[[0]] Type: DeltaComplex(Integer) 
From FiniteSimplicialComplex  Sometimes it is easier to construct a simplicial complex first and then convert. Constructing from a simplicial complex first and then converting: 
(6) > cS := sphereSurface(2)$SCF (6) points 1..3 (1,2) (1,3) (2,3) Type: FiniteSimplicialComplex(Integer) (7) > deltaComplex(cS) (7) 1D:[[1, 2],[ 1,3],[2, 3]] 0D:[[0],[0],[0]] Type: DeltaComplex(Integer) 
Directly from index lists. Here we construct directly from index lists: 
(8) > deltaComplex([],1, [[[1, 1]]])$DeltaComplex(Integer) (8) 1D:[[1, 1]] 0D:[[0]] Type: DeltaComplex(Integer) 
Representation of Delta Complexes
The representation consists of:
 vertexset  As for simpectial complex.
 maps  Highest dimension first down to dimension zero (points)
The array for each point is either [0] for a used point or [] for an unused point. By 'unused point' I mean a point that is not part of this delta complex but its position is held for future use.
Examples
Here is an example of a tetrahedron (2sphere). 
First we setup 'factories' for DeltaComplex and SimplicialComplex then we convert a SimplicialComplex solid sphere to a DeltaComplex. 

Other Examples
Here we constuct a varoius shapes, using factories created above, first directly as a delta then convert from simplex to compare results.
Unconnected Points
This tests that unconnected points are handled correctly. This example has 4 points:
We want to test that this is correctly converted to a delta complex. 

Circle
More about topology of circle on page here.
Constuct a circle first directly as a delta then convert from simplex. The first delta representation is much simpler as it allows us to use only one point. 

Dunce Hat
Constuct a dunce hat first directly as a delta then convert from simplex. Again the first delta representation is much simpler using one point. 

Torus Surface
More about topology of torus on page here.
Constuct a torus surface first directly as a delta then convert from simplex to compare results. Again the first delta representation is much simpler. 

Projective Plane
That is, a real projective space in 2 dimensions (P²). More about topology of projective plane on page here. 
Constuct a projective plane first directly as a delta then convert from simplex to compare results. 

Klein Bottle
Constuct a Klein bottle first directly as a delta then convert from simplex to compare results. 
