3D Distance Fields: A Survey of Techniques and Applicationsfrey/cours... · A distance field...

23
3D Distance Fields: A Survey of Techniques and Applications Mark W. Jones Swansea University UK Email: [email protected] J. Andreas Bærentzen Technical University of Denmark Copenhagen, Denmark Email: [email protected] Miloˇ s ˇ Sr´ amek Austrian Academy of Sciences Vienna, Austria Email: [email protected] January 27, 2006 Abstract A distance field is a representation where at each point within the field we know the distance from that point to the closest point on any object within the domain. In addition to distance, other properties may be derived from the distance field, such as the direction to the surface, and when the dis- tance field is signed, we may also determine if the point is in- ternal or external to objects within the domain. The distance field has been found to be a useful construction within the areas of Computer Vision, Physics and Computer Graphics. This paper serves as an exposition of methods for the pro- duction of distance fields, and a review of alternative repre- sentations and applications of distance fields. In the course of this paper we present various methods from all three of the above areas, and we answer pertinent questions such as How accurate are these methods compared to each other?, How simple are they to implement? and What is the complexity and run-time of such methods? keywords distance field, volume, voxel, fast marching method, level-set method, medial axis, cut locus, skele- tonization, voxelization, volume data, visualization, dis- tance transform. 1 Introduction Perhaps the earliest appearance of distance fields in the lit- erature is the 1966 image processing paper by Rosenfeld and Pfaltz [RP66] where they present the application of a cham- fer distance transform to an image, and also create a skele- ton which is a minimal representation of the original struc- ture. Since then, many authors have improved the accu- racy of chamfer distance transforms, and have introduced alternative algorithms such as vector distance transforms, fast marching methods and level sets. Most of the earlier work concentrated on two dimensional image processing, but as three dimensional data sets grew in importance, lat- terly much research has been targeted at processing this and higher dimensional data. The literature seems broadly split between the Computer Vision community (for im- age processing), Physics community (for wavefront, Eikonal equation solving schemes) and Computer Graphics commu- nity (for object representation and processing). This paper will draw together the literature from these communities and will, for the first time, independently and thoroughly compare the various main algorithms and approaches. For the purposes of this paper, we are most interested in the application of algorithms using distance fields for the modelling, manipulation and visualisation of objects for Computer Graphics, and so we shall emphasise methods that enable such processes. Recently, it seems that there is general widespread agreement that distance fields provide the most suitable anti-aliased representation of geometric objects for the purposes of Volume Graphics. The term Volume Graphics was first introduced by Kaufman, Cohen and Yagel in 1993 [KCY93], where they presented the advantages of us- ing volumetric models. Although they were working with binary representations which suffered from aliasing, many of the methods they proposed and discussed have adapted well to distance fields. Volume Graphics is now a subject area in its own right, demonstrated by a biannual “Vol- ume Graphics” conference series which started at Swansea in 1999 [CKY00]. However, distance fields have recently found many applications unrelated to traditional volume graphics. For instance, they can be used for collision detection, correct- ing the topology of meshes or to test whether a simplified mesh is within a given distance threshold of the original. A distance field representation of an object can be par- ticularly useful in situations where algorithms provide for the fast processing of three dimensional objects, and so this paper shall concentrate on the methods by which distance fields are produced, and the applications that can use these distance fields to accelerate modelling, manipulation and rendering techniques. Apart from a survey of the literature in those areas, the main contributions of this paper are a summary of some of the very latest results in the production and use of distance fields, a new simplified version of the Fast Marching Method (FMM) and the first thorough com- parison of FMM and its variants, Chamfer Distance Trans- forms (CDTs) and Vector Distance Transforms (VDTs) on both error and speed. The remainder of this paper is organised as follows. In Section 2, we present some properties of the continuous dis- tance field. Section 3 acquaints the reader with the main ap- proaches to calculating discrete distance fields. Aspects such as computing the distance field directly from the data, and computing the sign for a signed distance field are accounted in Section 3.1. Using a shell boundary condition as a basis it is possible to create distance fields using the vector and chamfer transform methods and the fast marching methods of Section 3.2. Section 3.6 provides the first in-depth com- parison of all three approaches — vector, chamfer and fast marching methods on a variety of data sets. A thorough analysis of both time and error is given. Section 4 examines alternative representation schemes for distance fields includ- 1

Transcript of 3D Distance Fields: A Survey of Techniques and Applicationsfrey/cours... · A distance field...

Page 1: 3D Distance Fields: A Survey of Techniques and Applicationsfrey/cours... · A distance field representation of an object can be par-ticularly useful in situations where algorithms

3D Distance Fields: A Survey of Techniques and Applications

Mark W. JonesSwansea University

UKEmail: [email protected]

J. Andreas BærentzenTechnical University of Denmark

Copenhagen, DenmarkEmail: [email protected]

Milos SramekAustrian Academy of Sciences

Vienna, AustriaEmail: [email protected]

January 27, 2006

Abstract

A distance field is a representation where at each pointwithin the field we know the distance from that point to theclosest point on any object within the domain. In addition todistance, other properties may be derived from the distancefield, such as the direction to the surface, and when the dis-tance field is signed, we may also determine if the point is in-ternal or external to objects within the domain. The distancefield has been found to be a useful construction within theareas of Computer Vision, Physics and Computer Graphics.This paper serves as an exposition of methods for the pro-duction of distance fields, and a review of alternative repre-sentations and applications of distance fields. In the courseof this paper we present various methods from all three ofthe above areas, and we answer pertinent questions such asHow accurate are these methods compared to each other?, Howsimple are they to implement? and What is the complexity andrun-time of such methods?

keywords distance field, volume, voxel, fast marchingmethod, level-set method, medial axis, cut locus, skele-tonization, voxelization, volume data, visualization, dis-tance transform.

1 Introduction

Perhaps the earliest appearance of distance fields in the lit-erature is the 1966 image processing paper by Rosenfeld andPfaltz [RP66] where they present the application of a cham-fer distance transform to an image, and also create a skele-ton which is a minimal representation of the original struc-ture. Since then, many authors have improved the accu-racy of chamfer distance transforms, and have introducedalternative algorithms such as vector distance transforms,fast marching methods and level sets. Most of the earlierwork concentrated on two dimensional image processing,but as three dimensional data sets grew in importance, lat-terly much research has been targeted at processing thisand higher dimensional data. The literature seems broadlysplit between the Computer Vision community (for im-age processing), Physics community (for wavefront, Eikonalequation solving schemes) and Computer Graphics commu-nity (for object representation and processing). This paperwill draw together the literature from these communitiesand will, for the first time, independently and thoroughlycompare the various main algorithms and approaches.

For the purposes of this paper, we are most interested

in the application of algorithms using distance fields forthe modelling, manipulation and visualisation of objects forComputer Graphics, and so we shall emphasise methodsthat enable such processes. Recently, it seems that there isgeneral widespread agreement that distance fields providethe most suitable anti-aliased representation of geometricobjects for the purposes of Volume Graphics. The term VolumeGraphics was first introduced by Kaufman, Cohen and Yagelin 1993 [KCY93], where they presented the advantages of us-ing volumetric models. Although they were working withbinary representations which suffered from aliasing, manyof the methods they proposed and discussed have adaptedwell to distance fields. Volume Graphics is now a subjectarea in its own right, demonstrated by a biannual “Vol-ume Graphics” conference series which started at Swansea in1999 [CKY00]. However, distance fields have recently foundmany applications unrelated to traditional volume graphics.For instance, they can be used for collision detection, correct-ing the topology of meshes or to test whether a simplifiedmesh is within a given distance threshold of the original.

A distance field representation of an object can be par-ticularly useful in situations where algorithms provide forthe fast processing of three dimensional objects, and so thispaper shall concentrate on the methods by which distancefields are produced, and the applications that can use thesedistance fields to accelerate modelling, manipulation andrendering techniques. Apart from a survey of the literaturein those areas, the main contributions of this paper are asummary of some of the very latest results in the productionand use of distance fields, a new simplified version of theFast Marching Method (FMM) and the first thorough com-parison of FMM and its variants, Chamfer Distance Trans-forms (CDTs) and Vector Distance Transforms (VDTs) onboth error and speed.

The remainder of this paper is organised as follows. InSection 2, we present some properties of the continuous dis-tance field. Section 3 acquaints the reader with the main ap-proaches to calculating discrete distance fields. Aspects suchas computing the distance field directly from the data, andcomputing the sign for a signed distance field are accountedin Section 3.1. Using a shell boundary condition as a basisit is possible to create distance fields using the vector andchamfer transform methods and the fast marching methodsof Section 3.2. Section 3.6 provides the first in-depth com-parison of all three approaches — vector, chamfer and fastmarching methods on a variety of data sets. A thoroughanalysis of both time and error is given. Section 4 examinesalternative representation schemes for distance fields includ-

1

Page 2: 3D Distance Fields: A Survey of Techniques and Applicationsfrey/cours... · A distance field representation of an object can be par-ticularly useful in situations where algorithms

ing Adaptive Distance Fields (ADFs), lossless compressionschemes, wavelets, and the Complete Distance Field Repre-sentation (CDFR). The main application areas using distancefields are briefly examined in Section 5. Finally, we concludethis paper with a discussion in Section 6.

2 Continuous Distance Fields

2.1 The Continuous Signed Distance Function

Assuming that we have a set Σ, we first define the unsigneddistance function as the function that yields the distance froma point p to the closest point in Σ:

distΣ(p) = infx∈Σ

‖x − p‖ . (1)

Frequently, we are mainly interested in the signed distancefunction associated with a solid S. The signed distance func-tion returns the distance to the boundary, ∂S, and the signis used to denote whether we are inside or outside S. Here,we use the convention that the sign is negative inside. Thisleads to the following formula for the signed distance func-tion corresponding to a solid S

dS(p) = sgn(p) infx∈∂S

‖x− p‖ (2)

where

sgn(p) ={ −1 if p ∈ S

1 otherwise .

When no ambiguity is possible, we drop the subscript S fromdS .

2.2 Derivatives of the Distance Function

An important property of the signed distance function d isthat

‖∇d‖ = 1 (3)

almost everywhere, the exception being points without aunique closest point (e.g. the centre of a sphere, see also Sec-tion 2.3). In this case, the gradient is not defined. Otherwise,the gradient at a given point p is orthogonal to the isosurfacepassing through p. An isosurface is a set {p|d(p) = τ} whereτ is the isovalue.

The second order derivatives contain information aboutthe curvature of isosurfaces of the distance function [Har99].For general functions, f : R

3 → R, we can also obtain curva-ture information from the second order derivatives, but theequations become particularly simple for distance functions.

The Hessian, H , of d is the matrix of second order partialderivatives

H =

dxx dxy dxz

dyx dyy dyz

dzx dzy dzz

. (4)

The mean curvature of the isosurface passing through agiven point is simply the trace of H at that point dividedby two:

κM =12

(dxx + dyy + dzz). (5)

The Gaussian curvature is

κG =∣∣∣∣ dxx dxy

dyx dyy

∣∣∣∣ +∣∣∣∣ dxx dxz

dzx dzz

∣∣∣∣ +∣∣∣∣ dyy dyz

dzy dzz

∣∣∣∣ (6)

and the principal curvatures are the two non-zero eigenval-ues of H . The last eigenvalue is 0 reflecting the fact that dchanges linearly in the gradient direction. Monga et al. givea good explanation of how the Hessian is related to curva-ture [MBF92].

2.3 Continuity and Differentiability

It follows from the triangle inequality that the signed and un-signed distance functions of a given surface are continuouseverywhere. However, neither is everywhere differentiable.This raises the question of where the signed distance func-tion is differentiable which is a question a number of authorshave considered.

In [KP81] it is demonstrated that for a Ck surface (k ≥ 1),the signed distance function is also Ck in some neighbour-hood of the surface. In his technical report Wolter [Wol93]presents various theorems regarding the cut locus. The cutlocus of a surface is the set of points equally distant from atleast two points on the surface. Hence, the cut locus is thesame as the union of the interior and exterior medial sur-faces. Theorem 2 in [Wol93] pertains directly to the differen-tiability of the distance function. Specifically, it is shown thatthe unsigned distance function is differentiable, and its gradi-ent Lipschitz continuous at points which neither belong tothe surface nor to its cut locus. However, the signed distanceis differentiable also on the surface (except at points wherethe cut locus touches the surface), and the critical points1 ofthe signed distance coincide with the cut locus.

In the remainder of this paper, we are mostly concernedwith discrete distance fields. Such distance fields may beobtained by sampling a continuous distance function, andin that case it may be important to know whether two gridpoints straddle the cut locus. If they do, it means that theirdistance values correspond to surface points that may bevery far apart. This can lead to poor reconstruction of thecontinuous field, its gradient and other characteristics, sincethey are typically estimated using finite reconstruction ker-nels which use a stencil of grid points. In [Bær01a] it isshown that if we can touch all points (inside and out) of thesurface, ∂S, by rolling a ball with a given radius Rs on theinside and the outside of the surface, then the cut locus, andhence the critical points, does not come closer to the surfacethan Rs.

This property becomes important in modelling and visual-ization of objects represented by discrete DFs. In this case, itis necessary to reconstruct the continuous field, and, if shad-ing is required, also its gradient in the vicinity of the objectsurface. It is, therefore, required that the aforementioned dis-tance Rs between the cut locus and the surface be larger thanthe characteristic radius of the reconstruction filter. Theseconditions will be further on referred to as the DF repre-sentability criterion and an object which fulfils it a DF repre-sentable solid. Note that the actual size of Rs depends on thegrid resolution and for common reconstruction kernels it hasvalues between 1 and 3 voxel units [SK99].

1i.e. where the distance function is not differentiable

2

Page 3: 3D Distance Fields: A Survey of Techniques and Applicationsfrey/cours... · A distance field representation of an object can be par-ticularly useful in situations where algorithms

3 Computing Distance Fields

A brute-force algorithm for computation of a shortest dis-tance to a set of objects over a 3D discrete grid V is verysimple: for each voxel of V its distance to all objects is com-puted and the smallest one is stored. In spite of its simplic-ity, this approach is impractical since it leads to prohibitivelylong computational times. Therefore, techniques were devel-oped which (i) keeping the basic scheme discard most of theobjects by exploitation of their spatial coherency (comput-ing distances from primitives, Section 3.1) and (ii) methods,which in an initialization step evaluate the distances in cer-tain regions in a trivial way (inside the objects or in a thinlayer around the surface) and subsequently propagate themthrough the whole volume (distance transforms, Section 3.2).Since some of these accelerated techniques are only approxi-mate, the role of the computationally demanding but precisebrute-force techniques is still unavoidable in algorithm eval-uation.

3.1 Distance Computation for Common SurfaceRepresentations

3.1.1 Triangle Meshes

The triangle mesh representation is probably the most fre-quently used representation for 3D geometry. Therefore, itis particularly important that we are able to convert trian-gle meshes to signed distance fields. We can only gener-ate distance fields from a certain class of triangle meshes,namely meshes that are closed, orientable 2-manifolds. Inpractice, we can impose the manifold condition by requiringthat [Hof89]

• The mesh does not contain any self intersections: Tri-angles may share only edges and vertices and must beotherwise disjoint.

• Every edge must be adjacent to exactly two triangles.

• Triangles incident on a vertex must form a single cyclearound that vertex.

If the mesh fulfils these conditions, we know that it partitionsspace into a well-defined interior, exterior, and the mesh it-self.

We will discuss first the basic methods for computing un-signed distance fields and then discuss techniques for gener-ating the sign.

The distance to a triangle is easily computed using a sim-ple case analysis. When a point p is projected onto the planecontaining the triangle, the projected point p′ lies in one ofthe 7 regions shown in Figure 1. If p′ is projected onto R1then the distance from the point to the triangle is equal tothe distance from the point to the plane containing the trian-gle. If p′ lies in R2, R3 or R4 a distance to the correspondingline should be calculated. Lastly, with regions R5, R6 or R7a distance to the corresponding vertex should be calculated.

3.1.2 Hierarchical Organisation

Since the brute force method requires N ·M steps, where N isthe number of voxels, and M is the number of triangles, it issensible to use hierarchical data structures to allow O(log M)access to the triangles.

R1 R7R2

R3

R4

R5

R6

Figure 1: Calculating distance to a triangle: If p projects ontoR1 it is closest to the plane, R2 − R4 edge, R5 − R7 vertex.

Payne and Toga have described the basic approach of cal-culating distance to triangles [PT92]. They also proposedsome optimizations. For instance, one can compute squareddistances and then take the square root only when the short-est distance is found. Further, in a more comprehensive algo-rithm, they utilize the data coherency by storing the trianglesin a tree of bounding boxes. From a given point, we can com-pute the smallest and greatest possible distance to anythinginside the box. This can be used to prune branches as wemove down the tree.

Quadtrees were used by Strain [Str99] to speed up com-putation of distance to an interface in 2D (redistancing,see 5.4.2) thus creating an O(N log N) algorithm (where Nis the size of the interface).

Another hierarchical approach is the recent Meshsweeperalgorithm proposed by Gueziec [Gue01]. The Meshsweeperalgorithm is based on a hierarchical representation of themesh. At each level, a bounding volume is associated withevery triangle. The bounding volume of a given triangle en-closes all child-triangles at more detailed levels. A distanceinterval is computed for each bounding volume. This dis-tance interval gives the shortest and greatest possible dis-tance to any triangle inside the bounding volume. The lowerbound is finally used as an index to a priority queue. Asalient point is that we can remove a bounding box from thequeue if its lower bound is greater than the greater boundof some other bounding box thus removing a branch of thehierarchy from consideration. Gueziec compares his methodto an octree based method and to a brute force approach.

3.1.3 Characteristic Methods

Hierarchies are not always needed. If the actual value is onlyrequired up to a certain distance from the surface, then theinfluence of a triangle becomes local. If only distances upto, say, five units are required, we can use a bounding vol-ume around each triangle to ensure that distances are onlycomputed for grid points that are potentially closer than fiveunits. The smaller this max distance, the smaller the need fora hierarchical structure.

For each triangle, we simply compute the distance to thattriangle for all grid points inside the corresponding bound-ing volume. In [DK00], Dachille et al. propose such a methodwhere the volume is a simple axis aligned bounding box.Their contribution is to perform the case analysis (Fig. 1)using only distance to plane computations. The advantage

3

Page 4: 3D Distance Fields: A Survey of Techniques and Applicationsfrey/cours... · A distance field representation of an object can be par-ticularly useful in situations where algorithms

is that only one addition is needed for each voxel to com-pute its distance to a given plane—using an incrementalapproach—making the technique suitable for hardware ac-celeration.

Many other methods that generate distance fields withdistances only up to some maximum value are based on thenotion of a characteristic which was introduced by Mauch[Mau00, Mau03]. Each feature in the triangle mesh is con-verted to a polyhedron—the characteristic—which containsthe points closest to that feature. For instance, an edge be-comes a wedge, a face becomes a prism and a vertex be-comes a cone with polygonal base. These characteristics con-tain all points that are closest to their respective feature andwithin a certain distance of the mesh. Thus, the characteris-tics can be seen as truncated Voronoi regions. However, ingeneral, they are made to overlap slightly to avoid missinggrid points. The characteristics are then scan converted andfor each voxel within the characteristic, the distance to thegenerating feature is computed.

A recent improvement of this method was proposed bySigg et al [SPG03]. They use graphics hardware to scan con-vert the characteristics. First the characteristic is sliced, andthen the slices are sent to graphics hardware and rasterizedin the usual way. The distances are computed in a fragmentprogram [SA04]. However, slicing is done on the CPU andthis may be a bottleneck. To alleviate this problem, only asingle characteristic is computed for each triangle. This re-duces both the amount of work to be performed by the CPUand the amount of bandwidth required in order to send theslices to the graphics card. The per-triangle characteristicsare denoted prisms. Details on prism computation are pro-vided in [PS03].

Another work that involves hardware acceleration is dueto Sud et al. [SOM04] who also use observations regardingspatial coherence to limit the number of primitives consid-ered for each slice. Sud et al. claim to be two orders of mag-nitude faster than a plain software implementation of char-acteristics scan conversion.

One may construe the characteristics as very tight bound-ing boxes around the triangles, and herein lies their advan-tage. The methods are linear in both the number of trian-gles and voxels [Mau00]. On the other hand the character-istics must be created and scan converted. It is simpler tobound each triangle by a box aligned with the voxel grid.This can be made more effective by culling voxels that arefarther from the plane of the triangle than a given distance.

3.1.4 Computing The Sign

The most obvious method for computing the sign when gen-erating a signed distance field is to use the surface normals.If we have a C1 smooth surface, the sign of the distance canbe found by evaluating the dot product of the normal, n anda direction vector, d from the closest point to the point pwhere the sign is desired. d will always point either in thesame direction as n (if we are outside) or the opposite (if weare inside).

The problem with triangle meshes is that they are not C1:The normal is not defined on edges and vertices. As a simplesolution, one could use the normal of the incident triangleeven when the closest feature is an edge or a vertex. Un-fortunately, this does not work, because in many cases we

d

n1

n1

p

Figure 2: The mesh feature closest to p is a vertex, but thedot products d · n1 and d · n2 do not have the same sign.

N

n1

n2

n3

α1

α2

α3

Figure 3: The angle weighted normal N =�

i niαi

‖�i niαi‖

have the same distance to two or more triangles but differ-ent sign [PT92]. In particular, this occurs if the closest featureis a vertex, and the corresponding situation in 2D is shownin Figure 2.

Most authors propose to use scan conversion to generatethe sign [Jon96, PT92, Str99, Mau00]. Typically, this is donein the following way: For each z-level plane in the grid, wecompute the intersection of the mesh and the plane. Thisproduces a 2D contour that we can scan convert [PT92]. Aneven simpler approach would be to cast rays along rows ofvoxels. At voxel locations where the ray has crossed themesh an uneven number of times, we know we are inside.

The characteristics methods [Mau00, SPG03, PS03] are abit different. A voxel belongs to precisely one characteristicassociated with the closest edge, vertex, or face. This meansthat the sign problems do not occur in principle, since wecan compute the sign for that characteristic. However, it isnecessary to dilate the characteristics slightly to ensure thatvoxels do not “fall between” characteristics. Unfortunately,this overlap means that there are cases where characteristicsof opposite sign overlap in areas where the numerical dis-tance is the same, and this can lead to erroneously classifiedvoxels [ED]. Of course, this problem will be far worse if onesimply uses a bounding box around each triangle.

A plausible approach would be to approximate a nor-mal at each vertex and edge, but it is far from obvioushow to do this. A recent method by Aanæs and Bærentzen[AB03, BA05] solves this problem using pseudo normals as-signed to edges and vertices. The challenge is to define apseudo normal which is guaranteed to have a positive dotproduct with the direction vector whenever the point is out-side and negative whenever the point is inside. Aanæs and

4

Page 5: 3D Distance Fields: A Survey of Techniques and Applicationsfrey/cours... · A distance field representation of an object can be par-ticularly useful in situations where algorithms

Bærentzen use the angle weighted normal [TW98] as theirchoice of pseudo normal. To compute the angle weightednormal at a vertex, one sums the normals of the incidentfaces, weighting each normal with the angle between the twolegs that are incident to the vertex. This is illustrated in Fig-ure 3.

As shown in [AB03, BA05], the dot product of a directionvector d from a mesh point c to a point p and the angleweighted normal N at c is always positive if p is outsideand negative otherwise. This leads to a method for com-puting signed distance fields that is simply an extension ofthe method for unsigned distance fields [AB03]. Details on apractical and efficient method for signed distance computa-tion and a discussion of numerical robustness are providedin [BA05].

Another advantage of angle weighted normals is that theyare independent of tessellation [TW98]. In other words, aslong as the geometry is unchanged, we can change the tri-angulation of the mesh without affecting the vertex normals.The notion of angle weighted normals is easily extended toedges—the normals of the two faces adjacent to the edge aresimply both weighted by π.

3.1.5 Triangle Soups

Unfortunately, triangle meshes do not always form closedtwo-manifold surfaces, and then the methods above do notwork, since only closed two-manifold surfaces divide spaceinto a well defined interior, exterior, and boundary. How-ever, in many cases we have just a slight self-intersection, ora small hole in the surface. In these cases, we might still wantto compute an estimated distance field.

It has been shown that a binary volume can be generatedfrom a triangle mesh by projecting the mesh from many di-rections [NT03]. From each direction, one generates whatcan be seen as a run-length coded binary volume represent-ing the original triangle mesh. If the mesh contains holesor other degeneracies these will be reflected by holes in thescan conversion. However, a plausible volume can be re-constructed by voting amongst the scan conversions for eachvoxel.

The scan conversions can also be used to generate a cloudof points with normal information. From this point cloud wecan estimate distances as discussed in [Bær05]. The pointswill be missing in areas where the original mesh containsholes, but using a diffusion scheme it is possible to fill in themissing distance values.

3.1.6 Implicit and Parametric Surfaces

The simplest objects to voxelize are implicit surfaces. An im-plicit surface is really just a function f : R

3 → R which servesas the embedding of a surface B which is a level-set or iso-surface of f , i.e.

B = {p| f(p) = τ} (7)

where τ is the iso-value. In practice f should be constrainedso that the value of f is always f > τ on the inside and f <τ on the outside or vice versa. Often, we require that ∇f �= 0for any point p ∈ B since this means that τ is a regular valueand hence that B is a manifold [VGF02]. For an in-depthdiscussion of implicit surfaces, see [VGF02, Blo97].

The analytic definitions of a 3D sphere f(p) = ||p−p0|| orhyperplane f(p) = (p−p0) ·n are good examples of implicitsurfaces, and these two are particular because the value of fis also the signed distance to the sphere or hyperplane, re-spectively. Hence, we can voxelize a sphere or hyperplanesimply by sampling f . In general, more work is required.If we can accept some error, it is frequently possible to vox-elize the implicit surface by sampling an approximation ofthe signed distance, typically (f − τ)/||∇f ||. This method isused in the VXT class library of DF-based voxelization tech-niques by Sramek [SK00b]. A more precise but also morecostly method is to find the foot point numerically: Given apoint p find the closest point pfoot so that f(pfoot) = τ . Thedistance is then ||p−pfoot|| and the sign is trivially computed.Hartmann has designed such a foot point algorithm [Har99]which accepts a point p in the vicinity of an implicitly de-fined surface and produces a foot point. The basic idea is tomove in the gradient direction until a point p0 on the sur-face is found. The estimate is then iteratively refined untilthe surface normal points to p.

Certain implicit solids can contain sharp surface details,where the aforementioned methods, which assume sufficientsmoothness of the implicit function, fail to produce mean-ingful distance values. To cope with this, a technique wasproposed by Novotny et al. [Nv05], where such areas areidentified and the solid is locally modified in order to com-ply with the DF representability criterion (Section 2).

There are several possibilities for computing distances toparametric surfaces. In a few cases (sphere, double cone)closed form solutions are available. In some other ones(superellipsoids [Bar81], supershapes [Gie03]), it is possi-ble to convert their parametric representation to an implicitone [LG95] and to use the techniques mentioned above.However, in general, it is necessary to minimize for each gridpoint p the expression

d(u, v) = ||S(u, v) − p||, (8)

where S(u, v) is the surface’s parametric representation. Forexample, gradient descent minimization was used by Breenet al. [BMW98]. In general, minimization of (8) may lead tonumerical problems and trapping in local minima.

3.2 Distance Transforms

The principle behind the use of the distance transform (DT)is that a boundary condition close to the surface boundarycan be generated (using any of the direct methods of Section3.1) from which the remaining distances may be evaluated.The boundary condition is discussed in Section 3.2.1.

In a second phase, distances are propagated to the rest ofthe volume using a DT. As distances away from the bound-ary condition are not calculated using the exact methods ofSection 3.1, some errors may be introduced. This section willexamine the errors produced by many of the popular dis-tance transform techniques. DT algorithms can be classifiedaccording to how we estimate the distance value of a givenvoxel from the known quantities of its neighbors and howwe propagate the distances through the volume. The first clas-sification criterion leads us to

• chamfer DTs, where the new distance of a voxel is com-puted from the distances of its neighbors by adding val-ues from a distance template (Figure 4),

5

Page 6: 3D Distance Fields: A Survey of Techniques and Applicationsfrey/cours... · A distance field representation of an object can be par-ticularly useful in situations where algorithms

• vector DTs where each processed voxel stores a vec-tor to its nearest surface point and the vector at anunprocessed voxel is computed from the vectors at itsneighbors by means of a vector template (Figure 6), and

• Eikonal solvers where the distance of a voxel is com-puted by a first or second order estimator from the dis-tances of its neighbors.

According to the second criterion, the distances can be prop-agated through the volume in a

• sweeping scheme, when the propagation starts in onecorner of the volume and proceeds in a voxel-by-voxel,row-by-row fashion to the opposite corner, typically re-quiring several passes in different directions, or in a

• wavefront scheme, when the distances are propagatingfrom the initial surface in the order of increasing dis-tances until all voxels are processed.

If required, it is possible to stop the computations in a wave-front scheme as soon as the desired distance iso-level isreached. One can take advantage of this property in numer-ous applications, as, for example, in morphological opera-tions, surface offsetting and level-set methods.

3.2.1 Initialization

Most distance transformations are reported as operating ondiscrete binary classified data F which has been obtained byscan-conversion of analytically defined solids or by segment-ing volumetric data (e.g., by thresholding) to extract the fea-ture points of a surface:

F (p) ={

0 p is exterior∞ p is interior , (9)

where voxel p ∈ I3 and F : I

3 → R. This classification whenoperated on by a distance transformation will produce a dis-tance field internal (or external, when reversed) to the object.To produce an unsigned distance field of the type in (1) thefollowing classification could be used:

F (p) ={

0 p is on the discrete surface∞ elsewhere . (10)

Here, the numerous voxelization techniques can be used toidentify the 0-value voxels [Kau87].

It is recommended that for higher accuracy, a so calledgrey-level classification should be used in a shell around thesurface [Jon96]:

F (p) ={

dS(p) in the shell∞ elsewhere (11)

The boundary condition is said to be minimal if it only con-sists of inside voxels that are 26-connected to voxels out-side (and vice versa) and all voxels that are on the surface.This requires that grey-level voxels known to be close tothe surface be calculated using a short cut. Surface meshdata could be scan converted to the voxel grid using manyof the triangle based techniques mentioned in Section 3.1.1,whereas parametric surfaces and curves can be voxelizedby splatting [SK99]. In the case of implicit solids or scalarfields, when the surface is defined by the iso-value τ , the

distance should be explicitly computed for all voxels whichhave a 6-neighbor on the other side of the iso-value using theaforementioned linear approximation (f − τ)/||∇f ||. In vec-tor DTs, techniques for estimation of the nearest iso-surfacepoint listed in Section 3.1.6 can be used.

After classification the distance transformation is applied.A simpler chamfer distance transformation gives poorer re-sults than the vector distance transformation.

Forward pass

f ff e d e f

d df e d e f

f fz=-2

f e d e fe c b c ed b a b de c b c ef e d e f

z=-1

d dd b a b d

a 0

z=0

Backward pass

0 ad b a b d

d dz=0

f e d e fe c b c ed b a b de c b c ef e d e f

z=1

f ff e d e f

d df e d e f

f fz=2

Figure 4: A distance template. In the forward pass, distances(a–f) are added to voxels in the current, z-1 and z-2 slices.In the backward pass, distances are added to voxels in thecurrent, z+1 and z+2 slices.

3.2.2 Chamfer Distance Transform

In chamfer distance transforms (CDTs) [RP66, Rho92,ZKV92, Bor96, ABM98], the distance template (Figure 4) iscentred over each voxel, and the distance at the central voxelis computed as the minimum of all of its neighbours’ dis-tances with the appropriate component added. Both sweep-ing (two pass) and wavefront schemes were formulated.

In a sweeping scheme the distance template is split in twoparts: one is used in a forward pass and the other in a back-ward pass. The forward pass calculates the distances mov-ing from the surface towards the bottom of the dataset, andis followed by the backward pass calculating the remainingdistances. Figure 4 is used as the basis with Table 1 givingthe appropriate template values for each chamfer method.Note that some values are empty in order to ensure that cal-culations that yield the identical result are not repeated (ifthey are filled we have a 53 Complete Euclidean DT). Thedistance transformation is applied using the pseudo-code in

6

Page 7: 3D Distance Fields: A Survey of Techniques and Applicationsfrey/cours... · A distance field representation of an object can be par-ticularly useful in situations where algorithms

Transform a b c d e fCity Block (Manhattan) 1

Chessboard 1 1Quasi-Euclidean 3 × 3 × 3 1

√2

Complete Euclidean 3 × 3 × 3 1√

2√

3< a, b, c >opt 3 × 3 × 3[SB02] 0.92644 1.34065 1.65849

Quasi-Euclidean 5 × 5 × 5 1√

2√

3√

5√

6 3

Table 1: Values used to produce each chamfer type.

Figure 5 where i, j, k ∈ {−2,−1, 0, 1, 2} for a 5 × 5 × 5 trans-form, fp and bp are the sets of transform positions used inthe forward and backward passes respectively and checksare made to ensure fp and bp only contain valid voxels at theedges of the data set. Svensson and Borgefors [SB02] presentan analysis of chamfer distance transforms and give numer-ous examples of distance templates. Cuisenaire [Cui99] alsogives a good review of distance transforms (both Chamferand Vector).

In wavefront techniques voxels are processed in the orderof their increasing distance [ZKV92, CM00]. To ensure thecorrect order, the processed voxels are inserted into a prior-ity queue. In a loop, the voxel from the top of the queue is re-moved, and distances of its not yet processed voxels are com-puted according to the distance template and subsequentlyinserted into the queue. The process continues as long asthere are any voxels in the queue.

Asymptotic complexity of the wavefront approaches(O(N log N), N being total number of processed voxels)is worse than of the sweeping approaches (O(N)) due tothe priority queue management. However, in special se-tups, the wavefront approaches were reported to be “con-siderably faster” [ZKV92]. Here, in an algorithm adoptedfrom [VVD89], Zuiderveld et al. take advantage of an obser-vation that the direction of the shortest distance propagationis kept. In other words, knowing a position of the voxel thedistance of which was used to compute the distance of thecurrent voxel, it can be predicted, which of its neighboursshould be processed. The speed up is thus obtained, in re-gard to the sweeping schemes, by eliminating computationsof distances, which would later be overwritten by lower val-ues.

/* Forward Pass */

FOR(z = 0; z < fz; z++)

FOR(y = 0; y < fy; y++)

FOR(x = 0; x < fx; x++)

F[x,y,z] =

inf∀i,j,k∈fp(F[x+i,y+j,z+k]+m[i,j,k])

/* Backward Pass */

FOR(z = fz-1; z ≥ 0; z--)

FOR(y = fy-1; y ≥ 0; y--)

FOR(x = fx-1; x ≥ 0; x--)

F[x,y,z] =

inf∀i,j,k∈bp(F[x+i,y+j,z+k]+m[i,j,k])

Figure 5: Pseudo code for chamfer distance transform appli-cation.

3.2.3 Vector Distance Transform

CDTs suffer from poor accuracy as the distance from thesurface increases (Section 3.6). This problem is overcomeby using Vector (or Euclidean) Distance Transforms (VDTsor EDTs) [Dan80, Mul92, SJ01b] which use a boundary con-dition of voxels containing a vector to the closest pointon the surface, and propagating those vectors according toa pattern (vector template) such as the one given in Fig-ure 6 (the Vector-City Vector Distance Transform, VCVDT,[SJ01b]). Figure 7 shows the pseudo-code for one pass ofa vector distance transform (F1 of the VCVDT), where vecis a voxel grid containing actual or estimated vectors to thesurface ∂S and dir = {(0,0,−1), (0,−1,0), (−1,0,0)}. PassF2 would be a loop with increasing y and decreasing x withdir = {(1,0,0), (0,−1,0)}. All forward passes are carriedout within one single outer loop with increasing z. Backwardpasses are implemented similarly.

The VCVDT technique requires 8 passes through the vol-ume, and in each pass just 6-neighbors of the actual voxelare visited. Of course, different schemes are also possi-ble. Ragnemalm [Rag93] classifies them in separable and non-separable. In the former, the passes are mutually indepen-dent and can be applied in any order. Thus, they are suitablefor parallel implementation, while the latter are more appro-priate for sequential implementations. Further, in [Rag93]a separable 4 pass algorithm with 26-neighbourhood vectortemplate is proposed.

Breen et al. [BMW98, BMW00] implement a wavefrontversion of a VDT technique by passing closest point infor-mation (trivially equivalent to passing vector information)between voxels at a moving wavefront from CSG objects.Breen et al. [BMW00] also demonstrate the passing of colorinformation to create colored offset surfaces.

3.3 The Fast Marching Method

The fast marching method (FMM) [Tsi95, Set99a, Set99b,HPCD96] is a technique for computing the arrival time ofa front (which we can think of as e.g. a balloon) expandingin the normal direction at a set of grid points. This is doneby solving the Eikonal equation from a given boundary con-dition. The Eikonal equation is

‖∇T ‖ =1F

, (12)

where F ≥ 0 is the speed of the front, and T is the arrivaltime of the front. Given a point p, the arrival time T (p) is thetime at which the skin of the balloon passed p. The Eikonalequation states the obvious inverse relationship between thespeed of the front and the gradient of the arrival time. Since

7

Page 8: 3D Distance Fields: A Survey of Techniques and Applicationsfrey/cours... · A distance field representation of an object can be par-ticularly useful in situations where algorithms

(−1,0,0)

y

x

z

z

B4

y

x

z

B3

(0,0,1)

(0,1,0)

(1,0,0)

(0,1,0)

(1,0,0)(−1,0,0)

(0,−1,0)

(0,−1,0)

y

x

y

x

z

B1B2

Backward Pass

(0,1,0)

F4

y

z

x

y

z

x

F2

y

z

x

F3

z

x

F1

(−1,0,0)

(0,0,−1) (0,−1,0)

(1,0,0)

(0,−1,0)

(−1,0,0)

(0,0,0)

Forward Pass

(1,0,0)

(0,1,0)

y

Figure 6: Vector templates for one pass of the VCVDT tech-nique.

F does not have to be unit or even constant, the FMM is notsolely a method for computing distance fields.

However, if F = 1, the front moves at unit speed, and thearrival time at p is simply the distance from p to the closestpoint on the front at time 0. Hence, the FMM can be and isfrequently used to compute distance fields. The FMM is de-fined on both 2D and 3D grids [SMP99] and also on surfacesrepresented as triangle meshes [KS98, Set99b]. The FMMwas independently proposed first by Tsitsiklis [Tsi95] andthen Sethian [Set96] and Helmsen et al. [HPCD96].

The FMM is in principle a wavefront scheme which com-putes the values of T from a set of boundary values, andthe structure of the algorithm is almost identical to Dijkstra’ssingle-source shortest path algorithm [CLR90]. We say thata grid point with a known arrival time is frozen. In the firststep, the distances of all grid points adjacent to a frozen gridpoint of the boundary condition are computed. Then wepick the smallest of these distance values and freeze the cor-responding grid point. Next, we recompute the distance atall its adjacent grid points (except at those that are alreadyfrozen, see Figure 8). Finally, we loop back and freeze thegrid point that now contains the smallest distance value. Inthis way, the set of frozen grid points keeps expanding, andaround the frozen set there is a layer of grid points wherethe distance is computed but not yet frozen. A priority queueimplemented as a binary heap is typically used to store these

FOR(z = 0; z < fz; z++)

/* Forward Pass F1*/

FOR(y = 0; y < fy; y++)

FOR(x = 0; x < fx; x++)

p=(x,y,z);pos=argmini ‖vec[p + diri]+diri‖vec[p]=vec[p + dirpos]+dirpos

F(x,y,z)=‖vec[p]‖

Figure 7: Pseudo code for pass F1 of a vector distance trans-form.

distance values. Whenever, a distance is computed or recom-puted, we have to be able to update the heap to reflect thischange. This requires that each grid point holds a pointer toits corresponding heap element.

Figure 8: This figure illustrates the structure of the FMM. Thedistances are initially known at the boundary condition (bluesquares in left figure). The distance is then computed at alladjacent grid points (red squares) and the grid point with thesmallest of these distances is frozen (the hatched blue squareon the right). Then the distance is recomputed at its (hatchedred) neighbours. The red arrows indicate which neighboursare used to recompute a distance.

In order to compute the distance at a new grid point, adiscretized version of (12) is solved. The discretization isbased on a first order accurate finite difference approxima-tion to the gradient which only uses the frozen grid pointsin the neighbourhood of the current grid point. To solve thisdiscretized version of the Eikonal equation, we simply needto find the largest root of a second order polynomial. Un-fortunately, the standard FMM is not very precise. This hasmotivated another version (FMMHA) of the method whichis more precise by virtue of the fact that second order finitedifference approximations to the partial derivatives are used[Set99a]. Hence, it is necessary to know the distance twogrid points away from the grid point where a new distanceis computed. In practice, though, it is possible to fall back tothe standard FMM if this condition is not met.

For more details on how to implement the FMM andFMMHA, the reader is referred to [Bær01b]. In the form de-scribed above, the FMM is an O(N log N) algorithm where Nis the number of grid points. The reason why the FMM is notlinear is the fact that at each step we need to find the smallestdistance that is not yet frozen. Typically, the distance valuesare stored in a heap, and it is a constant time operation topick the smallest. However, we also need to keep the heapsorted which is a logarithmic operation.

8

Page 9: 3D Distance Fields: A Survey of Techniques and Applicationsfrey/cours... · A distance field representation of an object can be par-ticularly useful in situations where algorithms

3.4 Variations of the FMM

A problem in the implementation of the FMM is that vox-els in the priority queue may be recomputed. If they are re-computed they should be moved in the priority queue whichentails that we need to store handles to priority queue ele-ments in the voxels. However, two observations can be usedto motivate a simplified FMM which does not require thesehandles:

• It is our experience that errors increase if one allows thevalues of priority queue voxels to increase as a result ofa recomputation. This means that we do not need han-dles into the priority queue, instead we accept to havemultiple values in the priority queue for a single voxel.The smallest value will emerge first, and then we freezethe voxel. If a second value for a given voxel is poppedfrom the priority queue it is simply disregarded.

• Errors also increase if non-frozen voxels are used in thecomputation of priority queue voxels. Hence, it is notnecessary to assign distance values to voxels before theyare frozen. This, in turn, means that we know a voxelhas been frozen simply because it has been assigned avalue.

The advantage of this scheme is that it is simpler, and we canuse a standard priority queue. The following pseudocodeillustrates the simplified FMM loop:

Extract voxel with smallest value.

If voxel is not frozen,

freeze voxel

compute unfrozen neighbours

and insert them in priority queue

We will refer to this simplified fast marching method asSFMMHA.

Tsai [Tsa02] proposes a hybrid algorithm. For each voxelwith three known neighbours, the distance is calculated tothe closest of two points which are the intersection of spherescentred on each neighbouring voxel with radius equal to thedistance at that neighbouring voxel. If only one neighbouris known a fixed amount h is added to the distance of thatneighbour. If the intersection of the spheres is ambiguous,then the distance is calculated using the Godunov Hamil-tonian. Adding the fixed amount h is the same as using aChamfer Distance Transform, with h set to be an appropri-ate value from Table 1. The sphere intersection part of thealgorithm produces at best the same result as a Vector Trans-form (although relies on less storage, but requires more com-plex calculation to solve the intersection of the spheres). TheGodunov Hamiltonian calculates the distance from a wavefront propagating through the data. The algorithm combinesall three methods (FMM, CDT and VDT). It seems to produceaccurate results from point data, and from piecewise linearobjects when they are oriented so their normals are integermultiples of π/4 (the combined use of the CDT and GodunovHamiltonian makes that restriction for accurate results). Forarbitrary data as we test here, the VDT is superior in accu-racy, speed and simplicity of implementation.

Kim [Kim00] proposed the group marching method(GMM) where a group of voxels on the wavefront is usedto calculate the distances for their neighbouring voxels. The

group is determined as those voxels that are within a cer-tain distance of the wavefront and are chosen so that theydo not affect the travel time calculation to each other. Dueto the fact that their neighbouring voxels could be affectedby several members within the group, iterations in two dif-ferent directions are carried out. GMM is tested on simpleartificial problems for which similar errors are generated (toFMM). Although GMM is O(N) it has a high overhead in theform of keeping track of the group, and determining whichmembers of the group are to be updated.

Zhao [Zha04] uses a sweeping method to solve the Eikonalequation. The volume is swept in forward and backward di-rections in a similar manner to Chamfer and Vector Trans-forms. At each voxel, the Godunov discretization of theEikonal equation is calculated, rather than the chamfer ma-trix multiplication of the Chamfer Transform, or the vec-tor additions of the Vector Transforms. This results in anO(N ) method which produces a similar result to the FMMat a similar speed to O(N ) Chamfer and Vector Transforms.He also proves convergence for sweeping methods using theGodunov Hamiltonian to solve the Eikonal equation. Goinga bit further, Kao et al. proposed a fast sweeping method formore general hamiltonians based on Lax-Friederichs ratherthan Godunov’s scheme [KOQ04].

Hysing and Turek [SRH05] compare and evaluate theFMM method with various methods including the methodsof Tsai and Zhao.

Yatziv et al. [YBS05] create an O(N) implementation byreplacing the heap with an array of linked lists. The arrivaltimes are discretized and placed at the end of their appro-priate linked list (O(1) insertion). By keeping track of whicharray represents the least time, the head of the list is used asthe next grid point to compute (O(1) removal). As the listsare not sorted, errors are introduced, but these were foundto be acceptable when compared to the time saving.

3.5 Reinitialization of Distance Fields

The goal of reinitialization is to convert an arbitrary scalarfield, Φ : R

3 → R, whose 0-level isosurface (or 0-levelset) represents some interface, to a distance field in such away that the 0-level isosurface is unchanged. Reinitializa-tion is often required as a part of the level set method (LSM)[OS88, Set99b, OF02] (c.f. Section 5.4.2), and most workon reinitialization has been carried out in the context of theLSM.

There is a simple solution to reinitialization based on themethods discussed in the previous sections. If we assumethat the grid points immediately adjacent to the 0-level iso-surface contain correct distances, FMM can be used to re-build the distance field up to the required value. Unfortu-nately, this condition may be violated, which was addressedby Chopp [Cho01]. Here, in each cell (group of eight gridpoints) intersected by the 0-level set of Φ, a cubic polynomialwhich interpolates the values at the corners is constructed.The value of each corner grid point is, subsequently, replacedby the distance to the 0-level set of this polynomial.

While the FMM is often employed for reinitialization,other distance transforms could also be used, and, in fact,there is an entire class of methods based on the reinitializa-tion equation,

Φt + s(Φ0)(‖∇Φ‖ − 1) = 0 , (13)

9

Page 10: 3D Distance Fields: A Survey of Techniques and Applicationsfrey/cours... · A distance field representation of an object can be par-ticularly useful in situations where algorithms

which was introduced by Sussman et al. [SSO94] extendingwork by Rouy and Tourin [RT92]. In (13), Φ is a function thatis typically almost but not quite a distance function. s(Φ0)is the sign of the original function which must be known forall grid points in advance. Most authors use a “smeared”sign function which is very small near the interface to avoidinstability. Sussman et al. proposed

s(Φ0) =Φ0√

Φ02 + ε2

, (14)

where ε is a constant often chosen to be about the sizeof a cell in the grid [PMO+99]. A different sign functionmore adapted to steep gradients was proposed in [PMO+99].‖∇Φ‖ must be computed in an upwind fashion, i.e. thederivatives should be one sided which means that for a givengrid point they should look in the direction to the 0-level set[OF02].

Evolving (13) forward in time will cause the value of Φ toiteratively increase or decrease in order to attain a gradientlength of unity. When a steady state has been reached, Φ is adistance function. Thus, methods based on (13) can be usedas distance transforms provided the sign is given for eachgrid point. However, this is not efficient since many timesteps are needed.

Most authors use a small, constant number of steps (e.g.one or two) to correct a field that is already close to a distancefield. In this scenario, the schemes are O(N) where N is thetotal number of grid points while FMM is O(N log N). How-ever, in practice FMM might be faster. We surmise that (13)is best if small frequent corrections are needed while FMMcould be better for infrequent, large corrections. It is alsoeasy to stop the FMM when all distance up to a given max-imum have been computed. However, when evolving (13),the distance information flows outward from the interfacejust like in the fast marching method. This indicates that asimilar wavefront scheme should be feasible as mentionedin [RS00].

A concern with the methods based on (13) is that the 0-level set may move slightly. As a countermeasure Sussmanet al. [SFSO98] proposed a volumetric constraint, and Russoet al. [RS00] an upwind method which does not accidentallylook beyond the 0-level set. Finally, it should be noted that(13) can be discretized in a variety of ways both with regardto time derivatives and spatial derivatives. In [OF02] the in-terested reader will find an overview with more details onthis.

3.6 Comparison

Each tested distance transformation was executed on sev-eral test data sets, and the results are presented in Table 2.The Point data set is a single point in a 2563 voxel grid, theRotCube data set is a voxelized cube rotated by 30o on boththe x- and y-axes (again 2563). Hyd is a distance field to the643 AVS Hydrogen data set (measured to τ = 127.2) andCT is a distance field to the bone (τ = 400) of the UNCCThead (256×256×113, Figure 9). In the latter two casesthe distance field was measured to the triangles created bythe tiling tetrahedra algorithm [PT92] using a threshold ofτ . The boundary condition consists of internal voxels withan external 26-neighbour, and external voxels with an inter-nal 26-neighbour. The vector transform requires the vector

to the closest point whereas the other transforms just requirethe distance to the surface. Each method is compared to aground truth distance field that has been computed usinga direct method. Note that a 53 Complete Euclidean existswhich creates an equivalent result to the 53 Quasi Euclidean(Table 1), and so it is not reported here. The following con-clusions may be drawn:

3.6.1 Precision

• The VDTs (represented here by the VCVDT) are thefastest to execute and have the lowest error.

• VDTs produce accurate results for cases where distancesare measured to point data sets. The FMM is accurate inthe case of planar surfaces.

• The greater precision of the VDT reflects, to some extent,that more information from the boundary condition isused: VDT requires that a vector to the closest point isstored in each boundary condition voxel.

• VDTs produce the least error for an offset surface n forany n (Table 3).

• VDTs are the only methods where the error diminishesas a function of distance (Table 3).

• Larger CDT kernels give more directional possibilitiesfor the source of the shortest distance, and are thereforemore accurate, but they increase computational time.

• The < a, b, c >opt method is the best 33 CDT as ithas been optimally designed to limit the distance er-ror [SB02].

• The max error of the CDTs rise significantly as a functionof distance (compared to FMM and VDTs).

• The FMMHA is significantly more accurate than theoriginal FMM.

• If the original analytic representation (in addition to theboundary data) is available, the result of a VDT can beused to measure distances to the original data to im-prove accuracy further [BMW98, SJ01a].

3.6.2 Speed

• CDTs and VDTs are O(N) methods, whereas FFMs areO(N log N). This is reflected in the computational times.

• Wavefront methods should be faster than the other tech-niques when requesting only distances up to a level, sayτ , at least for small τ . We have tried to verify this withthe SFMMHA. Indeed, for τ ≤ 3, the SFMMHA outper-forms all other methods, but only narrowly in the caseof the CT head.

3.6.3 Ease of implementation

• Arguably, VDTs and CDTs are easier to implement thanFMMs. However, the simplified FMM is easier to imple-ment than the method proposed by Sethian [Set99b]

• FMM, being an Eikonal solver is more general and canalso compute arrival times for non unit-speed fronts.

10

Page 11: 3D Distance Fields: A Survey of Techniques and Applicationsfrey/cours... · A distance field representation of an object can be par-ticularly useful in situations where algorithms

Transform Point (1) RotCube (386755) Hyd (11056) CT (507240)avg. max secs avg. max secs avg. max secs avg. max secs

VCVDT 0 0 6.39 0.0034 0.089 8.10 0.01 0.13 0.1 0.01 0.19 3.35City Block 67.96 159.76 10.7 15.51 91.28 8.74 4.45 20.28 0.14 9.04 74.16 3.78

Chessboard 18.53 52.19 11.99 9.44 31.76 9.81 2.18 8.77 0.16 4.63 26.94 4.1833 Q-Euclidean 17.29 49.21 11.99 4.50 26.96 9.80 1.13 5.31 0.15 2.67 18.64 4.1833 C-Euclidean 9.57 18.54 14.80 2.49 14.96 12.45 0.74 2.84 0.19 2.01 13.88 5.3933 < a, b, c >opt 3.39 9.27 14.59 1.00 7.82 12.51 0.31 1.54 0.2 0.76 6.97 5.2953 Q-Euclidean 2.40 6.55 37.04 0.50 3.40 34.95 0.22 0.98 0.54 0.60 4.46 15.30

FMM 1.76 2.78 167.72 0.23 2.07 183.67 0.31 1.00 1.41 0.40 1.84 77.93FMMHA 0.40 0.62 170.43 0.03 0.27 184.15 0.04 0.33 1.45 0.06 0.95 78.42

SFMMHA 0.40 0.62 118.99 0.03 0.27 115.17 0.04 0.33 0.74 0.06 0.95 46.77

Table 2: Each distance transformation method was tested with each data set. The average error, maximum error, andrun-time are given for each (2.6Ghz P4). The number in brackets indicates the amount of voxels in the boundary condition.

Average (UNC CThead)2 3 4 5 10 20 50

FMM 0.065 0.075 0.085 0.096 0.141 0.219 0.364FMMHA 0.037 0.039 0.041 0.042 0.047 0.054 0.062SFMMHA 0.037 0.039 0.041 0.042 0.047 0.054 0.062VCVDT 0.025 0.024 0.022 0.020 0.017 0.014 0.01233 < a, b, c >opt 0.046 0.056 0.067 0.078 0.130 0.248 0.54453 Q-Euclidean 0.062 0.060 0.063 0.073 0.115 0.202 0.425

Max (UNC CThead)2 3 4 5 10 20 50

FMM 1.187 1.187 1.187 1.187 1.333 1.517 1.760FMMHA 0.475 0.475 0.560 0.679 0.799 0.851 0.891SFMMHA 0.475 0.475 0.560 0.679 0.799 0.851 0.891VCVDT 0.168 0.191 0.191 0.191 0.191 0.191 0.19133 < a, b, c >opt 0.229 0.336 0.359 0.409 0.702 1.398 3.61253 Q-Euclidean 0.302 0.313 0.326 0.368 0.598 1.065 2.508

Table 3: The average and maximum error for the UNC CThead using several methods. For each method, the column nindicates the errors for all voxels up to distance n from the surface (that are not in the boundary condition).

11

Page 12: 3D Distance Fields: A Survey of Techniques and Applicationsfrey/cours... · A distance field representation of an object can be par-ticularly useful in situations where algorithms

4 Representation of Distance Fields

Discrete distance fields are usually stored in voxel grids dueto the great simplicity of this representation. However, thereare some disadvantages to regular voxel grids. In order tocapture tiny details, a high resolution grid must be used, butlarge grids are extremely memory consuming. Hence, thereis a great incentive to develop more parsimonious represen-tations which adapt better.

A very simple, effective improvement over a regular gridis to use either a hierarchical or run-length encoded grid.Both of these representations are useful in cases where thedistances are clamped beyond a maximum value, as, for ex-ample, in object modelling (Section 5.4.1) or in LSM meth-ods (Section 5.4.2). However, even for other applications thisneed not be a limitation, since the the clamped distances canbe extended to a full distance field easily (Section 3.2). Ahierarchical grid is simply a grid of cells where each cell con-tains a small voxel grid (e.g. 16 × 16 × 16 voxels). In thiscase, we often have large homogeneous regions that can berepresented with a single value for the entire cell. In the run-length approach, voxels of each data row are classified eitheras inside, outside and transitional [Nov03]. A row of voxelsis then represented as a linked list of spans of voxels of thesame category. The transitional spans are represented fully,while only length of the other spans is stored. In both cases,reading and writing are efficient, and if there are large ho-mogeneous regions in the data set (which is often the case),the memory efficiency is very good, reaching compressionvalues at the level of a few per cent of the full volume rep-resentation. However, if the distance field contains featuresat very diverse scales, the Adaptive Distance Fields technique,proposed by Frisken et al. [GPRJ00] is a better choice for itsrepresentation, at the cost of more complex storage and re-trieval. The basic idea is to subdivide space using an octreedata structure [Mea82, Sam90]. The distance values are sam-pled from a continuous distance field at the vertices of eachcell in the octree, and a cell is split recursively until the inter-polated distance field within closely matches the continuousfield.

ADFs are useful for compactly representing complex dis-tance fields. Frisken et al. also demonstrate how their ADFscan be manipulated using CSG operations. In more recentwork, Perry and Frisken [PF01] improve on some of their re-sults. Especially techniques for fast rendering using pointsand techniques for triangulation are proposed. The triangu-lation is an extension of surface nets [Gib98] from regular toadaptive grids. In recent work by Ju et al. [JLSW02], themethod has been extended further to adaptive grids whereprecise edge intersections and normals are known. Finally, anew, faster tile based generation of ADFs is proposed.

An ADF scheme was also proposed by Bærentzen[Bær01a]. The data structure and the CSG operations resem-ble the work by Frisken and Perry. However, Bærentzen pro-poses a simple decoupling of the space subdivision and therepresentation of distances at cell corners. An octree is usedto represent the space subdivision whereas a 3D hash tableis used to represent points. This decoupling is importantbecause cells share corners. Thus (without a separate pointdata structure) each cell must have either separate copies ofthe distance values at its corners or pointers to these values.With a 3D hash table, the corner position is simply used to

look up distance values.In [HLC+01] a representation called a Complete Distance

Field Representation (CDFR) is proposed. A CDFR is a reg-ular subdivision of space into a 3D grid of cells where eachcell contains a set of triangles. These are the triangles whichmight affect the distance field within the cell. To build thisdata structure, triangles are initially stored in the cells theyintersect. Subsequently, the triangles are pushed to neigh-bouring cells. A neighbouring cell tests whether the trianglemight influence its distance field and stores the triangle ifthis is the case. When no cells contain triangles that influ-ence neighbouring cells, the process stops. From the trian-gles stored in each cell, we can compute the exact shortestdistance from a point in the cell to the surface.

Another approach which was recently proposed by Wu etal. is to construct a BSP tree from a triangle mesh [WK03].Within each cell, the distance field is approximated by a sim-ple linear function (plane distance). The triangle model ispassed to a function that recursively splits the model intosmaller pieces. For each piece of the model, a distancefield approximation is generated and the approximation er-ror is estimated. If the error is above a given tolerance themodel is split again. Medial axis information is used to splitthe model approximately along high curvature ridges. Themethod leads to a very compact representation. It is not evenC0, but the authors argue that this is less important as long asthe maximum approximation error can be controlled. As anexample of an application, the method is used to guaranteea bound on the error during mesh decimation.

The techniques proposed by Kobbelt et al. [KBSS01] andQu et al. [QZS+04] are aimed at representation and sub-sequent reconstruction of surfaces with sharp edges by tri-angulation techniques. This is, referring to the samplingtheory, a task which is in general not possible to accom-plish by means of a regular sampled field. Therefore, ad-ditional information should be provided. In the first case,the enhanced DF representation [KBSS01], for each voxel itsdirected distances along the x, y and z axes to the surfaceare stored. Thus, more precise information about the surfaceshape is provided. In the latter technique, the offset DF (ODF)[QZS+04], the distance field is sampled in a semi-regularpattern, which iteratively adapts itself to the actual geom-etry. Further on, the authors propose a unified DF (UDF),which combines the aforementioned offset DF with repre-sentations proposed in [KBSS01, HLC+01, JLSW02], togetherwith the plain DF storing just the minimal distances. Theirmotivation is that none of these techniques can itself success-fully capture all the possible variations of surface details andtherefore the most suitable one should always be chosen.

These representations have very different properties:CDFR, ODF, UDF and Wu’s BSP tree representation can beconstrued as static data structures for accelerating distancecomputations (almost like Meshsweeper [Gue01]). Hierar-chical and run-length encoded grids and ADFs on the otherhand allow for modifications of the distance field, the latterbeing the most suitable in situations where very small fea-tures in the distance field are of interest.

Nielsen and Museth [NM05] propose Dynamic TubularGrids (DT-grids) as a data structure for representing theevolving interface during PDE simulation. DT-grids are avery compact data structure just representing the interface,and are therefore dependent upon the size of the interface

12

Page 13: 3D Distance Fields: A Survey of Techniques and Applicationsfrey/cours... · A distance field representation of an object can be par-ticularly useful in situations where algorithms

rather than the size of the domain of the simulation (as gridmethods such as ADFs are). The advantages of this schemeinclude being able to track the interface ”out of the box” —the interface is not restricted to a finite grid as is the case inthe other representations. They give an example simulationwhere their method requires just 64MB compared to a hierar-chical method which would require 5GB of grid storage, andoffers better time performance. The data is represented by1D columns which are runs of connected data. Additionalstructures store (or imply) the coordinates of voxels withinthe run, and store the voxel values. Algorithms are given foraccessing the grid randomly, via neighbouring voxels in thecoordinate direction and within a stencil.

Jones [Jon04] gives a study into compressing distancefields. He derives a predictor for calculating distance basedupon the vector transform (Section 3.2.3). If the predictor issuccessful in one of 13 previously visited directions a direc-tion value indicating the direction can be stored. Otherwisethe full distance value is stored. This is followed by entropyencoding on the directions, and bit-plane encoding followedby entropy encoding on the distance values. He shows thatthis lossless Vector Transform predictor gives a compressionsimilar to the lossy wavelet transform where around 75% ofthe coefficients have been set to zero (i.e. files sizes are 25%of the original). Jones [Jon04] gives further analysis.

5 Applications

5.1 Object Skeletons, Centerlines and MedialAxes

An object skeleton (medial axis, centerline [Blu64]) in a planeis a locus of points having equal distance to at least two dis-tinct points on the object boundary. In 3D space this leadsto the notion of a medial surface and, in order to obtaina 1D centerline, the condition must be strengthened to atleast three closest surface points. Unfortunately, such a setof points can be discontinuous and subsequent processingensuring continuity is necessary.

Skeletons are a highly compact representation of objects,serving for their description, recognition, collision detection,navigation, animation etc. This multitude of purposes leadsto different requirements on the precision, with which askeleton should describe the given object. For further analy-sis and eventual recreation [Dan80, CM00] they should rep-resent the object with high fidelity, keeping all its topolog-ical properties. At the other extreme, when used as nav-igation paths, just the most important features should bekept [ZT99, BKS01]. Therefore, a large variety of special-ized skeletonization and centerline detection approaches ex-ist, many of which depend on DF analysis [Mon68] anddetection of its C1 discontinuities—ridges. For example,Blum [Blu64] defined the skeleton as a locus of those DFpoints, where it is not possible to define a tangent plane.Gagvani and Silver detect skeletal points taking advantageof an observation that the distance of a ridge point is largerthan average of its neighbors [GS99]. This, by specify-ing a threshold of this difference, enables them to controlthe skeleton complexity. For a similar purpose, in orderto enable the level-of-detail representation and also to de-crease skeleton sensitivity on surface noise, Malandain andFernandez-Vidal [MFV98] use the fact that in vector DTs the

position of the closest surface point is registered and thattwo mutually close points, which straddle the medial axis,have their corresponding closest surface points far apart(Section 2.3). Observing that magnitude of the angle definedby these surface points and the medial axis location reflectsimportance of the given voxel as a skeletal one, they pro-pose adjustable parameters for their classification. The skele-ton detection approach proposed by Siddiqi et al. [SBTZ99]arises from the conservation of energy principle, which is vi-olated at the ridge (shock) locations of a vector field. First,a Euclidean distance field to a continuous approximation ofthe object surface is computed. In a second step its gradi-ent vector field is obtained, followed by local computationof the field’s net outward flux. The flux field is zero every-where, except for the shock (skeleton) points, where it is neg-ative due to local energy loss. Thus, the skeletal points areobtained by thresholding of the flux field. This algorithmcan lead to a skeleton topology which is different with re-spect to the topology of the original object. Therefore, in asequel [BS00], the technique was extended to preserve topol-ogy by introduction of a homotopy preserving thinning tech-nique.

In navigation, a centerline, i.e. a central path throughthe often elongated and winding object is required [ZT99,BKS01, WDK01]. It is usually a simple path connecting thestart and end points. If the goal is navigation in a tree struc-ture, the path can be represented by a tree structure of simplesegments. In this sense the centerline should be connectedand should not contain segments, which represent unimpor-tant windings, bulges or even noisy artifacts. Since neither ofthese requirements is ensured by the general purpose skele-tonization algorithms, special ones were developed.

Typically, two distance fields are employed. One, whichsimilarly as in the aforementioned skeletonization ap-proaches ensures centering of the path within the object andis computed with respect to the object boundary, and onewhich is computed with respect to the path starting pointand provides the necessary topological and connectivity in-formation. Zhou and Toga [ZT99] use a 3-4-5 distance metricfor the first field and a simpler 1-2-3 metric for the secondone. Areas with constant values (codes) of the second fieldare denoted clusters. Since a cluster is approximately pla-nar and perpendicular to the object axis, it usually containsa single voxel with a maximum value of the first field. Thus,sequentially inspecting clusters in the order of their increas-ing code, centerline voxels are extracted with ensured con-nectivity and centering.

The penalized volumetric skeleton algorithm proposed byBitter [BSB+00, BKS01] builds upon Dijkstra’s minimum costpath algorithm [CLR90]. Here, the cost is given as a sum ofthe piecewise Euclidean lengths of path segments (segmentsare on the voxel level, so the possible distances are 1,

√2 and√

3) and voxel penalties, which increase with decreasing dis-tance to the object boundary. Thus, the centerline is the sim-ple path of maximum length among all lowest cost paths.Further, object skeletons may be built as the tree of maxi-mum length lowest cost paths found in the object.

5.2 Morphology

Distance fields have been found useful for morphologicaloperations [Ser82] of erosion (upon which the medial axis

13

Page 14: 3D Distance Fields: A Survey of Techniques and Applicationsfrey/cours... · A distance field representation of an object can be par-ticularly useful in situations where algorithms

algorithms are usually based) and dilation.The mathematical morphological operation of ero-

sion [GW93] will remove external parts of an object(depending upon the structuring element). Dilation will addparts to the boundary of the object. Opening will enlargecracks and cavities, and closing will remove cavities andsmooth spikes.

Given a structuring element B, erosion of an object X isdefined as:

X B = {p|Bp ⊂ X} (15)

and dilation as:

X ⊕ B = {p|Bp ∩ X �= ∅} (16)

Closing is a dilation followed by an erosion:

X • B = (X ⊕ B) B (17)

and opening is an erosion followed by a dilation:

X ◦ B = (X B) ⊕ B (18)

If B is defined as a ball of radius r:

B = {b|‖b‖ ≤ r} (19)

where d is the distance between two points, then erosion canbe defined as:

X B = {p|d(p) ≤ −r} (20)

and dilation as:

X ⊕ B = {p|d(p) ≤ r} (21)

This gives us a practical algorithm for closing volumetricobjects [Jon01]. First the distance field, d is calculated (2).The surface, S⊕r , representing a dilation with a ball of ra-dius r is equivalent to S⊕r = {q : d(q) = r} where q ∈ R

3.To calculate the erosion with a ball of radius r for this sur-face S⊕r , we calculate a new distance field, d′ based upondistances from surface S⊕r using one of the techniques de-scribed earlier (measuring to the isosurface). The surface S•r

which has been closed with a ball of radius r using a dila-tion of degree r followed by an erosion of degree r is givenby S•r = {q : d′(q) = −r}. Opening is defined in a similarmanner.

Morphological operators have been carried out on bi-nary segmented data by Hohne [HH92]. The use of three-dimensional erosions and dilations was reported as a use-ful application for the extraction of homogenous regions inbody scans. They have also been used by Museth et al.[MBWB02] as editing operators for level sets. Distance fieldsallow the intuitive view of morphological operations that adilation or erosion of 5mm should be an offset surface 5mmoutside or inside the object.

Figure 9 demonstrates accurate 3D closing operations of20, 10 and 5 voxels on the eye socket and cheek of the UNCCThead.

5.3 Visualization

5.3.1 Accelerated Ray-Tracing of Volumetric Data

In volume graphics [KCY93] objects are represented by 3Dgrids of densities, distances or other attributes. The Volume

Figure 9: True 3D distance closure of 20, 10 and 5 voxels ofUNC CThead data set (bottom right)

of Interest (VOI) usually only occupies part of the completegrid and the proportion of time spent on processing the ir-relevant areas can be significant. One possibility to minimisethe time spent processing these areas is to identify the emptybackground voxels by segmentation and to gather them intomacro regions which can be ignored during rendering. Inray-tracing this increases the mean step length, and results inthe speed up of single ray tracing in comparison with fixedlength algorithms.

In distance-based acceleration, empty cuboid, octahedralor (at least approximately) spherical macro regions are de-fined for each background voxel with a radius equal to itsdistance to the nearest surface point. This idea was intro-duced by Zuiderveld et al. [ZKV92, ZKV94] in the Ray Ac-celeration by Distance Coding (RADC) scheme, which worksin two phases. First, a chamfer approximation of the Euclid-ean distance (using a 5 × 5 × 5 kernel according to [VVD89],Section 3.2.2) is computed for each background voxel andstored in a volume of the same dimension as the data grid.The distance information permits skipping of an appropri-ate number of samples in the background, while in the fore-ground the ray is traversed with unit step length.

The IsoRegion Leaping technique [FH98] extends theRADC in that also homogeneous foreground regions areidentified and filled by distances to their boundary. Oncea voxel with certain density and step length is reached, colorand opacity of the whole segment is accumulated and theappropriate length is skipped. A similar Skip Field tech-nique [FS97] enables higher acceleration rates by tradingquality for speed. The gradient base error metrics [DH92]are used to identify the homogeneous regions. If no error istolerated, the inside distance information is ignored, other-wise the homogeneous inside regions are skipped rapidly.

The Proximity Clouds (PC) technique, similar to RADC,was proposed by Cohen and Sheffer [CS94]. It differs from

14

Page 15: 3D Distance Fields: A Survey of Techniques and Applicationsfrey/cours... · A distance field representation of an object can be par-ticularly useful in situations where algorithms

RADC in that it takes the shape of the free zone—the proxim-ity cloud—around a background voxel into account: there-fore the step size depends not only on the distance value,but also on the type of distance and ray direction.

The Chessboard Distance (CD) voxel traversal algo-rithm [SK00a] takes advantage of the simple cubic geometryof macro-regions defined by the chessboard distance whichenables the accelerated traversal of cubic, regular and evenrectilinear voxel grids. The algorithm defines a ray as a non-uniform sequence of samples, which are positioned exactlyat voxel faces. This property enables rapid ray-surface in-tersection computation by gradient based root finding tech-niques. Further, a variant of the CD algorithm was proposedin [SK00a] for traversal of anisotropic macroregions. Its mo-tivation resides in that distance to already passed objects isoften the limiting factor of the traversal speed. Therefore,each background voxel is assigned to 8 macroregions, eachregistering directed distance to the nearest object in the direc-tion of the main body axis of the volume. A similar techniquewas proposed in by Semwal and Kvanrstrom [SK97], whichneeds only 6 distance volumes but requires more complexdistance computation.

In [HS93, SK00a], the CD distance field was used tospeed up the template-based voxel traversal [YK92] with 26-connected ray templates. If such a template is implementedas an array of voxel positions, a known CD value d of a givenvoxel enables a jump of d voxels in this array template.

5.3.2 Distance acceleration in endoscopy

Using distance based acceleration for endoscopy often leadsto low values, which reflect distances to structures whichare out of the viewing frustum. Therefore, in addition tothe standard distance based acceleration [WKB99, WSK02],techniques have been developed which attempt to find abetter acceleration than that obtained by the basic distancetransform. Shargi and Ricketts [SR01] assigned most of thevoxels inside the colon cavity to non-overlapping spheres,which the ray can safely skip. The spheres are constructed bymeans of the 3-4-5 chamfer distance transform (Section 3.2.2)and identification of its local extrema. Spheres are obvi-ously not the optimal shape to approximate tubular struc-tures. The technique proposed by Vilanova et al. [VKG00]therefore uses cylinders for their approximation and conse-quently they obtain a higher speed up than the aforemen-tioned plain distance and sphere techniques. Distances playa twofold role, they are used both in the cylinder construc-tion and rendering.

5.3.3 Distance Field Visualization

Distance fields may be visualized like any other implicit rep-resentation, but they also have one big advantage: Except forpoints belonging to the cut locus, we know that a point p canbe projected onto the surface using a simple formula

pf = p−∇dS(p)dS(p) , (22)

where pf ∈ ∂S is sometimes denoted the foot point of p.The foot point can the be drawn directly as a point primi-tive [SA04]. This method was used in [BC02a], and in [PF01]Perry and Frisken implement a similar method in the contextof adaptive distance fields.

5.4 Modelling

5.4.1 CSG operations

In standard CSG, the basic operations union, intersectionand difference on solids are defined by the regularizedBoolean set operations [FD82]. This concept was extendedalso to solids represented by scalar fields [Bre91, WK94,CT00], with the Boolean operations replaced by fuzzy set op-erations, and later even to distance fields [BMW98, SK00b].Unfortunately, such an implementation often leads to sharpdetails, where the resulting values do not represent distanceto the boundary of the solid δS anymore (Figure 10 left).While this situation occurs mainly in the vicinity of objectedges, it is not a problem in many applications (for example,in visualization, unless it causes visible reconstruction arti-facts [NSD04]). However, in volumetric shape modeling andsculpting this becomes a major problem [BC02b].

Assuming that the operands of a CSG operation are DFsof representable solids (Section 2.3), in order to obtain acorrect result (i.e., a distance field of a representable solid),it is necessary to incorporate the DF representability crite-rion (Section 2.3) also in the distance field CSG operators.Such a scheme based on morphology was developed byBærentzen and Christensen [BC02b] for the purpose of volu-metric sculpting and implements volumetric CSG operationsbetween a discrete distance field and an unsampled contin-uous distance field of a sculpting tool.

Another scheme proposed by Novotny et al. [NSD04]processes two sampled distance fields. They assume that theDFs of input objects are truncated (Section 4) at a distanceequal to the radius Rs, as it is defined in the DF representabil-ity criterion. Thus, each object O partitions the space in threeareas: a transition area TO with −Rs < d < Rs, inner area IO

with d = −Rs and outer area OO with d = Rs. The boundarybetween the inner (outer) and transition area is called inner(outer) surface (Figure 10). In CSG intersection (extension toother operations is straightforward), the fuzzy operators canbe used for both inner and outer areas, and even for mostvoxels which are in the transition area of just one solid. Suchareas are in Figure 10 delineated by the yellow lines. How-ever, in the edge vicinity, its is necessary to ensure that thecorresponding medial surface at most touches the inner sur-face of the result, in order to keep the representability crite-rion fulfilled. Therefore, it is necessary to detect the inter-section line of the operands’ inner surfaces and to store thedistance to this intersection in the edge area voxels.

Schroeder et al. [SLL94] use distance fields to create sweptsurfaces and volumes. The object to be swept is voxelised tocreate a distance field. For each segment along the sweptpath voxels within the domain are inverse transformed backto the distance field, and the distance field is trilinearly sam-pled. The result is that the level 0 isosurface of the producedDF represents the swept volume.

5.4.2 Level Set Method

The level set method (LSM) [OS88, Set99b, OF02] is a tech-nique for tracking deforming interfaces with a great numberof applications [Set99b, OP03]. The interface is defined as the0-level set of a function Φ : R

3 → R, and it is deformed indi-rectly by changing Φ according to the speed of the interfaceF .

15

Page 16: 3D Distance Fields: A Survey of Techniques and Applicationsfrey/cours... · A distance field representation of an object can be par-ticularly useful in situations where algorithms

Figure 10: A cut through a tetrahedron defined by intersec-tion of halfspaces. Left—Intersection by the fuzzy intersec-tion operator, right—DF representable intersection. Greenlines: inner surface, black: medial axis, blue: surface of theDF representable intersection

Almost invariably, Φ is initialized to a signed distancefield, and in the interest of numerical stability this propertyis usually maintained using some method for reinitializa-tion (c.f. Section 3.5). It has been observed that the dis-tance property can be maintained to some degree of accuracyif the speed function is constant along a line perpendicularto the interface [ZCMO96, CMOS97, AS99]. Alternatively,Gomes and Faugeras [GF99] propose a reformulation of theLSM which preserves the distance field property apparentlywithout need for reinitialization. Yet another approach is thesparse field method proposed by [Whi98] where a simplifiedreinitialization is an integral part of the method which keepsexplicit lists of layers (ordered by distance) of adjacent gridpoints.

5.4.3 Animation

Gagvani and Silver [GS99] [GS01] use distance fields to cre-ate a skeletonized model of a volumetric data set. The dis-tance field model is thinned (or peeled) to create a 1 voxelthick representation of the volume model. The user thendefines those voxels about which motion can take place,and then this inverse kinematic (IK) skeleton is loaded intoand manipulated using standard animation software to cre-ate motion. Finally the volumetric data set is reconstructedaround the manipulated IK skeletons for each frame of theanimation. Reconstruction is carried out by scan fillingknown spheres about the skeleton where the size of thesphere corresponds to the isosurface data.

5.4.4 Collision Detection

For collision detection distance fields have been used both inthe context of rigid [GBF03, Erl04] and deformable [HFS03,BMF03] body simulations.

A simple approach in the case of rigid bodies is to use adual representation. A set of sample points on the object sur-face (e.g. the vertices) is one representation and a distancefield is the other. When two objects collide, the points of oneobject can be tested against the distance field of the other. Ifa point is detected to be inside the other object (according tothe distance field sign) it counts as a contact point, and thegradient of the distance field can be used as contact normal

[Erl04]. Alternatively, one might trace a ray in the directionof the gradient to find the exact contact point and the truesurface normal at that point [GBF03].

5.4.5 Dynamic Simulation

Fujishiro and Aoki [FA01] approximated thawing ice by us-ing erosion and dilation operations (Section 5.2) on binaryvoxelized data (each of their voxels is two-state—inside oroutside). Their method provides a certain amount of realism(irregular melting) by using different sized structuring ele-ments (in their case different radii spheres) in areas wherethe object surface can see more of the heat source. Theirmodel is not physically based as there is no calculation ofheat energy and by using a distance field the process is justvisually improved.

Jones [Jon03] introduces a model that accurately modelsboth thermal flow and latent heat in rigid solids with com-plex surfaces. By using the phase mixture formulation basedupon the distance field, the method allows a fast (volumepreserving) physically based animation that allows effectivecontrol of the melting process by using well defined para-meters derived from the physical properties of the materialundergoing the phase transition. One major advantage ofemploying a distance field on a voxel grid is that it providesa structure that allows the fast computation of heating dueto radiative transfer.

By replacing the partial derivatives with finite differences,Jones [Jon03] shows that it is relatively straightforward tosolve the Enthalpy formulation of the Heat Equation using adiscrete voxel grid giving results like that of Figure 11.

After 92s After 1932s

After 3680s After 17020s

Figure 11: 24cm high wax legoman. k = 0.18 W/(moC),ρ = 1000kgm−3, c = 2000 J/kgoC, h = 0.001m, L = 105kJ,with radiation from a 100oC heat source at the top left.

5.4.6 Morphing

Cohen-Or et al. [COSL98] implement morphing with a user-defined geometric warping between the source and target

16

Page 17: 3D Distance Fields: A Survey of Techniques and Applicationsfrey/cours... · A distance field representation of an object can be par-ticularly useful in situations where algorithms

distance fields. Interpolation between the warped distancefields is then used to create the in-between object. Breen andWhitaker [BW01] use level sets and distance fields to createa morph between solid models. First the source and targetobjects are converted into signed distance fields. The twoobjects are registered in order to create an affine transforma-tion between them. A level set is fitted to the zero level of thesource object, and using the transformation a correspondingpoint in the distance field of the target object is found. Thelevel set evolves in the direction of the local surface normalwith a speed proportional to the signed distance to the targetat the corresponding transformed point. They demonstratethat this method creates convincing morphs between objectswith little or no user input.

5.4.7 Hypertexture

Perlin and Hoffert [PH89] proposed hypertexture as a way ofadding texture detail or noise (such as fur, smoke and fire) toobjects. The method relies upon being able to specify a softregion D(p) around the object, such that each point p canbe classified as inside the object, in the soft region (wherethe hypertexture effect is applied), or completely outsidethe influence of the object and its texture. This is relativelystraightforward for implicitly defined objects f(x, y, z) = r,such as spheres and torii, where the soft region can be estab-lished for all points p where ri < f(p) < ro for some innerradius ri and outer radius ro.

Objects defined using triangular mesh data do not readilyhave such a property, but Satherley and Jones [SJ02] demon-strated that a space-filled distance field d could be used, anda soft region D(p) could be defined about the object:

D(p) =

1 if d(p)2 ≤ ri2

0 if d(p)2 ≥ ro2

ro2−d(p)2

ro2−ri

2 otherwise

where,ri = inner radius,ro = outer radiusand p ∈ R

3

(23)

D(p) is used in the hypertexture gain, bias, noise and tur-bulence functions of Perlin and Hoffert [PH89]. Using vox-elization, this approach allows hypertexture to be applied togeneral objects. Figure 12 shows hypertexture on a voxelizedtank and the UNC CThead data set, and also demonstratescombining hypertexture and clipping hypertexture. Millerand Jones [MJ05] demonstrate the implementation of hyper-texture on a GPU to enable real-time rendering of animatedfire texture amongst other effects on complex objects.

Figure 12: (a) Bozo and melting texture on tank. (b) Clippedhair on skull.

5.4.8 Mesh Processing

Distance fields are potentially very useful in mesh manipu-lation algorithms. In [BBVK04] Botsch et al. argue that whenmultiple manipulations are applied to a mesh, it is difficultto precisely compute the cumulative error.

An effective solution to this problem is to construct a dis-tance field around the original surface. The manipulated sur-face can then be checked against this distance field. In prac-tice, Botsch et al. propose to render the manipulated meshusing the distance field of the original as a 3D texture. Thus,we can render the manipulated mesh with the distance to theoriginal mesh mapped on as a color using 3D texture map-ping. Pixels are then culled if the mapped distance values arebelow some tolerance. Consequently, pixels are only drawnif they are above the tolerance. Thus, a simple occlusionquery [SA04] can be used to check whether the manipulatedmesh is within a given distance of the original.

5.4.9 Mesh Generation

For many applications, such as soft body simulations, sim-plicial meshes (i.e. triangle meshes in 2D or tetrahedralmeshes in 3D) are required. These meshes are typically gen-erated from some known geometry. Distance fields can be auseful representation of this geometry, since it is very easyto detect whether a mesh vertex is inside the shape, and thevertex is easily projected onto the boundary. See Bridson etal. [RBF05] and the Ph.D. thesis of Per-Olof Persson [Per05].

6 Discussion

Building upon the properties of continuous distance fields(Section 2), this paper has presented a survey of the maintechniques for the production of three-dimensional discretedistance fields (Section 3). In particular, we gave detaileddirections for creating correctly signed distance fields of tri-angular mesh data (Section 3.1). To reduce voxelization time,we have shown that it is possible to clamp the distance fieldto a shell around the object, and make use of distance trans-form methods (such as chamfer, vector and FMM) to enu-merate the remainder of the discrete space (Section 3.2). Asthese methods are approximating, it becomes natural to askthe questions we gave in the abstract — How accurate are thesemethods compared to each other?, How simple are they to imple-ment? and What is the complexity and run-time of such meth-ods?. Section 3.6 gave an analysis to provide answers to thosequestions. In summary it appears that for best accuracy weshould ensure the the initial surface shell (Section 3.2.1) con-tains vectors to the surface rather than just distances, andthen use a vector transform. Where just distances are avail-able, then it appears that using the new SFMMHA methodwill give the most accurate results, in the least time, and iseasier to implement than the previously published FMMs.After giving a review on the production of distance fields,we documented alternative representations (Section 4), andtheir application to various situations (Section 5).

References

[AB03] H. Aanæs and J. A. Bærentzen. Pseudo-normalsfor signed distance computation. In Proceedings

17

Page 18: 3D Distance Fields: A Survey of Techniques and Applicationsfrey/cours... · A distance field representation of an object can be par-ticularly useful in situations where algorithms

of Vision, Modeling, and Visualization, pages 407–413, 2003.

[ABM98] M. Akmal Butt and P. Maragos. Optimumdesign of chamfer distance transforms. IEEETransactions on Image Processing, 7(10):1477–1484,1998.

[AS99] D. Adalsteinsson and J. A. Sethian. The fastconstruction of extension velocities in level–set methods. Journal of Computational Physics,148(1):2–22, 1999.

[BA05] J. Andreas Bærentzen and H. Aanæs. Signeddistance computation using the angle weightedpseudo-normal. Transactions on Visualizationand Computer Graphics, 11(3):243–253, May/June2005.

[Bær01a] J. A. Bærentzen. Volumetric Manipulations withApplications to Sculpting. PhD thesis, IMM, Tech-nical University of Denmark, 2001.

[Bær01b] J. Andreas Bærentzen. On the implementation offast marching methods for 3D lattices. TechnicalReport IMM-REP-2001-13, DTU.IMM, 2001.

[Bær05] J. Andreas Bærentzen. Robust generation ofsigned distance fields from triangle meshes. InProceedings of International Workshop on VolumeGraphics, June 2005. to appear.

[Bar81] A. H. Barr. Superquadrics and angle-preservingtransformations. IEEE Computer Graphics and Ap-plications, 1(1):11–23, January 1981.

[BBVK04] M. Botsch, D. Bommes, C. Vogel, and L. Kobbelt.GPU-based tolerance volumes for mesh process-ing. In Proceedings of Pacific Graphics 2004, pages237–243, 2004.

[BC02a] J. A. Bærentzen and N. J. Christensen. Inter-active modelling of shapes using the level-setmethod. International Journal on Shape Modeling,8(2):79–97, December 2002.

[BC02b] J. Andreas Bærentzen and N. J. Christensen. Atechnique for volumentric CSG based on mor-phology. In Klaus Mueller, editor, Volume Graph-ics’01, pages 71–79, Stony Brook, NY, June 2002.

[BKS01] I. Bitter, A. E. Kaufman, and M. Sato. Penalized-distance volumetric skeleton algorithm. IEEETransactions on Visualization and Computer Graph-ics, 7(3):195–206, 2001.

[Blo97] J. Bloomenthal, editor. Introduction to ImplicitSurfaces. Computer Graphics and GeometricModeling. Morgan Kaufman, 1997.

[Blu64] H. Blum. A transformation for extracting newdescriptors of shape. In Wathen-Dunn andWeiant, editors, Symp. on Models for the Percep-tion of Speech and Visual Form. M.I.T. Press, Cam-bridge, Mass., November 1964.

[BMF03] R. Bridson, S. Marino, and R. Fedkiw. Sim-ulation of clothing with folds and wrinkles.In D. Breen and M. Lin, editors, ACM SIG-GRAPH/Eurographics Symposium on ComputerAnimation (SCA), pages 28–36, 2003.

[BMW98] D. E. Breen, S. Mauch, and R. T. Whitaker. 3Dscan conversion of CSG models into distancevolumes. In Stephen Spencer, editor, Proceedingsof IEEE Symposium on Volume Visualization, pages7–14, October 1998.

[BMW00] D. Breen, S. Mauch, and R. Whitaker. 3D scanconversion of CSG models into distance, closest-point and colour volumes. In M. Chen, A. E.Kaufman, and R. Yagel, editors, Volume Graph-ics, pages 135–158. Springer, London, 2000.

[Bor96] G. Borgefors. On digital distance transforms inthree dimensions. Computer Vision and Image Un-derstanding, 64(3):368–376, 1996.

[Bre91] D. Breen. Constructive cubes: CSG evaluationfor display using discrete 3D scalar data sets. InW. Purgathofer, editor, Proc. EUROGRAPHICS’91, pages 127–142. North-Holland, 1991.

[BS00] S. Bouix and K. Siddiqi. Divergence-based me-dial surfaces. In ECCV ’00: Proceedings of the6th European Conference on Computer Vision-PartI, volume 1842 of Lecture Notes in Computer Sci-ence, pages 603–618, Dublin, Ireland, June 2000.Springer.

[BSB+00] I. Bitter, M. Sato, M. Bender, K. T. McDonnell,A. Kaufmann, and M. Wan. CEASAR: A smooth,accurate and robust centerline extraction algo-rithm. In T. Ertl, B. Hamann, and A. Varshney,editors, Proceedings Visualization 2000, pages 45–52, 2000.

[BW01] D. E. Breen and R. T. Whitaker. A level-set ap-proach for the metamorphosis of solid models.IEEE Transactions on Visualization and ComputerGraphics, 7(2):173–192, 2001.

[Cho01] D. L. Chopp. Some improvements of thefast marching method. SIAM J. Sci. Comput.,23(1):230–244, 2001.

[CKY00] M. Chen, A. E. Kaufman, and R. Yagel, editors.Volume Graphics. Springer Verlag, London, 2000.

[CLR90] T. H. Cormen, C. E. Leiserson, and R. L. Rivest.Introduction to Algorithms. MIT Press, 1990.

[CM00] O. Cuisenaire and B. Macq. Applications of theregion growing euclidean distance transform:Anisotropy and skeletons. In ICIP97 VOLI,pages 200–203, 2000.

[CMOS97] S. Chen, B. Merriman, S. Osher, and P. Smereka.A simple level set method for solving ste-fan problems. Journal of Computational Physics,135(1):8–29, July 1997.

18

Page 19: 3D Distance Fields: A Survey of Techniques and Applicationsfrey/cours... · A distance field representation of an object can be par-ticularly useful in situations where algorithms

[COSL98] D. Cohen-Or, A. Solomovic, and D. Levin.Three-dimensional distance field metamorpho-sis. ACM Trans. Graph., 17(2):116–141, 1998.

[CS94] D. Cohen and Z. Sheffer. Proximity clouds—anacceleration technique for 3D grid traversal. TheVisual Computer, 10(11):27–38, November 1994.

[CT00] M. Chen and J. V. Tucker. Constructive volumegeometry. Computer Graphics Forum, 19(4):281–293, 2000.

[Cui99] O. Cuisenaire. Distance Transformation: fast algo-rithms and applications to medical image processing.PhD thesis, Universite catholique de Louvain,October 1999.

[Dan80] P-E. Danielsson. Euclidean distance mapping.Computer Graphics and Image Processing, 14:227–248, 1980.

[DH92] J. Danskin and P. Hanrahan. Fast algorithms forvolume ray tracing. 1992 Workshop on Volume Vi-sualization, pages 91–98, 1992.

[DK00] F. Dachille and A. Kaufman. Incremental trian-gle voxelization. In Graphics Interface 2000, pages205–212, 2000.

[ED] K. Erleben and H. Dohlman. Personal Commu-nication.

[Erl04] K. Erleben. Stable, Robust, and Versatile MultibodyDynamics Animation. PhD thesis, Department ofComputer Science, University of Copenhagen,2004.

[FA01] I. Fujishiro and E. Aoki. Volume graphics mod-eling of ice thawing. In K. Mueller and A. Kauf-man, editors, Volume Graphics 2001, pages 69–80,Wien, 2001. Springer-Verlag.

[FD82] J. D. Foley and A. Van Dam. Fundamentals ofInteractive Computer Graphics. Addison-Wesley,1982.

[FH98] Ping-Fu Fung and Pheng-Ann Heng. Efficientvolume rendering by isoregion leaping accelera-tion. In Proceedings of The Sixth International Con-ference in Central Europe on Computer Graphics andVisualization ’98, pages 495–501, Czech Republic,1998.

[FS97] J. Freund and K. Sloan. Accelerated volume ren-dering using homogenous region encoding. InR. Yagel and H. Hagen, editors, IEEE Visualiza-tion ’97, pages 191–196. IEEE, November 1997.

[GBF03] E. Guendelman, R. Bridson, and R. P. Fedkiw.Nonconvex rigid bodies with stacking. ACMTransactions on Graphics, 22(3):871–878, 2003.

[GF99] J. Gomes and O. D. Faugeras. Reconciling dis-tance functions and level sets. In Scale-Space The-ories in Computer Vision, pages 70–81, 1999.

[Gib98] S. F. F. Gibson. Using distance maps for accuratesurface representation in sampled volumes. InS. Spencer, editor, Proceedings of IEEE Symposiumon Volume Visualization, October 1998.

[Gie03] J. Gielis. A generic geometric transformationthat unifies a wide range of natural and abstractshapes. American Journal of Botany, 90:333–338,2003.

[GPRJ00] S. F. Frisken Gibson, R. N. Perry, A. P. Rock-wood, and T. R. Jones. Adaptively sampled dis-tance fields: A general representation of shapefor computer graphics. In Proceedings of SIG-GRAPH 2000, pages 249–254, 2000.

[GS99] N. Gagvani and D. Silver. Parameter-controlledvolume thinning. CVGIP: Graph. Models ImageProcess., 61(3):149–164, 1999.

[GS01] N. Gagvani and D. Silver. Animating volumetricmodels. Graph. Models, 63(6):443–458, 2001.

[Gue01] A. Gueziec. Meshsweeper: Dynamic point–to–polygonal mesh distance and applications. IEEETransactions on Visualization and Computer Graph-ics, 7(1):47–60, January–March 2001.

[GW93] R. Gonzalez and R. Woods. Digital Image Process-ing. Addison-Wesley, 1993.

[Har99] E. Hartmann. On the curvature of curves andsurfaces defined by normalforms. ComputerAided Geometric Design, 16(5):355–376, 1999.

[HFS03] G. Hirota, S. Fisher, and A. State. An improvedfinite element contact model for anatomical sim-ulations. The Visual Computer, 19(5):291–309,2003.

[HH92] K. H. Hohne and W. A. Hanson. Interactive3D segmentation of MRI and CT volumes usingmorphological operations. Journal of ComputerAssisted Tomography, 16(2):285–294, 1992.

[HLC+01] J. Huang, Y. Li, R. Crawfis, S.-C. Lu, and S.-Y.Liou. A complete distance field representation.Visualization, 2001. VIS ’01. Proceedings, pages247–254, 2001.

[Hof89] C. M. Hoffmann. Geometric and Solid Modeling.Morgan Kaufmann, 1989.

[HPCD96] J. Helmsen, E. Puckett, P. Colella, and M. Dorr.Two new methods for simulating photolithog-raphy development in 3D. In SPIE 2726, pages253–261, 1996.

[HS93] I. Hollander and M. Sramek. An Interactive Toolfor Manipulation and Presentation of 3D Tomo-graphic Data. In H. U. Lemke, K. Inamura, C. C.Jaffee, and R. Felix, editors, CAR ’93 ComputerAssisted Radiology, pages 278–383, Berlin, 1993.Springer-Verlag.

19

Page 20: 3D Distance Fields: A Survey of Techniques and Applicationsfrey/cours... · A distance field representation of an object can be par-ticularly useful in situations where algorithms

[JLSW02] T. Ju, F. Losasso, S. Schaefer, and J. Warren. Dualcontouring of hermite data. In Proceedings of the29th annual conference on Computer graphics andinteractive techniques, pages 339–346. ACM Press,2002.

[Jon96] M. W. Jones. The production of volume datafrom triangular meshes using voxelisation. Com-puter Graphics Forum, 15(5):311–318, 1996.

[Jon01] M. W. Jones. Facial reconstruction using volu-metric data. In T. Ertl, B. Girod, G. G. H. Nie-mann, and H.-P. Seidel, editors, Proceedings ofthe Vision Modeling and Visualization Conference2001 (VMV-01), pages 135–150, Berlin, Novem-ber 21–23 2001.

[Jon03] M. W. Jones. Melting objects. The Journal ofWSCG, 11(2):247–254, 2003.

[Jon04] M. W. Jones. Distance field compression. TheJournal of WSCG, 12(2):199–204, 2004.

[Kau87] A. Kaufman. Efficient algorithms for 3D scan-conversion of parametric curves, surfaces, andvolumes. Computer Graphics (SIGGRAPH ’87 Pro-ceedings), 21(4):171–179, July 1987.

[KBSS01] L. P. Kobbelt, M. Botsch, U. Schwanecke, andH.-P. Seidel. Feature sensitive surface extrac-tion from volume data. In SIGGRAPH ’01: Pro-ceedings of the 28th annual conference on Computergraphics and interactive techniques, pages 57–66.ACM Press, 2001.

[KCY93] A. Kaufman, D. Cohen, and R. Yagel. Volumegraphics. IEEE Computer, 26(7):51–64, July 1993.

[Kim00] S. Kim. An O(N) level set method for eikonalequations. SIAM J. Sci. Comput., 22(6):2178–2193,2000.

[KOQ04] C-Y. Kao, S. Osher, and J. Qian. Lax-friedrichs sweeping scheme for static hamilton-jacobi equations. Journal of Computational Physics,196(1):367–391, May 2004.

[KP81] S. G. Krantz and H. R. Parks. Distance to Ck

hypersurfaces. Journal of Differential Equations,40(1):116–20, 1981.

[KS98] R. Kimmel and J. A. Sethian. Computing geo-desic paths on manifolds. Proceedings of NationalAcademy of Sciences, 95(15):8431–8435, 1998.

[LG95] H. Loffelmann and E. Groller. Parameteriz-ing superquadrics. In Winter School of ComputerGraphics 1995, pages 162–172, February 1995.

[Mau00] S. Mauch. A fast algorithm for computing theclosest point and distance transform. Techni-cal Report caltechASCI/2000.077, Applied andComputational Mathematics, California Insti-tute of Technology, 2000.

[Mau03] S. Mauch. Efficient Algorithms for Solving StaticHamilton-Jacobi Equations. PhD thesis, Califor-nia Institute of Technology, Pasadena, Califor-nia, 2003.

[MBF92] O. Monga, S. Benayoun, and O. D. Faugeras.From partial derivatives of 3D density imagesto ridge lines. Proceedings of SPIE - The Inter-national Society for Optical Engineering, 1808:118–129, 1992.

[MBWB02] K. Museth, D. E. Breen, R. T. Whitaker, andA. H. Barr. Level set surface editing operators.In SIGGRAPH ’02: Proceedings of the 29th an-nual conference on Computer graphics and interac-tive techniques, pages 330–338, New York, NY,USA, 2002. ACM Press.

[Mea82] D. Meagher. Geometric modeling using octreeencoding. Computer Graphics and Image Process-ing, 19(2):129–147, June 1982.

[MFV98] G. Malandain and S. Fernandez-Vidal. Euclid-ean skeletons. Image and Vision Computing,16(5):317–327, 1998.

[MJ05] C. M. Miller and M. W. Jones. Texturing andhypertexturing of volumetric objects. In Pro-ceedings of the International Workshop on VolumeGraphics ’05, pages 117–125, 2005.

[Mon68] U. Montanari. A method for obtaining skeletonsusing a quasi-euclidean distance. Journal of theACM, 15(4):600–624, 1968.

[Mul92] J. C. Mullikin. The vector distance transformin two and three dimensions. CVGIP: GraphicalModels and Image Processing, 54(6):526–535, 1992.

[NM05] M. B. Nielsen and K. Museth. Dynamic TubularGrid: An efficient data structure and algorithmsfor high resolution level sets. Accepted for publi-cation in Journal of Scientific Computing January26, 2005.

[Nov03] P. Novotny. CSG Operations with VoxelizedSolids. Master’s thesis, Comenius UniversityFaculty of Mathematics, Physics and Informat-ics, Bratislava, Slovakia, May 2003.

[NSD04] P. Novotny, M. Sramek, and L. I. Dimitrov. CSGoperations with voxelizad solids. In Proceedingsof the CGI Conference 2004, pages 370–373. IEEEPress, 2004.

[NT03] F. S. Nooruddin and G. Turk. Simplificationand repair of polygonal models using volumet-ric techniques. IEEE Transactions on Visualizationand Computer Graphics, 9(2):191–205, April–June2003.

[Nv05] P. Novotny and M. Sramek. Representation ofobjects with sharp details in truncated distancefields. In E. Groller, I. Fujishiro, and T. Ertl, ed-itors, Volume Graphics 2005, pages 109–116. IEEEComputer Society, 2005.

[OF02] S. J. Osher and R. P. Fedkiw. Level Set Methodsand Dynamic Implicit Surfaces. Springer Verlag,1st edition, November 2002.

20

Page 21: 3D Distance Fields: A Survey of Techniques and Applicationsfrey/cours... · A distance field representation of an object can be par-ticularly useful in situations where algorithms

[OP03] S. Osher and N. Paragios, editors. GeometricLevel Set Methods in Imaging, Vision, and Graphics.Springer, 2003.

[OS88] S. Osher and J. A. Sethian. Fronts propagatingwith curvature-dependent speed: Algorithmsbased on hamilton-jacobi formulations. Journalof Computational Physics, 79(1):12–49, November1988.

[Per05] P.-O. Persson. Mesh Generation for Implicit Geome-tries. PhD thesis, Massachusetts Institute ofTechnology, February 2005.

[PF01] R. N. Perry and S. F. Frisken. Kizamu: A systemfor sculpting digital characters. In Proceedings ofSIGGRAPH 2001, 2001.

[PH89] K. Perlin and E. Hoffert. Hypertexture. In Com-puter Graphics (Proceedings of SIGGRAPH ’89),volume 23(3), pages 253–262, July/August 1989.

[PMO+99] D. Peng, B. Merriman, S. Osher, H. Zhao, andM. Kang. A pde-based fast local level setmethod. Journal of Computational Physics, 155(2),November 1999.

[PS03] R. Peikert and C. Sigg. Optimized boundingpolyhedra for GPU-based distance transform. InDagstuhl Seminar 023231 on Scientific Visualiza-tion: Extracting Information and Knowledge fromScientific Data Sets, 2003.

[PT92] B. A. Payne and A. W. Toga. Distance field ma-nipulation of surface models. Computer Graphicsand Applications, 12(1), 1992.

[QZS+04] H. Qu, N. Zhang, R. Shao, A. Kaufman, andK. Mueller. Feature preserving distance fields. InVV ’04: Proceedings of the 2004 IEEE Symposiumon Volume Visualization and Graphics (VV’04),pages 39–46. IEEE Computer Society, 2004.

[Rag93] I. Ragnemalm. The Euclidean distance trans-form in arbitrary dimensions. Pattern Recogn.Lett., 14(11):883–888, 1993.

[RBF05] N. Molino R. Bridson, J. Teran and R. Fedkiw.Adaptive physics based tetrahedral mesh gener-ation using level sets. Engineering with Comput-ers, 2005. In press at time of writing.

[Rho92] F. Rhodes. Discrete Euclidean metrics. PatternRecognition Letters, 13(9):623–628, 1992.

[RP66] A. Rosenfeld and J. L. Pfaltz. Sequential opera-tions in digital picture processing. Journal of theACM, 13(4):471–494, 1966.

[RS00] G. Russo and P. Smereka. A remark on com-puting distance functions. J. Comput. Phys.,163(1):51–67, 2000.

[RT92] E. Rouy and A. Tourin. A viscosity solutions ap-proach to shape-from-shading. SIAM J. Numer.Anal., 29(3):867–884, 1992.

[SA04] M. Segal and K. Akeley. The OpenGL GraphicsSystem: A Specification (Version 2.0). SGI, 2004.

[Sam90] H. Samet. The Design and Analysis of Spatial DataStructures. Addison-Wesley, 1990.

[SB02] S. Svensson and G. Borgefors. Digital distancetransforms in 3D images using information fromneighbourhoods up to 5× 5× 5. Computer Visionand Image Understanding, 88:24–53, 2002.

[SBTZ99] K. Siddiqi, S. Bouix, A. Tannenbaum, and S. W.Zucker. The Hamilton-Jacobi skeleton. In ICCV’99: Proceedings of the International Conference onComputer Vision-Volume 2, page 828, Washing-ton, DC, USA, 1999. IEEE Computer Society.

[Ser82] J. Serra. Image Analysis and Mathematical Morphol-ogy. Academic Press, 1982.

[Set96] J. A. Sethian. A fast marching level set methodfor monotonically advancing fronts. Proceedingsof the National Academy of Sciences of the USA -Paper Edition, 93(4):1591–1595, 1996.

[Set99a] J. A. Sethian. Fast marching methods. SIAM Re-view, 41(2):199–235, 1999.

[Set99b] J. A. Sethian. Level Set Methods and Fast March-ing Methods. Cambridge Monographs on Ap-plied and Computational Mathematics. Cam-bridge University Press, second edition, 1999.

[SFSO98] M. Sussman, E. Fatemi, P. Smereka, and S. Os-her. An improved level set method for incom-pressible two-phase flows. Computers and Fluids,27(5-6):663–680, 1998.

[SJ01a] R. Satherley and M. W. Jones. Hybrid dis-tance field computation. In Klaus Muller andArie Kaufman, editors, Volume Graphics 2001.Springer, 2001.

[SJ01b] R. Satherley and M. W. Jones. Vector-city vectordistance transform. Computer Vision and ImageUnderstanding, 82(3):238–254, 2001.

[SJ02] R. Satherley and M. W. Jones. Hypertexturingcomplex volume objects. The Visual Computer,18(4):226–235, 2002.

[SK97] S. K. Semwal and H. Kvarnstrom. Directedsafe zones and the dual extent algorithms forefficient grid traversal during ray tracing. InW. Davis, M. Mantei, and V. Klassen, editors,Graphics Interface, pages 76–87, May 1997.

[SK99] M. Sramek and A. Kaufman. Alias-free voxeliza-tion of geometric objects. IEEE Transactions on Vi-sualization and Computer Graphics, 5(3):251–266,1999.

[SK00a] M. Sramek and A. Kaufman. Fast ray-tracingof rectilinear volume data using distance trans-forms. IEEE Transactions on Visualization andComputer Graphics, 6(3):236–252, 2000.

21

Page 22: 3D Distance Fields: A Survey of Techniques and Applicationsfrey/cours... · A distance field representation of an object can be par-ticularly useful in situations where algorithms

[SK00b] M. Sramek and A. Kaufman. vxt: a C++ classlibrary for object voxelization. In M. Chen, A. E.Kaufman, and R. Yagel, editors, Volume Graphics,pages 119–134. Springer Verlag, London, 2000.

[SLL94] W. J. Schroeder, W. E. Lorensen, andS. Linthicum. Implicit modeling of sweptsurfaces and volumes. In Proceedings of IEEEConference on Visualization, pages 40–45, Oct1994.

[SMP99] J. A. Sethian and A. Mihai Popovici. 3D trav-eltime computation using the fast marchingmethod. Geophysics, 64(2):516–23, 1999.

[SOM04] A. Sud, M. A. Otaduy, and D. Manocha. Difi:Fast 3D distance field computation using graph-ics hardware. Computer Graphics Forum, 23(3),2004.

[SPG03] C. Sigg, R. Peikert, and M. Gross. Signed dis-tance transform using graphics hardware. InProceedings of IEEE Visualization ’03, pages 83–90.IEEE Computer Society Press, 2003.

[SR01] M. Sharghi and I. W. Ricketts. A novel methodfor accelerating the visualisation process used invirtual colonoscopy. In Fifth International Confer-ence on Information Visualisation, pages 167–172,August 2001.

[SRH05] S. Turek S-R. Hysing. The eikonal equation:Numerical efficiency vs. algorithmic complexityon quadrilateral grids. In Proceedings of ALGO-RITMY 2005, Slovakia, pages 22–31, March 2005.

[SSO94] M. Sussman, P. Smereka, and S. Osher. A levelset approach for computing solutions to incom-pressible two-phase flow. Journal of Computa-tional Physics, 114(1):146–159, September 1994.

[Str99] J. Strain. Fast tree-based redistancing for levelset computations. J. Comput. Phys., 152(2):664–686, 1999.

[Tsa02] Y. R. Tsai. Rapid and accurate computation ofthe distance function using grids. Journal of Com-putational Physics, 178:175–195, 2002.

[Tsi95] J. N. Tsitsiklis. Efficient algorithms for globallyoptimal trajectories. IEEE Transactions on Auto-matic Control, 40(9):1528–1538, September 1995.

[TW98] G. Thurmer and C. A. Wuthrich. Computingvertex normals from polygonal facets. Journal ofGraphics Tools, 3(1):43–6, 1998.

[VGF02] L. Velho, J. Gomes, and L. H. Figueiredo. Im-plicit Objects in Computer Graphics. Springer Ver-lag, New York, 2002.

[VKG00] A. Vilanova i Bartrolı, A. Konig, and E. Groller.Cylindrical approximation of tubular organs forvirtual endoscopy. In M. H. Hamza, editor, Pro-ceedings of Computer Graphics and Imaging 2000,pages 283–289. IASTED/ACTA Press, 2000.

[VVD89] B. J. H. Verwer, P. W. Verbeek, and S. T. Dekker.An efficient uniform cost algorithm applied todistance transforms. IEEE Transactions on PatternAnalysis and Machine Intelligence, 11(4):425–429,1989.

[WDK01] M. Wan, F. Dachille, and A. Kaufman. Distance-field based skeletons for virtual navigation. InVIS ’01: Proceedings of the conference on Visualiza-tion ’01, pages 239–246. IEEE Computer Society,2001.

[Whi98] R. T. Whitaker. A level-set approach to 3D recon-struction from range data. Int. J. Comput. Vision,29(3):203–231, 1998.

[WK94] S. W. Wang and A. Kaufman. Volume-sampled3D modelling. Computer Graphics and Applica-tions, 14(5):26–32, September 1994.

[WK03] J. Wu and L. Kobbelt. Piecewise linear approx-imation of signed distance fields. In Proceedingsof Vision, Modeling, and Visualization, pages 513–520, 2003.

[WKB99] M. Wan, A. Kaufman, and S. Bryson. High per-formance presence-accelerated ray casting. InVisualization ’99, pages 379–386, San Francisco,CA, October 1999.

[Wol93] F. E. Wolter. Cut locus and medial axis in globalshape interrogation and representation. Techni-cal report, MIT, 1993.

[WSK02] M. Wan, A. Sadiq, and A. Kaufman. Fast and re-liable space leaping for interactive volume ren-dering. In Proceedings of the conference on Visual-ization ’02, pages 195–202. IEEE Press, 2002.

[YBS05] L. Yatziv, A. Bartesaghi, and G. Sapiro. O(n)implementation of the fast marching algorithm.IMA Preprint Series No. 2021, February 2005.

[YK92] R. Yagel and A. Kaufman. Template-based vol-ume viewing. In A. Kilgour and I. Kjelldahl, edi-tors, Proceedings of Eurographics ’92, pages C153–C167, June 1992.

[ZCMO96] H-K. Zhao, T. Chan, B. Merriman, and S. Os-her. A variational level set approach to multi-phase motion. Journal of Computational Physics,127(1):179–195, August 1996.

[Zha04] H. K. Zhao. Fast sweeping method for eikonalequations. Mathematics of Computation, 74:603–627, 2004.

[ZKV92] K. J. Zuiderveld, A. H. J. Koning, and M. A.Viergever. Acceleration of ray-casting using 3Ddistance transforms. In R. A. Robb, editor, Vi-sualization in Biomedical Computing 1992, volume1808 of Proceedings SPIE, pages 324–335, 1992.

[ZKV94] K. J. Zuiderveld, A. H. J. Koning, and M. A.Viergever. Techniques for speeding up high-quality perspective maximum intensity projec-tion. Pattern Recognition Letters, 15:507–517, 1994.

22

Page 23: 3D Distance Fields: A Survey of Techniques and Applicationsfrey/cours... · A distance field representation of an object can be par-ticularly useful in situations where algorithms

[ZT99] Y. Zhou and A. W. Toga. Efficient skeletonizationof volumetric objects. IEEE Transactions on Vi-sualization and Computer Graphics, 5(3):196–209,July/September 1999.

23