# Representing the Dual of Objects in a Four-Dimensional GIS

- 1.4k Downloads

## Abstract

The concept of duality is used to understand and characterise how geographical objects are spatially related. It has been used extensively in 2D to qualify the boundaries between different types of terrain, and in 3D for navigation inside buildings, among others. In this chapter, we explore duality in four dimensions, in the context where space and other characteristics (e.g. time) are modelled as being in four dimensional space. We explain what duality in 4D entails, and we present two data structures that can be used to store the dual graph of a set of 4D objects. We also discuss applications where such data structures could be useful in the future.

## Keywords

Geographical Information System Voronoi Diagram Cell Complex Delaunay Triangulation Combinatorial Structure## 1 Introduction

*per se*any of the objects, but rather the adjacency relationships that exist between them. The data structure used was the

*quad-edge*structure of Guibas and Stolfi (1985). In three dimensions, duality also permits us to understand how different solids are spatially related (e.g. two rooms in a building are

*adjacent*). Arguably the most known use of the dual is to model navigational paths inside three-dimensional buildings. Lee and Zlatanova (2008) and Lee and Kwan (2005) extract from a 3D building a graph that can be used in case of emergency, and Boguslawski et al. (2011) and Boguslawski (2011) perform the same using a data structure, the

*dual half-edge*(DHE), which simultaneously represents the buildings (the rooms and their boundaries) and the navigation graph. With the DHE, the construction and manipulation operations update both representations at the same time, permitting the simultaneous modelling and characterisation of buildings. There are several other examples of duality in GIS: the Delaunay triangulation and the Voronoi diagram are often used to model continuous phenomena, these two structures being dual to each other. Dakowicz and Gold (2003) use them for terrain modelling, Lee and Gahegan (2002) for interactive analysis, and Ledoux and Gold (2008) for three-dimensional fields in geosciences.

In this chapter, we are interested in the concept of duality in four-dimensional space to model four dimensional objects. These objects are the result of the integration of a non-spatial dimension to the three dimensions of space, to create 4D objects where all dimensions are treated as spatial (Raper 2000). Examples of the non-spatial dimensions that can be used are: time (Peuquet 2002; Worboys 1994), scale (van Oosterom and Meijers 2011; Li 1994) and attributes (beyond 2.5D-type modelling). As van Oosterom and Stoter (2010) argue, the main advantage of such an integration is the *consistency* of data, both across space and the other dimensions modelled—with the proper validation functions, one can ensure that all the data for a given region is consistent across time or across different scales, for instance.

Adding an extra dimension implies that a 4D primitive has to be modelled: the *polychoron* ^{1}, which is the 4D analogue of a polygon or polyhedron. To understand and characterise the spatial relationships between polychora (and between these and the lower-dimensionality primitives from which they are built), the dual graph of a set of polychora can be constructed and analysed. For example, in a 3D model of a building where rooms are represented by polychora we could locate people inside the building. With the dual graph, a user would be able to know where in 3D space a given user was at any time, when this person moved from a given room to another one, or the shortest path between any two rooms at any given time.

We first describe in Sect. 2 our terminology, the kinds of objects we are modelling in 4D, and the concept of duality. We then present in Sect. 3 potential data structures to store the dual graph of a partitioning of a 4D space. We first describe how *generalised maps* (Lienhardt 1994) can be used to extract and store the graph, and then we discuss how the DHE (Boguslawski et al. 2011; Boguslawski 2011) can be modified to store simultaneously both the partitioning and the dual in 4D. We analyse in Sect. 4 the storage of each structure, as one of our aims is to efficiently implement a 4D structure where the dual is available, and we briefly discuss in Sect. 5 potential applications of such data structures.

## 2 The Four-Dimensional Euclidean Space, and Duality

If we denote the three axes of the three spatial dimensions by \(x\), \(y\) and \(z\), then the axis \(w\) of the fourth dimension is perpendicular to that of all the spatial dimensions. In 4D Euclidean space (denoted \({\mathbb {R}} ^{4}\)), the simplest 4D primitive, called a *simplex*, is a 5-vertex polychoron and it is analogous to the triangle in 2D and to the tetrahedron in 3D. More generally, a \(d\)-dimensional simplex, also denoted as a \(d\)-simplex, is the convex hull of a set of (\(d+1\)) linearly-independent points in \({\mathbb {R}} ^{d}\). Constructing a 4-simplex can be performed hierarchically: from a tetrahedron, we first embed its 4 vertices in 4D (with four coordinates each), then one new vertex is added, and finally 4 new edges must be constructed (these join the new vertex to the existing 4 of the tetrahedron). The resulting polychoron has 5 vertices, 10 edges, 10 triangular faces (2-simplices), and its boundary is formed by 5 tetrahedra (3-simplices).

*cells*, where a 0-cell is a vertex, a 1-cell an edge, a 2-cell a polygon, a 3-cell a polyhedron, and a 4-cell a polychoron. Currently, no holes inside cells are allowed in our definition. We name a (\(k-1\))-cell incident to a \(k\)-cell a

*facet*of it; a facet of a 4-cell is thus a 3-cell that lies in its boundary. This resulting partitioning forms a

*cell complex*\(C\), which is a finite set of cells having the following two conditions:

- 1.
A facet of a \(k\)-cell in \(C\) is also in \(C\);

- 2.
The intersection of two cells \(\sigma _1\) and \(\sigma _2\) in \(C\), denoted \(\sigma _1 \cap \sigma _2\), is either empty or is in \(C\).

The concept of duality is valid in any dimension, as we consider a graph embedded in \({\mathbb {R}} ^{d}\) as a \(d\)-dimensional cell complex. The mapping between the elements of a cell complex in \({\mathbb {R}} ^{d}\) is simple: let \(C\) be a \(k\)-cell, the dual cell of \(C\) in \({\mathbb {R}} ^{d}\) is denoted by \(C^\ast \) and is a (\(d-k\))-cell. As a result, in four dimensions, a 0-cell becomes a 4-cell, and vice versa; a 1-cell becomes a 3-cell, and vice versa; and a 2-cell stays a 2-cell. Figure 3 shows the duality of a cell complex in \({\mathbb {R}} ^{3}\).

## 3 Potential Data Structures

There are several data structures that are able to represent models in four or more dimensions. Notable ones include: simplex-based ones (Paoluzzi et al. 1993; Shewchuk 2000), polytopal meshes (Sohanpanah 1989), (convex) decompositions of polytopes (Bulbul et al. 2009), and Nef polyhedra (Bieri and Nef 1988). However, despite the fact that they maintain various topological relationships, none of them provide efficient access to the dual graph of a model. We have nevertheless identified two candidate data structures that are able to do so, generalised maps and the dual half-edge. In this section, these are first introduced in their general form, and afterwards we specifically analyse how they could handle the dual graph in four dimensions.

### 3.1 Dual Half-Edge

As shown in Fig. 4a, with the DHE each polyhedron is represented independently with an edge-based structure (a *b-rep* model), and adjacent polyhedra are linked together by their shared faces, which are represented by half-edges joining 3-cells. These form a graph of connections in the dual of the original (primal) graph. Both the primal and the dual graphs are identical in terms of structure (i.e. their basic elements and connections). Figure 4b shows an idea of the relationships that are stored for each edge. Since these graphs conform to the duality concept as explained in Sect. 2, the only cells that are needed to build a 3D model are the 0-cells (nodes) and 1-cells (edges); the nodes store the vertex coordinates, while the edges store the connections between the nodes. Meanwhile, the 2-cells (faces) and 3-cells (volumes) are only implicitly represented, but their attributes can be stored in their dual counterparts, the 1-cells and 0-cells in the dual graph.

However, an edge is not an atomic element in the DHE. Each edge consists of two half-edges, each of them being permanently connected with its corresponding half-edge in the dual. This pair, half-edge in the primal graph and half-edge in the dual one, is called the *dual half-edge*, and forms the atomic element in this model. Each half-edge is represented with five pointers which keep references to: an associated vertex, the next edge around a shared vertex, the next edge around a shared face, the second half-edge of the edge, and to the dual half-edge.

These five pointers are necessary to represent complex models including non-manifold cases—when two cells are only linked by a shared vertex or edge. However, the number of pointers can be reduced by one if only cells linked by a shared face are taken into consideration. Additionally, a primal and dual half-edge pair can be merged and stored as a single record, since they are permanently connected—the number of pointers is reduced by one.

Using the data structure directly, without higher level construction operators would be extremely difficult—‘manual’ updating of pointers while edges are added to a model can easily cause many mistakes. Therefore, it is preferred to use the construction operators from Boguslawski (2011). They allow for model construction in an easy way, edge-by-edge, like in various CAD systems. Additionally, the dual graph is created automatically as the edges are added to the model and single cells are linked into a complex. These operators, used for modifications of the existing model, make only local changes in the primal and dual graph, and thus the whole dual graph does not need to be reconstructed after each modification.

During the construction process, the external cell, which encloses cells in a complex representing a modelled object, is automatically created. It can be considered as ‘the rest of the world’. This external cell prevents topological inconsistencies at the boundary of the complex, where cells do not have an adjacent cell to connect to. Also, navigation can be implemented without testing if a boundary of the complex is approached.

The DHE was originally designed for 3D models. However, a single polychoron can be represented using the DHE without any modifications, except for the use of 4D coordinates. This is done by instead representing the polyhedra that lie on its boundary, in a similar manner as a 2D data structure is commonly used to represent a single polyhedron by storing the polygons in its boundary, cf. Baumgart (1975). While this is not sufficient to represent a 4D cell complex with adjacent 4-cells or a non-manifold object, we believe that the data structure can be extended to represent objects in 4D. The biggest challenge is to correctly manage all the connections between the 4-cells, so as to fulfil the 4D duality rules.

### 3.2 Generalised Maps

Generalised maps (G-maps) are an ordered topological model developed by Lienhardt (1994) based on the concept of a combinatorial map, also known as a topological map, which was described by Edmonds (1960). They are roughly equivalent to the cell-tuple structure of Brisson (1989), but have been shown to be able to represent a wider class of objects known as cellular quasi-manifolds—manifolds that allow certain types of singularities, as long as every \(n\)-cell is incident to no more than two \((n+1)\)-cells.

Intuitively, a G-map is composed of two elements: a set of *darts*, each of which is defined by a unique combination of a specific \(n\)-cell from every dimension, and are often represented visually as half-edges or oriented edges; and *involutions* (\(\alpha \)), bijective operators connecting darts that are related along a certain dimension. In this manner, \(\alpha _{0}\) joins vertices to form edges, \(\alpha _{1}\) connects consecutive edges within a face, \(\alpha _{2}\) connects adjacent faces within a volume, and so on.

*orbit*operator, which returns a (possibly ordered) set of darts that are reachable by following certain involutions only. To obtain the darts that are part of a certain \(i\)-cell only, one can start from any dart \(d\) belonging to the \(i\)-cell, following all involutions

*except*for \(\alpha _{i}\). This is commonly denoted as \(<{\alpha }{\!\!/}_{i}>(d)\) (Lévy and Mallet 1999). Since \(\alpha _{i}\) connects

*adjacent*\(i\)-cells, not following it means remaining in the same cell. For simple construction, the

*sew*operation is used, connecting two

*i*-cells of the same dimension along the common part of their boundary. It does parallel traversals of two orbits, adding involutions that connect corresponding darts from each. Note that this implies certain ordering criteria in the orbit operator. Analogously, the

*unsew*operation removes these involutions. An example of a 3D G-map representation of two adjacent cubes is shown in Fig. 6.

The aforementioned elements and operations represent the combinatorial structure of a generalised map. However, to represent the geometry of the model, an additional *embedding* structure is used. If only linear geometries are required, only the 0-dimensional point embeddings are actually needed. These store the coordinates of each vertex.

Since an \(\alpha _{i}\) involution connects adjacent \(i\)-cells in the primal graph of a \(d\)-dimensional model, per definition \(\alpha _{d-i}\) does so in the dual graph. These can therefore be easily swapped to convert a graph into its dual. For the 4D case, \(\alpha _{4}\) connects corresponding involutions for the dual of the nodes (0-cells), \(\alpha _{3}\) for the edges (1-cells), \(\alpha _{2}\) for the faces (2-cells), \(\alpha _{1}\) for the volumes (3-cells), and \(\alpha _{0}\) for the 4-cells.

Unlike the DHE that permits us to represent both the primal and the dual graph simultaneously, G-maps permits us to directly represent either one or the other. Transforming a 4D cell complex into its dual is however a straightforward operation, the combinatorial part of it being performed in linear time. Alternatively, any cell’s dual can be directly obtained from the graph by interpreting an \(\alpha _{i}\) involution as an \(\alpha _{d-i}\) one. This is similar to how a Voronoi diagram is instead often manipulated from a Delaunay triangulation, cf. Boots (1974). Duality in the combinatorial structure of G-maps is therefore trivial to obtain, and can be done in real time.

Meanwhile, a geometric interpretation of the dual graph is also simple to get. Assuming linear geometries, only the point embeddings for the dual of the 4-cells need to be generated, e.g. using the centroid of the 4-cell, or simply an average of the point embeddings of the 0-cells in the boundary of the 4-cell. These are both easy to obtain using the \(<{\alpha }{\!\!\!/}_{4}>\) orbit corresponding to the 4-cell. Note that if the initial model (primal graph) is bounded, the dual representation will have unbounded cells. The running time of the geometric part of the duality transformation depends on the manner in which new point embeddings are computed. When each of these can be computed in constant time (e.g. using a few darts in their orbit), the entire transformation can be done in linear time. Otherwise, the complexity will be higher.

For consistency in our dual representation, we assume that there is an external (unbounded) cell. This ensures that applying the dual operation twice returns a model that is topologically equivalent to its original representation. The transformation of a 2D G-map into its dual is shown step by step in Fig. 7.

## 4 Storage of a 4D Cell Complex and its Dual

In this section we consider a 4D cell complex consisting of adjacent tesseracts and its dual. A tesseract, also known as a 4-cube or cubic prism, is the four dimensional analogue of a cube. As shown in Fig. 8, it is a closed four-dimensional polytope bounded by eight cubes. It contains 8 cubical 3-cells, 24 square 2-cells, 32 1-cells, and 16 0-cells.

### 4.1 Dual Half-Edge

To extend the concepts of the original 3D DHE to 4D, it is necessary to introduce the concept of an external 4-cell into the model. In a model with only one object, e.g. a single tesseract, there will be two 4-cells—internal and external—connected into a complex by adjacent 3-cells. Thus, in the dual of this model, there would be two vertices, which correspond to the internal and external 4-cells. The vertex corresponding to the internal one can be calculated as the centroid of the tesseract; while the node for the external one may be located at infinity—these two dual nodes are connected by eight dual edges representing all the bounding 3-cells of the internal and external 4-cells. Technically, each 3-cell is represented by a bundle of dual edges, but since the bounding nodes of the edges in the bundle are geometrically the same, and the edges are connected in a radial cycle, they are considered as a single edge. Each cube in this example is represented by a bundle of 12 dual edges. Since every primal half-edge is associated with a dual half-edge, the number of dual edges is the same as the number of primal edges of the cell.

A simple calculation determines that the number of atomic elements, dual half-edges, required to represent the above model is 384: there are two tesseracts (internal and external) consisting of eight cubes each; each cube consisting of 12 edges; and each edge consisting of two DHEs. It should be noted that the 3D dual graph originally used to connect 3-cells of a complex is replaced by the new 4D graph connecting 4-cells. However, at the current stage of our research we cannot determine all the DHE connections between the dual edges, and the exact number of pointers necessary to represent these connections.

### 4.2 Generalised Maps

A complex of two or more adjacent tesseracts can be represented using a 4D generalised map (4-G-map), in which each dart has 5 involutions (\(\alpha _{0}\)–\(\alpha _{4}\)). The construction of the model proceeds incrementally, starting from the vertex level. A vertex is defined by a point embedding, where its 4D coordinates are stored. An edge is defined by creating a pair of darts, linked to each other along the \(\alpha _{0}\) involution. Four of these edges, linked along their shared vertices at the \(\alpha _{1}\) involution, form a square face. Six of these faces, linked along their shared edges at the \(\alpha _{2}\) involution, form a cube. Eight of these cubes, linked along their shared faces at the \(\alpha _{3}\) involution, form a tesseract. The resulting tesseract is thus formed of \(2 \times 4 \times 6 \times 8 = 384\) darts and 16 point embeddings. Since each dart requires 6 pointers (one for each involution plus one for its point embedding), there are 2,304 pointers in the combinatorial structure.

The \(\alpha _{4}\) involutions have not been used up to this point. These are however used to link 3D-adjacent tesseracts together. Since no additional pointers are required, the total storage used for a cell complex of 4D tesseracts is the sum of the storage for each individual tesseract.

To obtain the dual of this model, the procedure described in Sect. 3.2 may be used. The \(\alpha _{i}\) and \(\alpha _{d-i}\) involutions are first swapped in the combinatorial structure. In this manner, \(\alpha _{0}\) becomes \(\alpha _{4}\) and vice versa, and \(\alpha _{1}\) becomes \(\alpha _{3}\) and vice versa. Afterwards, a new point embedding at the centre of each tesseract is created and linked to the darts on its boundary.

## 5 Discussion

We have shown how it is possible to store the dual graph of a 4D object by applying and extending existing data structures. G-maps already offer this possibility, although simultaneous storage of both graphs is not possible. The dual half-edge offers this possibility and is thus a promising alternative, especially as the dual graph is updated automatically while the primal is modified.

We also envision being able to use the 4D dual graph for various applications, navigation in 4D being an interesting possibility. For instance, it would make it possible to create a 3D indoor and outdoor way-finding application, where a user can select any given start and end points, and be given the best 3D route at any point in time, taking into account topological changes (e.g. a connecting corridor being only open during office hours).

We also plan to work on duality when holes/cavities are allowed in any dimension, up to 4D. An example of a 4D hole could be a section of a building being closed due to refurbishing work and thus inaccessible and removed from the graph. Note however that this assumption might not be true for all applications, e.g. emergency response. In a 3D representation, there would not be a natural connection between the building before and after the construction work, but it would be there in the 4D dual graph. This will allow us to fully utilise existing spatial datasets, and at the same time be able to represent a greater variety of situations.

## Footnotes

- 1.
Also called a 4-polytope or a 4-polyhedron.

## Notes

### Acknowledgments

This research is supported by the Ministry of Higher Education in Malaysia (vote no. 02H97, Universiti Teknologi Malaysia) and by the Dutch Technology Foundation STW, which is part of the Netherlands Organisation for Scientific Research (NWO), and partly funded by the Ministry of Economic Affairs, Agriculture and Innovation. (Project code: 11300)

## References

- Baumgart BG (1975) A polyhedron representation for computer vision. In: Proceedings of the May 19–22, National computer conference and exposition, pp 589–596.Google Scholar
- Bieri H, Nef W (1988) Elementary set operations with d-dimensional polyhedra. In: Computational geometry and its applications, Lecture notes in computer science, vol 333. Springer Berlin, pp 97–112.Google Scholar
- Boguslawski P (2011) Modelling and analysing 3d building interiors with the dual half-edge data structure. PhD thesis, University of Glamorgan.Google Scholar
- Boguslawski P, Gold CM, Ledoux H (2011) Modelling and analysing 3D buildings with a primal/dual data structure. ISPRS J Photogrammetry & Remote Sensing 66:188–197CrossRefGoogle Scholar
- Boots B (1974) Delaunay triangles, an alternative approach to point pattern analysis. In: Proceedings of association of American geographers 6:26–29.Google Scholar
- Braid IC, Hillyard RC, Stroud IA (1980) Stepwise construction of polyhedra in geometric modelling. Brodlie KW (ed) Mathematical methods in computer graphics and design, Academic Press, In, pp 123–141Google Scholar
- Brisson E (1989) Representing geometric structures in d dimensions: topology and order. In: Proceedings 5th annual symposium on computational geometry, ACM Press, Saarbrücken, West Germany, pp 218–227.Google Scholar
- Bulbul R, Karimipour F, Frank AU (2009) A simplex based dimension independent approach for convex decomposition of nonconvex polytopes.In: Proceedings of geocomputationGoogle Scholar
- Dakowicz M, Gold CM (2003) Extracting meaningful slopes from terrain contours. Int J Comput Geom Appl 13(4):339–357CrossRefGoogle Scholar
- Edmonds J (1960) A combinatorial representation of polyhedral surfaces. Notices of the American mathematical society 7.Google Scholar
- Gold CM (1991) Problems with handling spatial data-the Voronoi approach. CISM J 45(1):65–80Google Scholar
- Guibas LJ, Stolfi J (1985) Primitives for the manipulation of general subdivisions and the computation of Voronoi diagrams. ACM Trans Graph 4(2):74–123CrossRefGoogle Scholar
- Ledoux H, Gold CM (2008) Modelling three-dimensional geoscientific fields with the Voronoi diagram and its dual. Int J Geogr Info Sci 22(5):547–574CrossRefGoogle Scholar
- Lee I, Gahegan M (2002) Interactive analysis using Voronoi diagrams: Algorithms to support dynamic update from a generic triangle-based data structure. Trans in GIS 6(2):89–114CrossRefGoogle Scholar
- Lee J, Kwan MP (2005) A combinatorial data model for representing topological relations among 3D geographical features in micro-spatial environments. Int J Geogr Inf Sci 19(10):1039–1056CrossRefGoogle Scholar
- Lee J, Zlatanova S (2008) A 3D data model and topological analyses for emergency response in urban areas. In: Li J (ed) Zlatanova S Geospatial information technology for emergency response. Taylor and Francis, London, pp 143–168Google Scholar
- Lévy B, Mallet JL (1999) Cellular modeling in arbitrary dimension using generalized maps. Tech rep, ISA-GOCADGoogle Scholar
- Li Z (1994) Reality in time-scale systems and cartographic representation. Cartographic J 31(1):50–51CrossRefGoogle Scholar
- Lienhardt P (1994) N-dimensional generalized combinatorial maps and cellular quasi-manifolds. Int J Computl Geom Appl 4(3):275–324CrossRefGoogle Scholar
- Liu Y, Snoeyink J (2005) The “far away point” for Delaunay diagram computation in \({\mathbb{E}}^{d}\). In: Proceedings 2nd international symposium on Voronoi diagrams in science and engineering, Seoul, Korea, pp 236–243.Google Scholar
- Mäntylä M (1988) An introduction to solid modeling. Computer Science Press, New YorkGoogle Scholar
- Masuda H (1993) Topological operators and Boolean operations for complex-based nonmanifold geometric models. Comput Aided Des 25(2):119–129CrossRefGoogle Scholar
- van Oosterom P, Meijers M (2011) Towards a true vario-scale structure supporting smooth-zoom. In: Proceedings of the 14th ICA/ISPRS workshop on generalisation and multiple representation, Paris.Google Scholar
- van Oosterom P, Stoter J (2010) 5D data modelling: full Integration of 2D/3D space, time and scale dimensions, springer, In: Chap proceedings 6th international conference GIScience 2010, pp 311–324.Google Scholar
- Paoluzzi A, Bernardini F, Cattani C, Ferrucci V (1993) Dimension-independent modeling with simplicial complexes. ACM Trans Graph 12(1):56–102CrossRefGoogle Scholar
- Peuquet DJ (2002) Representations of space and time. Guilford Press, New YorkGoogle Scholar
- Raper J (2000) Multidimensional geographic information science. Taylor and Francis, LondonCrossRefGoogle Scholar
- Shewchuk JR (2000) Sweep algorithms for constructing higher-dimensional constrained delaunay triangulations. In: Proceedings of the 16th annual symposium on computational geometry, Hong Kong, pp 350–359.Google Scholar
- Sohanpanah C (1989) Extension of a boundary representation technique for the description of n dimensional polytopes. Comput Graph 13(1):17–23CrossRefGoogle Scholar
- Worboys MF (1994) A unified model for spatial and temporal information. Comput J 37(1):26–34CrossRefGoogle Scholar