Generating Surface in Higher Dimensions using Local Cell Tilers

Dr Steve A. Hill Dr Jonathan C. Roberts

Computing Laboratory, Computing Laboratory, University of Kent, University of Kent, England, UK; England, UK; [email protected] [email protected]

Abstract dimensional model using motion, edge and depth cues. However, higher dimensions have been In two dimensions contour elements surround two proposed and considered for many years; with dimensional objects, in three dimensions surfaces the fourth dimension representing time, distance, surround three dimensional objects and in four a fourth spatial coordinate and even a spiritual dimensions surround hyperobjects. realm. These surfaces can be represented by a collection Objects within four and higher dimensions can

of connected simplices, hence, continuous n di- be generated from natural extensions to plane or

mensional surfaces can be represented by a lat- solid geometry, with each three dimensional ob-

1 tice of connected n dimensional simplices. ject (plane, cube, cone) having a four and higher The lattice of connected simplices can be cal- dimensional equivalent (, , culated over a set of adjacent n-dimensional hypercone). Data sets with higher dimensions cubes, via for example the Marching Cubes Al- can be generated from simulations, collated from gorithm. These algorithms are often named local statistics or sampled from real-life phenomena; cell tilers. We propose that the local-cell tiling many diverse ®elds-of-study provide data with method can be usefully-applied to four dimen- copious variables that can be displayed in a num- sions and potentially to N-dimensions. ber of dimensions using various imaging tech- We present an algorithm for the generation of niques. major cases (cases that are topologically invari- Modern computer graphics provide the abil- ant under standard geometrical transformations) ity to view, interrogate and understand objects and introduce the notion of a sub-case which sim- and phenomena that exist in higher dimensions. pli®es their representations. Each sub-case can For example, an image of a Klein bottle, with a be easily subdivided into simplices for rendering twisted surface, intersects itself within three di- and we describe a backtracking tetrahedroniza- mensions, whereas within four dimensional space tion algorithm for the four dimensional case. An the bottle can be depicted without the self inter- implementation for surfaces from the fourth di- section [3]. mension is presented and we describe and discuss Geometry in higher dimensions can be (1) pro- ambiguities inherent within this and related algo- jected down to lower dimensions, using a variety rithms. of projection methods including parallel, perspec- tive and central or (2) represented in other coordi- 1 Introduction and Motivation nate systems, including Parallel Coordinates [17] that depict the relationships and dependencies be- tween N-Dimensional data (especially geometry) We live within three dimensional space; see- within a two dimensional parallel axis coordinate ing our world via a two dimensional projection, system. which is reconstructed by our brain into a three

Visualizations of n-dimensional data can be 1 obtained by rendering the `surface' of the data. paths [10, 11, 21]; and (2) Local Cell evaluation, The surface created is one dimension less than the that can be further subdivided into: (a) Advanc- original data: for example, the surfaces from two ing Front, that ®nds the surface by growing a seed dimensional data create contour plots (one dimen- point on the surface, from where the other surface sional line segments in two dimensions) and three segments are found [33, 27]; and (b) Complete dimensional (volume) data produces two dimen- Cell Evaluation, that evaluates each cell's con- sional faces in three dimensions. Hence, from a tribution to the surface: forming a surface made four dimensional data volume a is from tiles [25, 20, 7]. We use and extend the lat- formed. ter method to four and theoretically higher dimen- A two dimensional contour on a map, repre- sions. Moreover the advancing front techniques

senting a particular height above sea-level, can be could be likewise extended to n-dimensions. created using a continuous connection of straight line segments. Similarly, a continuous surface 2.1 3D Local Cell Surface Generation within three dimensions can be represented by a lattice of two-dimensional polygons. Therefore, a The local cell tilers evaluate a single cell for its continuous hypersurface can be represented by a contribution to the surface. Two such methods in

lattice of n-dimensional simplices. These simplex three dimensions are by lookup (e.g. Marching elements can be calculated from how the `sur- Cubes) [20] and algorithmically [6]. An estimate

face' intersects a set of adjacent n-dimensional of the position of the surface intersection along a cubes. A surface at a particular value (isosurface) particular edge can be found by linear interpola- through sampled data can be realised at the point tion. Multiple surfaces at the same threshold can of zero value, interpolated between any edge of an be produced by the local cell methods, but erro-

opposing sign. The signs at the n-cube vertices neous surfaces due to the locality of the surface are found by thresholding the spatial data at a decision (by false positives or false negatives) can discrete data point. Consequently, hypersurfaces be produced. Hill and Roberts [16] and Ning and within higher dimensions can be depicted using a Bloomethal [25] discuss some methods to disam- lattice of three-dimensional simplices (volumes), biguate a cell and hence remove the erroneous generated by local evaluation through a sample surfaces. Degenerate triangle pieces, where the set of points. surface-simplices become in®nitesimal, can also This paper discusses the problems, require- be created (as a result of the interpolation pro- ments and some solutions in implementing an cess), slowing the rendering and increasing the

n-dimensional isosurface algorithm from spatial storage. However, decimation [30] or mesh dis- data, using local cell tiling methods. We fo- placement [23] techniques can be used to reduce

cus on the generation of the n-dimensional ge- the number of (tiny) polygons. ometry rather than the rendering or realistic- representation (using say higher-dimensional 2.2 Surface Creation ± the Use of Sim- light) of the n-dimensional image. plices Initially we present some background informa- tion. We then describe the algorithms and tech- The local cell tilers often use a cube (rectilin- niques: ®rstly from a theoretical viewpoint and ear) cell representation, as in the Marching Cubes secondly within a practical framework. Finally, Algorithm. Tetrahedral cells have also been we discuss other possible implementations and used [34], the advantage being that a ®ner detailed solutions with their relevant merits and pitfalls, surface is created and, that from local sign alter- ending with conclusions and possible future ex- nations only one surface can intersect the tetra- tensions. hedron Ð there is no ambiguous face. However more polygons are usually generated [34] and as the tetrahedra can be divided into a local cube 2 Background cell, in con®gurations of ®ve or six tetrahedra, ambiguities are still present: because the isosur- There are (broadly) two ¯avours of surface mesh face is created by considering only neighbour data algorithms: (1) Planar Contours, that generate points. The ambiguities can be resolved using a surface over the boundary of adjacent contour twelve tetrahedra con®guration [5] requiring an

2 additional (tri-linear [15] or tri-cubic [1]) interpo- creating the popular hypercube depiction, where a lated center point. cube is displayed within a cube [12]. Simplices are also used in the representation of the surface mesh. All two and three dimensional graphic libraries support their rendering and there 3 De®nitions are algorithms that ef®ciently triangulate two and three dimensional areas [4]. Within this section we (1) present how the major- cases are generated; (2) describe a secondary par- tition separating the major-cases into sub-cases; 2.3 The Marching Cubes Surface Algo- (3) describe the various transformations that are rithm available and enumerate their respective major

8 and sub-cases. A surface can intersect a cube in 256 (2 ) ways: this can be broken down into 14 cases if mir- ror and rotational symmetry are considered or 15 3.1 The Motivation cases without the mirror operation. The 256 com- ponents can be stored in a lookup table containing A lookup table, to hold a complete enumeration of

appropriate surface topology segments. the cases within three dimensions, contains 256

n n

The marching cubes algorithm [20] uses a bi- elements (2 ± where is the number of ver- 16 nary threshold (the isosurface value) on the ver- tices). Therefore, there are 65536 (2 ) con®g- tices of a cube to generate an eight bit (one for urations for the vertex classi®cation on a four di- each vertex) number that is used as the key into mensional cube. If a Marching Cube method was the lookup table. The algorithm `marches' se- applied directly to four dimensions the lookup ta- quentially through the data, thresholding the eight ble could become unmanageable; with an aver- neighbouring data-samples and looking up the age of 20 tetrahedra for each major case. More- index to collect the surface intersections at that over techniques to subdivide the problem domain position. The vertices of the retrieved surface would (a) simplify the algorithm for explanation triangles are then interpolated into the position and implementation and (b) hopefully provide far governed by the threshold value, appropriately more ef®cient storage. shaded and rendered. 3.2 Major-Cases

2.4 N-dimensional geometry

n 2 In n-dimensions each cube has vertices each Perceiving geometry within a higher dimensional of which may be inside or outside the surface,

space is not intuitive. Therefore, we present some hence the set of all possible con®gurations C con-

n

2 2 simple n-dimensional geometry facts; for more tains elements. In Lorensen and Cline's ac- information see: [3, 12, 31]. count [20] of their local cell tiler, they identify 14 In three dimensions the rotations can be ex- major cases. These correspond to sets of vertex pressed as ªrotations about each axisº, but this con®gurations which are closed under rotation,

does not extend to n-dimensions. There is, in fact, mirror and vertex complement.

one rotation per pair of axes, which formulates to More formally, the major cases

N (N 1)2

degrees of rotation [12]. Therefore, are established by partitioning C into

C C C

2 m

in four dimensions there are six rotations. smaller sets 1 such that:

S

m

C = C C

There are many different projections from i i.e. the set is covered, and

i=1

T

m

C = fg

four dimensions to three, including: (1) Ortho- i i.e. the sets are disjoint. Most

i=1

e C C i graphic, where one coordinate can be thrown importantly, for all i , is a re¯exive

away; (2) Pinhole perspective, where the ®rst transitive closure under the one-to-many relation:

N 1 R (e) = f(e T (e)) (e T (e)) (e T (e)g

1 2

coordinates are scaled by dividing by k

(F C )F F T

N L D i

D , being the Focal distance, where each represents a major case invariant

F C n N L the Focal Length and the th coordi- transformation, e.g. rotation, mirror or comple-

nate; (3) Central, where the nth coordinate is ment. Problems with surface continuity imply

1 (x y z w ) =

shrunk into the N coordinates: that complement may not be a desirable operation

(xF (F w ) y F (F w ) z F (F w ))

D L D L D L ; to include (see below).

3 Dimension geometry (for example holes may appear). How- 12 3 4 ever, many other approaches lead to the same de- R Major Cases 3 6 23 496 cisions being made. We return to these problems Sub-Cases 2 5 12 272 in Section 4.2. R,C Major Cases 2 4 15 272 Sub-Cases 2 3 7 99 R,M Major Cases 2 6 22 402 4 Implementation Sub-Cases 2 5 11 209

R,M,C Major Cases 2 4 14 222 The n-dimensional surface is generated by con- Sub-Cases 2 3 7 74 necting individual surface elements (simplices). Transformations: Rotation (R), The simplex information can be subdivided and Complement (C), Mirror (M) stored in many ways. The amount and orientation of the simplices, for a given cell, represents the Table 1: Group sizes for the Major cases and Sub- most signi®cant information ± being used in ev- cases ery method. The simplex information can be re- trieved by: (1) calculating each simplex division dynamically [6]; (2) pre-calculating and storing 3.3 Sub-Cases each simplex division within one large table; and (3) pre-calculating the simplex division for just It is quite remarkable (and fortunate) that of 256 the major-cases or the sub-cases. possible con®gurations in three dimensions, we The latter two possibilities are depicted in Fig- need only consider 14 major cases (see [7] for a ure 2. Method (3) uses a two-table lookup discussion). In three dimensions it is not too ex- scheme, with the primary table holding informa- pensive to store all 256 cases. In higher dimen- tion about either (a) the major-cases (b) the sub- sions, however, the number of con®gurations ex- cases and the secondary table containing the ac- plodes. Even the number of major cases grows tual divisions of the major or sub-cases, respec- rapidly. It turns out that in four dimensions there tively; as shown in Figure 2 Method (a) and (b) are nearly as many major cases as their are con- respectively. The primary table contains a list ®gurations in three dimensions. In higher dimen- of two-tuples: an orientation with a secondary- sions, the geometry associated with a major case index. The secondary-index then provides the key is also more complicated. This prompts us to seek into a table of either major-case or sub-case sim- ways to reduce further the size of the tables re- plices. The orientation represents a matrix opera- quired. tion, transforming the simplices (of the secondary We can reduce the number of cases if we allow table) into the correct orientation for the chosen major cases to be constructed from a union of sub- surface-intersection index of the primary table. cases. A sub-case represents a single fragment of boundary and is de®ned to be an edge-connected (both vertices have the same status with respect to 4.1 Pre-Processing ± Table Generation the threshold) fragment of a major case. The set of sub-cases can be computed by exam- We now describe how the major and sub-cases for ining each major case and dividing it into one or the primary and secondary tables, respectively, more edge-connected sub-components. The sub- are formed. The data is processed sequentially components can then be identi®ed with their ma- as each stage uses the results from the previous jor case equivalents along with appropriate trans- level. formations. In Table 1, we summarise the number of ma- The Major-cases. Two lists are created, one to jor and sub-cases in one to four dimensions and hold the searched-cases and another to hold the in Figure 1 we give the 74 sub-cases for four di- major-cases. mensions. The next unmarked index is taken from the The de®nition of a sub-case in this way makes search-list added to the major-case list and then some assumptions about the underlying surface, exhaustively transformed into all other con®gura- and may lead to inconsistencies in the resulting tions which are marked. The process then repeats

4 Figure 1: 74 Sub-cases for four dimensions for the next major case until all the indices have subdivision dif®cult. Therefore, we use a back- been searched. tracking technique to avoid this problem. A question remains Ð how do we choose The Sub-cases. These are formed by dividing which vertex to remove? Several strategies might the major cases into their disjoint cases, using be tried: for example, choose the ®rst entry in the the edge-connected criterion (as de®ned in Sec- vertex list or take the vertex with the least con- tion 3.3). necting edges. Experiment suggests that the latter approach is most effective in this case. The method proceeds by: Tetrahedronizing the sub-cases. Tetrahe- dronization is the four-dimensional analogue of 1. The sub-case object is represented as a list of

triangulation. Our aim is to split n-dimensional vertices, each of which is linked to a list of geometry into simplices. There is no canonical its neighbours. Initially, by construction, all decomposition of a hyper-surface into tetrahedra, vertices have three connections. so any algorithm must make somewhat arbitrary choices. 2. Select the next vertex (in order on the list) In the context of this work, we are interested with the fewest incident edges, and remove it in decomposing only the sub-cases, and a sim- from the object thus generating a tetrahedron ple strategy can be made to work. The method or two tetrahedra. It is easy to split a vertex proceeds by repeatedly choosing a vertex and re- with three edge connections into one tetra- moving the tetrahedron associated with that ver- hedron or even four edge connections into tex from the sub-case object until a single tetra- two tetrahedra, but ambiguities and dif®cul- hedron remains. This process is depicted in Fig- ties occur when there are ®ve or more edge ure 3, and is similar to the techniques used in three connections. dimensions. Unfortunately in four dimensions, the remnant sub-object may have vertices with 3. Update the connectivity of the remaining ob- four, ®ve or more incident edges making further ject. This update is achieved by connecting

5 the vertices of the remaining obejct in the same con®guration as the connectivity of the base of the split tetrahedron. Complete simplex enumeration Method 2 4. Determine if at a certain level of vertex split- ting all the vertices are connected to ®ve or more edges. If so then the previous level is Simplices for reinstated and the different split attempted in

Index: 0 .. 65535 .. 0 Index: each index 2.

In our results, using the `fewest edges method', Primary table Secondary table Method 3a and only taking off the maximum of two tetrahe- dra at once, backtracking occurs for only three of the 74 sub-cases. Simplices for the Major−Cases Creating the Orientation Matrix. The orien- tation matrix represents the transformation from Index: 0 .. 65535 .. 0 Index: the primary table (of major or sub-case indexes) 2−tuple (Orientation, Index) into individual simplex elements and is stored as

Primary table Secondary table Method 3b a 32 bit integer, with two bits for every position 

in the matrix. As all the rotations are by 90 ,

1 0 1 00 01 10 only values of mapped onto re- spectively, are required. The orientation matrix is Simplices for the calculated by rotating each sub-case (from each Sub−Cases major case) into the standard sub-case and cal-

Index: 0 .. 65535 .. 0 Index: culating the inverse transformation matrix, of the 2−tuple list [(Orientation, Index)] whole operation.

Figure 2: Table lookup schemes 4.2 Inherent Ambiguities and Possible Solutions Ambiguities may occur in surfaces evaluated from local cell intersections. These occur in the cells when the surface intersects one face of the

n-cube through each of its four edges. There- fore, as a result of local decisions spurious holes 1 2 Sub− or additional surface segments can be generated. case from Moreover, this face occurs in two dimensions and index propagates to higher dimensions, so any n-cube number 15 that has an `ambiguous face' is potentially an am-

biguous n-cube. There are many reported disambiguation strate- 3 4 5 6 gies for the three dimensional local cell tiling al- gorithms (see [16, 25]) which can be divided into two groups: (1) those that provide a solution from a static analysis of the local vertices and (2) meth- ods that require an extra sample point to generate an appropriate connected surface. Figure 3: Splitting an object into tetrahedra Any correct disambiguation strategy needs to be consistent, to generate a continuous connected surface. The original Marching Cubes algorithm generates an inconsistent surface when adjacent

6 Complementary a It can be argued that at high data-resolutions Case the anomalies become unobservable, although at high magni®cations the anomalies could still be seen. Alternatively, a subdivision technique could be implemented: dividing the data until pixel sized cubes are formed, such as the Divid- False negative ing Cubes algorithm [7], although magni®cation, again, can reveal a discontinuous surface. b Other disambiguation strategies could be used and extended to higher dimensions, including us- ing tetrahedral cells, that provide unique surface intersections (see: Section 2.2), instead of cubical cells. A dilemma occurs between the `added ad- vantage of the complex-disambiguation strategy' Topologically Correct Surface and the `costs involved in calculating and pro- cessing the strategy'. In practice, the added com- putation cost is insigni®cant and although more Figure 4: False negative appearing, from adjacent simplices are generated they represent a `small complementary cases increase' on the complexity of the overall sur- face. Conversely, the ambiguous cases within three dimensions infrequently occur: as Neilson cubes of alternative (complementary) con®gura- and Hamann [24] discovered. tion are connected [8], Figure 4a. This can be improved by individually triangulating the com- plementary cases [29], Figure 4b. This con®gura- 5 Results tion can be provided by an extended lookup table,

with different triangle con®gurations for the com- Our n-dimensional surface algorithm is useful for plementary cases. In general the amount of tri- data visualization, where the data is sampled over

angle combinations required for each ambiguous a rectilinear grid. Phantom data generated from

#f

n 2 #f face f for a given -cube is [24], where analytic functions is quite easy to generate and is the number of ambiguous faces; but, in prac- four dimensional fractal data or the four dimen- tice only a sub-set of these con®gurations is re- sional counter-parts of the three dimensional vari- quired [29], being similar under rotation and gen- ants can be formed ± hyper-cube, cone or , erating a topologically correct surface. for example. Similarly, this method can be extended to n- dimensions, where the complementary cases are 5.1 Examples of Application treated differently. Separate complementary con- ®gurations also help to maintain the vertex-order Iris Explorer on a Silicon Graphics Indy has been of the simplex elements: as they can be described used as the harness for our implementation. We in a clockwise order, relative to the surface-object, have tested the algorithm on a number of sampled aiding the renderer. data sets and generated appropriate results. The sub-cases are generated by separating the Each of the methods produce the same visual major cases into disjoint surface elements, the results, with the same tetrahedra con®gurations, same way as in the Marching Cubes [20] and a simple parallel (orthographic) and perspective similar problems of surface continuity may re- projection is used to generate the result. A voxel sult. Consequently, these sub-cases can be said, version of a four dimensional cube is displayed depending on the separation technique, to be am- using the system, Figure 5. The surface inter-

biguous in form. Like the surface con®gurations sections are generated by linear interpolation of

#f in three dimensions: 2 possible sub-case con- the threshold across the edges of the cell; the up- ®gurations can be formed. One simple solution is per images were generated using a low threshold, provided by using separate complementary sub- whereas the lower pair were generated using a case con®gurations for each major case. middle threshold value.

7 bytes (655365). However, many architec- tures may pad the structure to at least 6 or 8 bytes. The secondary table for the (222) major-cases consists of an array of pointers

to an array of n tetrahedra, there are 2332

tetrahedrons so the table can be stored in

+ 10.2K bytes (42332 222 4).

Method 3b The primary table using the sub- cases, consists of an array of 65536 point- ers pointing to an array of (orientation, sub- index) tuples, stored with the size of the array ± representing the number of sub- cases per major index. Each orientation and pointer can be stored in 4 byte portions. Therefore, as the whole table contains ap- proximately 130800 sub-case indices, the ta-

ble can be stored in approximately 916K

+ bytes (655364 130800 5). The sec- Figure 5: Examples of Application ondary table for the (74) sub-cases consists

of 869 tetrahedra that can be stored in 3.8K

+ 5.2 Table Sizes bytes (4869 74 4). Here we describe the memory usage of each of 5.3 Conclusions the four methods described in section 4. A tetrahedra contains four vertices, and each The complete simplex table (method 2) provides vertex can be represented by an integer label, so, the advantage that all of the data is correctly ori- each tetrahedra can be stored in 4 bytes (one byte entated, so it can be directly applied to the data, for each vertex). Moreover, the vertices of the and although the table is larger than the other tetrahedra are recovered from intersections along methods its size is not too great (within four di- the edges of the local cell, therefore, an alterna- mensions) to be stored on a local machine. tive representation consists of a two-tuple label The primary table for the major cases is about for each tetrahedra-vertex: relating to the edges half the size of the sub-case primary table: due of the hyper-cube. The former 4-byte representa- mainly to the use of pointers for the 2-tuple array. tion will be used below. The reverse is true for the size of the secondary ta- ble: where the sub-case secondary table is much Method 1 The dynamic method uses the least smaller; we postulate that this comparison would memory, but takes the longest to calculate. be even more distinct in higher dimensions. How- Method 2 The complete simplex table consists ever, the combined size of the primary and sec- ondary tables falls in favour of the major-cases: of a 65536 array with n tetrahedrons per in- dex. Therefore, as each tetrahedron can be due to the way the data needs to be stored. stored in 4 bytes, the number of tetrahedra in The sub-cases, although using a ®xed orienta- 1 byte, the array pointer in 4 bytes and there tion disambiguation strategy, provide a concise are 356817 tetrahedra for the whole (222 representation: allowing the simplices to be cal-

major-case) table: the table can be stored in culated by a simple tetrahedronizing algorithm.

+ 1.75M bytes (4356817 5 65536). Method 3a The primary table for the major- 6 Related Approaches cases consists of an array of 65536 (ori-

entation, major-index) tuples: stored in An n-dimensional surface can be generated by (4 byte, 1 byte) portions. Therefore, the many other methods. The following three parts table can be stored in approximately 328K describe: (1) other methods comparable with the

8 6.2 Related Work For many years, computers have been used to generate pictures and manipulate higher dimen- A B C sional objects. Noll [26], as early as 1967, cre-

ated a program to plot projected images of n- dimensional objects. He used these plots to pro- Figure 6: Cube surfaces: (A) hypervolumes, (B) duce a ªstereo-graphic movie of the three dimen- hypersurfaces, (C) hyperlines sional parallel and perspective projections of four dimensional hyperobjects, rotating in four dimen- sional spaceº. hypercube approach presented herein; (2) related Polygonising methods are also used. Bajaj [2]

work; and (3) some comments on our possible fu- implicitly de®nes quadratic and cubic hypersur-

= 3 ture work. faces in n dimensional space with a con- stant or adaptive stepping procedure that creates a grid of points, forming polygons when connected. Ray tracing can also be extended to higher di- 6.1 Similar Techniques mensions: Ke and Panderanga [19] display pro- jections of a four dimensional Mandelbrot set use A hypercube can be imagined as multiple cubes: a ray tracing technique. the hypercube surface can therefore be evaluated Hanson and Cross [13] describe a hybrid with a series of three dimensional cubes (one for method of ray-tracing and scan-converting to each face of the hypercube). In four dimensions transform the four dimensional image to an equiv- a lattice of connected surfaces (rather than vol- alent three dimensional image. The problem is umes) would be created. This lattice could then be then reduced to a texture-mapping problem. displayed or triangulated before displaying, Fig- However, visualizations produce abstract im- ure 6B. ages projected from higher dimensional data. Hanson states that ªadding more visual detail In the same manner, a two dimensional `cube' may give even more cluesº [35]. The visual can be evaluated through each hypercube face to detail can be generated by: perspective projec- create a lattice of connected hyperlines, Figure

tions, n-dimensional lighting, shading, object- 6C. Wyvill et al [33] use the faces of a three di- silhouettes and colour cues within a highly ma- mensional cube (two dimensional square) to gen- nipulative environment. Therefore, greater under- erate one dimensional lines that are joined to standing could be grasped if the data was pre- make surfaces in two dimensions. sented by many abstract forms, within multiple

An n-simplex [12, 22] can be used to segment directly manipulated and coupled displays, such

the cells unambiguously. Therefore, the n-data as provided by the Waltz abstract visualization en- can be segmented directly into n-simplices. To vironment [28]. create a uniform continuous surface the adjacent Hanson and Heng [14, 13] describe methods n-simplices need to be mirror images of each to display and shade four dimensional images us- other, so an alternating patchwork of simplices ing a four dimensional light model. A thickening are used. strategy, is used, that exchanges each point on the An advancing front technique could be adapted line with a small sphere, allowing shading to be into four dimensions to create a lattice of tetra- applied to the `pseudo' line and increasing the 3D hedra [18]. Hanson and Heng [14] use a similar nature of the line [14, 13]. method: they divide the whole volume into tetra- Direct manipulation techniques can also be hedra and then project each tetrahedron into the used. Van Wijk and van Liere [32] display multi- view volume. We use a comparable method that dimensional scalar functions as two dimensional ®rst selects the hypersurface part using a thresh- slices of data. The user can control any view old and local cell technique, and then dissects the in the matrix of windows to control the slice of hypersurface into tetrahedra which are projected each of the other views. An overall impression of and rendered. the multidimensional function is obtained. Feiner

9 and Beshers [9] have designed a model of ªworlds in using the lookup table over and algorithmic within worldsº, where three dimensional graphics method is slight: our experiments suggest that are positioned within a three dimensional graph. there is no signi®cant speed difference between The internal three dimensional graph changes val- each method. Algorithmic surface evaluation ues as it is moved inside the secondary graph by methods are probably most appropriate for higher direct manipulation. dimensions. Finally, the sub-cases, albeit using a ®xed 6.3 Possible Future Work disambiguation strategy, allow the hyper-surface segments to be tetrahedronized by a simple algo- Further research should be carried out into the re- rithm.

alism of the n-dimensional images and the un- derstanding of four (or higher) dimensional im- References ages using visual cues gained from animation, n- dimensional shading and shadow effects. [1] Louis Arata. Tri-cubic interpolation. In A. W. Paeth, Direct manipulation techniques could be in- editor, Graphics Gems V, pages 107±110. Academic corporated with a dynamic version of the algo- Press, 1995. rithm, to achieve rotation through the fourth and [2] Chanderjit L. Bajaj. Rational hypersurface display. higher dimensions. Keeping a cache of the last Computer Graphics, ACM SIGGRAPH, 24(2):117± 127, March 1990. n-dimensional indices, tetrahedronized sub-cases [3] T. F. Banchoff. Beyond the third Dimension: Geome- and major case elements might be appropriate. try, computer graphics and higher dimensions. Scien- ti®c American Library, 1990. [4] Marshall Bern and David Eppstein. Mesh generation 7 Discussion and optimal triangulation. In Ding-Zhu Du and Frank Hwang, editors, Computing In Euclidean Geometry, We have explorered the possibility of extending pages 23±90. World Scienti®c, 1992. [5] Jules Bloomenthal. Polygonization of implicit sur- an isosurface technique to n-dimensions and im- faces. Computer Aided Geometric Design, 5:341±355, plemented some algorithms for four dimensions. 1988. The research has produced: (1) methods to enu- [6] Jules Bloomenthal. An implicit surface polygonizer. merate major and sub-cases; (2) a simple and In Paul S. Heckbert, editor, Graphics Gems IV, pages effective tetrahedronizing algorithm for the sub- 324±349. Academic Press, 1994. cases; and (3) a method for major cases using sub- [7] H. E. Cline, W. E. Lorensen, S. Ludke, C. R. Craw- ford, and B. C. Teeter. Two algorithms for the three- cases and a compact orientation method. dimensional reconstruction of tomograms. Medical

Local cell evaluation is ambiguous in n- Physics, 15(3):320±327, May/June 1988. dimensions: generating incorrectly placed surface [8] M. J. Duurst. Additional reference to marching cubes. simplices. The ambiguities arise in two dimen- Computer Graphics, 22(2):72±73, April 1988. sions and propagate to higher dimensions; they [9] Steven Feiner and Clifford Beshers. Visualizing n- can be disambiguated using algorithms equivalent Dimensional virtual worlds with n-vision. Computer Graphics, ACM SIGGRAPH, 24(2):37±38, March to the three dimensional strategies. 1990.

Other n-dimensional surface methods were [10] H. Fuchs, Z. M. Kedmen, and S. P. Uselton. Optimal proposed, including, generating hypersurfaces or surface reconstruction for planar contours. Communi- hyperlines from the higher dimensional data and cations of the ACM, 20(10):693±702, 1977. marching hypertetrahedra directly through the [11] S. Ganapathy and T. G. Dennehy. A new general trian- higher dimensional space. A connected surface gulation method for planar contours. Computer Graph- ics SIGGRAPH Proceedings, 16:69±75, 1982. is generated when adjacent simplices are placed [12] Andrew J. Hanson. Geometry of n-dimensional graph- in an alternating con®guration. ics. In Paul S. Heckbert, editor, Graphics Gems IV,

The table lookup is extensible to n-dimensions. pages 149±170. Academic Press, 1994. However, as the dimensions increase, so the size [13] Andrew J. Hanson and Robert A. Cross. Interactive vi- of the table increases; even with the sub-cases sualization methods for four dimensions. In Proceed- the size of the table at (say) ®ve dimensions ings Visualization '93 ± sponsored by the IEEE Com-

puter Society, pages 196±203, 1993. 32 (2 ) would become impracticable and the time [14] Andrew J. Hanson and Pheng A. Heng. Illuminating to calculate the major and sub-cases would be the fourth dimension. IEEE Computer Graphics and lengthy. Within four dimensions the advantage Applications, 12(4):54±62, July 1992.

10 [15] Steve Hill. Tri-linear interpolation. In Paul Heckbert, [32] Jarke J. van Wijk and Robert van Liere. HyperSlice ± editor, Graphics Gems IV, pages 521±525. Academic visualization of scalar functions of many variables. In Press, 1994. Proceedings Visualization '93 ± sponsored by the IEEE [16] Steve Hill and Jonathan C. Roberts. Surface models Computer Society, pages 119±125, 1993. and the resolution of N-Dimensional cell ambiguity. In [33] Geoff Wyvill, Craig McPheeters, and Brian Wyvill. A. W. Paeth, editor, Graphics Gems V, pages 98±106. Data structure for soft objects. The Visual Computer, Academic Press, 1995. 2(4):227±234, 1986. [17] Alfred Inselberg and Bernard Dimsdale. Parallel co- [34] Cornelia Zahlten. Piecewise linear approximation of ordinates: a tool for visualizing multi-dimensional ge- isovalued surfaces. In F H Post and A J S Hin, editors, ometry. In Proceedings Visualization '90 ± sponsored Advances in Scienti®c Visualization, pages 105±118. by the IEEE Computer Society, pages 361±378, 1990. Springer-Verlag, 1992. [18] H. Jin and R. I. Tanner. Generation of unstructured [35] Glenn Zorpette. Graphics Ð a romance with many tetrahedral meshes by advancing front technique. In- dimensions. IEEE Spectrum, 30(1):18 and 86, January ternational Journal for Numerical Methods in Engi- 1993. neering, 36:1805±1823, 1993. [19] Yan Ke and E. S. Panduranga. A journey into the fourth dimension. In Proceedings Visualization '90 ± spon- sored by the IEEE Computer Society, pages 219±229, 1990. [20] William E. Lorensen and Harvey E. Cline. Marching cubes: A high resolution 3D surface construction algo- rithm. ACM Computer Graphics, 21(4):163±169, July 1987. [21] David Meyers, Shelly Skinner, and Kenneth Sloan. Surfaces from contours. ACM transactions on Graph- ics, 11(3):228±258, 1992. [22] Doug Moore. Understanding simploids. In David Kirk, editor, Graphics Gems III, pages 250±255. Academic Press, 1992. [23] Doug Moore and Joe Warren. Mesh displace- ment: An improved contouring method for trivari- ate data. Technical Report 91-166, Rice University, Department of Computer Science, December 1991. ([email protected], [email protected]). [24] Gregory M. Neilson and Bernd Hamann. The asymp- totic decider: Resolving the ambiguity in the marching cubes. In Proceedings Visualization '91 ± sponsored by the IEEE Computer Society, pages 83±91, 1991. [25] Paul Ning and Jules Bloomenthal. An evaluation of implicit surface tilers. IEEE Computer Graphics and Applications, 13(6):33±41, November 1993. [26] Michael A. Noll. A computer technique for displaying n-Dimensional hyperobjects. Communications of the ACM, 10(8):469±473, August 1967. [27] Alan Norton. Generation and display of geometric fractals in 3-D. ACM Computer Graphics, 16(2):163± 169, July 1982. [28] Jonathan C. Roberts. Aspects of Abstraction in Scien- ti®c Visualization. Ph.D thesis, Kent University, Com- puting Laboratory, Canterbury, Kent, England, UK, CT2 7NF, October 1995. [29] Will Schroeder, Ken Martin, and Bill Lorensen. The Visualization Toolkit: An Object-Oriented Approach to 3-D Graphics. Prentice-Hall, 1996. [30] William J. Schroeder, Jonathan A. Zarge, and William E. Lorensen. Decimation of triangle meshes. Computer Graphics SIGGRAPH Proceedings, 26(2):65±70, July 1992. [31] Duncan M'Laren Young Sommerville. An introduction to the geometry of n dimensions. New York, Dover Publications, 1879.

11