A Decomposition-Based Approach To Layered Manufacturing
A Decomposition-Based Approach To Layered Manufacturing
www.elsevier.com/locate/comgeo
Received 23 February 2001; received in revised form 30 July 2001; accepted 4 September 2001
Communicated by K. Mehlhorn
Abstract
This paper introduces a new approach for improving the performance and versatility of Layered Manufacturing
(LM), which is an emerging technology that makes it possible to build physical prototypes of 3D parts directly
from their computer models using a 3D printer attached to a personal computer.
Current LM processes work by viewing the computer model as a single, monolithic unit. By contrast, the
approach proposed here decomposes the model into a small number of pieces, by intersecting it with a suitably
chosen plane, builds each piece separately using LM, and then glues the pieces together to obtain the physical
A preliminary version of this paper appears in the Proceedings of the Seventh International Workshop on Algorithms and
Data Structures, Providence, RI, 810 August 2001, LNCS 2125, pp. 389400.
* Corresponding author.
E-mail addresses: [email protected] (I. Ilinkin), [email protected] (R. Janardan), [email protected] (J. Majhi),
[email protected] (J. Schwerdt), [email protected] (M. Smid), [email protected]
(R. Sriram).
1 Research supported, in part, by National Science Foundation grant CCR-9712226 and by National Institute of Standards
and Technology grant 60NANB8D0002. Commercial equipment and software, if any, are identified only in order to adequately
specify certain procedures. In no case does such identification imply recommendation or endorsement by the National Institute
of Standards and Technology, nor does it imply that the materials or equipment identified are necessarily the best available for
the purpose.
2 Portions of this work were done when RJ visited the University of Magdeburg, Germany under a joint grant from the
National Science Foundation and Deutscher Akademischer Austauschdienst for international research.
3 Work done while at the Fakultt fr Informatik, Otto-von-Guericke-Universitt Magdeburg, 0-39106 Magdeburg, Germany.
Portions of this work done while visiting the University of Minnesota, under a joint grant from DAAD and NSF for international
research.
0925-7721/01/$ see front matter 2001 Elsevier Science B.V. All rights reserved.
PII: S 0 9 2 5 - 7 7 2 1 ( 0 1 ) 0 0 0 5 9 - 1
118
prototype. This approach allows large models to be built quickly in parallel. Furthermore, it is very efficient in its
use of so-called support structures that are generated by the LM process.
This paper presents the first provably correct and efficient geometric algorithms to decompose polyhedral models
so that the support requirements (support volume and area of contact) are minimized. Algorithms based on the
plane-sweep paradigm are first given for convex polyhedra. These algorithms run in O(n log n) time for n-vertex
convex polyhedra and work by generating expressions for the support volume and contact-area as a function of the
height of the sweep plane, and optimizing them during the sweep. These algorithms are then generalized to nonconvex polyhedra, which are considerably more difficult due to the complex structure of the supports. It is shown
that, surprisingly, non-convex polyhedra can be handled by first identifying certain critical facets using a technique
called cylindrical decomposition, and then applying the algorithm for convex polyhedra to these critical facets. The
resulting algorithms run in O(n2 log n) time. Also given is a method for controlling the size of the decomposition,
so that the number of pieces generated is within a user-specified limit. Experimental results show that the proposed
approach can achieve significant reduction in support requirements in both the convex and the non-convex case.
2001 Elsevier Science B.V. All rights reserved.
Keywords: Computational geometry; Cylindrical decomposition; Layered manufacturing; Optimization; Plane sweep; Rapid
prototyping
1. Introduction
The field of computer-aided design and manufacturing has now progressed to the point where an
engineer can not only design and test a virtual model of a 3D part on a personal computer, but can also
generate directly from the model a physical prototype of the part, using a relatively small and inexpensive
3D printer attached to the computer [19]. This technology, called Rapid Prototyping (RP), provides the
engineer with an additional level of physical verification that makes it possible to detect and correct
flaws that may, otherwise, have gone unnoticed. RP is used extensively in the automotive, aerospace, and
medical industries.
At the heart of RP is a manufacturing technique called Layered Manufacturing (LM). The basic
principle underlying LM is simple: the computer model is oriented suitably and sliced into thin layers
by horizontal planes. The layers are then sent over a network to a fabrication device which prints them
one by one, each on top of the previous one.
Fig. 1 depicts a widely-used LM process called Stereolithography. In essence, the Stereolithography
Apparatus (SLA) consists of a vat of light-sensitive liquid resin, a platform, and a laser. The input
to the process (and to virtually all other LM processes) is a surface triangulation of the model in the
industry-standard STL format. This format merely consists of an unordered list of the triangles, where
each triangle is specified by listing its three vertices and its outward-directed unit-normal.4 The model is
oriented suitably, sliced by horizontal planes, and then built in the vertical direction as follows: Initially,
the platform is below the surface of the resin at a depth equal to the layer thickness. The laser traces out
the contour of the first slice on the surface and then fills in the interior in a raster-like pattern a process
called hatching. The resin then hardens to a depth equal to the slice thickness and forms the first layer,
which rests on the platform. Next, the platform is lowered by an amount equal to the layer thickness, the
4 The simplicity of the STL format has led to its widespread adoption in the LM industry. However, the format does have
some inadequacies and alternative formats have been proposed; see, for instance, [15,26].
119
vacated region is re-coated with resin, and the second layer is then built in the same way. Ideally, each
layer after the first one should rest in its entirety on the previous one. In general, however, portions of a
layer can overhang the previous layer, so additional structures, called supports, are needed to hold up the
overhangs. Supports are generated automatically during the process itself. For this the model is analyzed
a priori and a suitable description of the supports is generated and merged into the STL file. Once the
part has been made, it is postprocessed to remove the supports and to improve the surface finish, which
has a stair-stepped appearance owing to the discretization into layers.
1.1. Geometric issues in layered manufacturing
Unfortunately, the time requirements of present-day LM processes is quite high often running into
hours. Generally, an LM process consists of three phases: preprocessing, building, and postprocessing.
Preprocessing includes repairing flaws in the STL file (e.g., gaps between facets, geometric singularities,
etc. [5,8]), deciding upon a suitable initial orientation for the model (or, equivalently, the build direction),
computing support requirements, generating and merging a description of the supports into the STL
file, and slicing the model and supports. The building phase involves tracing and hatching each layer.
Postprocessing includes removal of supports and improving part finish and accuracy.
All of these tasks are influenced by geometric considerations [5,17]. In particular, the orientation of the
part impacts the number of layers, the quantity of supports, the location of supports on the part, the extent
to which supports stick to the part, and the surface finish and accuracy. The layer geometry affects the
tool-path during hatching. The STL representation is not well suited for the efficient computation of
slices and supports as it does not contain any topological information about the model.
In current systems these issues are resolved in an ad hoc manner, through human intervention. For
instance, the part is oriented by the operator, based on experience, so that the quantity of supports used
is small and the finish is good. However, over the past few years the problem of automating these
decisions via efficient and correct algorithms has been addressed by several researchers in computational
geometry.
Asberg et al. [3] (see also [9]), describe efficient algorithms to decide if a given model can be built
without supports using Stereolithography. Majhi et al. [25] give algorithms to minimize the volume of
supports and the area of contact between supports and the part for convex polyhedra, and show how to
minimize the stair-step error for non-convex polyhedra. They also show how to reconcile multiple design
120
criteria simultaneously [23] and give support optimization algorithms for non-convex polygons [24]. (See
also [22].) Schwerdt et al. show how to choose a build direction that protects prescribed facets from being
damaged by supports [30] and to minimize the number of layers [31]. Recently, Agarwal and Desikan [1]
have given an efficient algorithm to approximate a build direction which minimizes the contact-area for
a convex polyhedron. Johnson [20] shows how to compute support descriptions efficiently for a given
build direction and McMains and Squin [27] show how to slice a model efficiently using the plane
sweep paradigm. Barequet and Kaplan [6] describe the design of a software front-end for automating
many process planning functions in LM.
There has also been substantial effort from the computer-aided design community, which is primarily
experimental/heuristic in nature. Representative work here includes that of Frank and Fadel [17] who
consider support optimization in the framework of an expert system, Bablani and Bagchi [4] who were
the first to quantify the notion of stair-step error, Allen and Dutta [2] who give heuristics for minimizing
support contact-area, Bhn [8] who addresses the problem of automatic repair of computer models, and
Kulkarni and Dutta [21] and Dolenc and Mkel [14] who consider the problem of slicing with variable
layer thicknesses to capture fine detail in the model. The special issue by Stucki et al. [32], contains a
wealth of information on commercial and university-based work in RP and LM.
1.2. A decomposition-based approach
All the process-planning algorithms for LM that we are aware of work by viewing the model as a
single, monolithic unit. By contrast, the approach that we propose works by decomposing the model
into a small number of pieces, building each piece separately using LM, and then gluing the built pieces
together to obtain the physical prototype. (The number of pieces generated can be controlled by the
user.) Specifically, given a decomposition direction, we decompose the model by intersecting it with a
suitable plane perpendicular to this direction; we then build the pieces that lie in the same halfspace in
the direction given by the normal to the plane that is contained in the halfspace. Fig. 2 illustrates this (in
2D, for convenience).
The decomposition-based approach has the advantage that it allows the construction of large models
that cannot be accommodated in the workspace as a single piece. Moreover, the model can be built rapidly
by building the pieces in parallel. Speed is particularly important in the look and feel prototyping that
is the dominant use of RP today, since the goal here is to quickly get into the hands of the designer a
physical version of the model to assess its general feel and appearance, and to rapidly iterate on the design
until it is acceptable. In this context, the potential disadvantages of the decomposition-based approach
(i.e., inaccuracies that may result from manually gluing the pieces together and reduced strength across
the glued sections) are offset by the ability to build large models quickly in parallel.
A less obvious, but nevertheless crucial, advantage is that the support requirements of the decomposition-based approach are often much less than those of the conventional approach.5 For instance, if a
hollow sphere is built the conventional way, supports will be needed in the interior void and below the
lower hemisphere; however, if it is built as two hemispheric shells, in opposite directions, then supports
will be needed only in the regions previously occupied by the void, which results in an overall reduction
in both support volume and contact-area. Our experiments confirm substantial savings for various other
5 They can never be more, since the conventional approach corresponds to the special case where the decomposition plane
121
Fig. 2. The decomposition-based approach, shown in 2D for convenience. The polyhedron P is decomposed by a plane H into
polyhedra P + and P , which are then built in the indicated directions.
models as well. Reducing support requirements is important because this translates into lower material
costs and faster build times.
1.3. Contributions
We give the first provably correct and efficient geometric algorithms to decompose polyhedral (i.e.,
STL) models, with respect to a given decomposition direction, so that the support contact-area and,
independently, the support volume is minimized. We formalize this problem in Section 2. In Sections 3
and 4, we consider convex polyhedra and devise efficient, plane-sweep-based algorithms. We show how
to generate expressions for the support volume and contact-area as a function of the height of the sweep
plane, and how to optimize them during the sweep. We discuss our implementation of these algorithms
and the results of our experiments on convex polyhedra with up to 200,000 vertices.
It may be argued (quite reasonably) that real-life models are generally not convex, so the direct
relevance of the above algorithms is somewhat limited. Our original motivation for considering convex
polyhedra was to get a handle on the problem for the non-convex case, which is considerably more
difficult because of the complex structure of the supports (see Fig. 3). Indeed, we will see that our
approach for the convex case is one of the key building blocks to our solution for the non-convex case.
In Section 5, we show how to handle non-convex polyhedra by first identifying certain critical facets
(or parts thereof ) using a technique called cylindrical decomposition [29]. It turns out that the problem
can then be solved by applying to these critical facets the algorithm developed for the convex case. We
also give experimental results for typical non-convex polyhedra. Another key problem encountered in the
non-convex case (but not in the convex case) is to keep small the number of pieces in the decomposition.
We give an efficient technique for controlling the size of the decomposition of non-convex polyhedra, so
that the number of pieces generated is within a user-specified limit.
To the best of our knowledge, the only prior work related to this approach is due to Fekete and
Mitchell [16]. They consider the problem of decomposing a polyhedron into special polyhedra called
histograms, which can be built on certain base facets with no supports. They prove that deciding if a
122
polyhedron of genus zero can be decomposed into k histograms is NP-complete (this is true even in two
dimensions for a polygon with holes). Our work differs from [16] in that we seek a decomposition (with
respect to a given direction) into two polyhedra for which the total support requirement is minimized, but
not necessarily zero.
Fig. 3. Support structures (in light shading), shown in 2D for convenience. Supports in the non-convex case (left) exhibit
complexities not seen in the convex case (right): (i) they can rest partially on other parts of the polyhedron; (ii) only a fraction
of a facet may be in contact with supports; (iii) parallel facets can also be in contact with supports.
123
drop down from the edges of f , and from below by the platform and/or portions of front facets of P + .
(If P + is convex, then it is bounded from below by only the platform.) See Fig. 3 for an example in 2D.
The support contact-area for P + is the total surface area of P + that is in contact with supports. It
includes the area of all the back facets of P + , except P H , and the areas of those portions of front facets
and parallel facets that are in contact with supports. (Facet P H rests on the platform and hence needs
no supports. Note that while back facets are completely in contact with supports, front and parallel facets
may be only partially in contact.) The support volume for P + is the total volume of the support polyhedra
for all back facets f of P + (excluding P H ). A symmetric discussion applies to the polyhedron P .
We are now ready to state formally the problem that we wish to solve.
Problem 2.1. Given a polyhedron P, with n vertices, and a decomposition direction d, compute a plane
H perpendicular to d which decomposes P into polyhedra P + and P (as defined above) such that the
total support contact-area or support volume is minimized when P + and P are built in directions d and
d, respectively. Additionally, if the user specifies an integer K, then the plane H should be optimal
over all planes that generate no more than a total of K connected components of P + and P .
3. Decomposing a convex polyhedron to minimize contact-area of supports
In this section and in Section 4, we assume that P is convex. Thus P + and P are both convex and
the support polyhedron for a back facet of P + , or a front facet of P , extends from the facet all the way
to the platform, without intersecting any other facet (Fig. 3). Furthermore, parallel facets will not be in
contact with supports.6 These properties lead to an efficient algorithm for Problem 2.1, which we then
incorporate into a solution for non-convex polyhedra.
Our approach is based on sweeping the plane H upwards starting from the xy-plane (we assume
without lost of generality, that P lies above the xy-plane). Let H currently be at height h above the
xy-plane and let f be any facet of P. We classify f as an active or an inactive facet with respect to H
depending on whether or not f is cut by H . Intuitively, an inactive facet is completely contained in P +
or P and its contribution to the contact-area is not affected by small local movements of H . On the
other hand, an active facet is contained partially in P + and partially in P , and small movements of H
affect the facets contribution to the contact-area. Formally, we call f an active facet with respect to H
if H f = and at least one vertex of f is strictly above H . Otherwise, we call f an inactive facet with
respect to H .
It follows that if f is an inactive front facet then its contribution to the total contact-area is area(f )
if it is in P , and zero if it is in P + , where area(f ) is the area of f . If f is an active front facet, then
only the part, f , of f that lies below H is in P , so f contributes area(f ) to the total contact-area.
Symmetrically, if f is an inactive back facet, then its contribution to the total contact-area is area(f ) if
it is in P + , and zero if it is in P . If f is an active back facet, then only the part f + of f that lies above
H is in P + , so f contributes area(f + ) to the total contact-area.
The expression for the total contact-area of P + and P consists of two terms: the inactive-area term,
which is the contact-area contributed by the inactive facets, and the active-area term, which is the contactarea contributed by the active facets. If we move H up or down, without crossing a vertex, then the
6 Indeed, all references to facets in this section and in Section 4 mean non-parallel facets.
124
inactive-area does not change, since inactive facets become active, and vice versa, only when H crosses
a vertex. Therefore, the inactive-area term is simply a real number. However, the active-area changes
because the fraction of an active facet that contributes to the total contact-area changes as H is moved.
Lemma 3.1 below shows that the active-area term is a quadratic expression in h.
Lemma 3.1. Let the plane H be at height h above the xy-plane. The total contact-area contributed by
the active facets (i.e., the active-area) is of the form Ah2 + Bh + C, where the coefficients A, B, and C
depend only on the coordinates of the vertices of the active facets.
Proof. Let f be any active facet, with vertices vi = (xi , yi , zi ), vj = (xj , yj , zj ), and vk = (xk , yk , zk )
(Fig. 4). We will prove that the contact-area contributed by f is of the form af h2 + bf h + cf , where the
coefficients af , bf , and cf depend only on the coordinates of the vertices of f . This implies the result.
Note that by definition of an active facet, f is not contained in H . Without lost of generality, assume
that f is a front facet, that zi < zj zk , and that H intersects f between vi and vj . (The other cases are
similar and are discussed at the end of the proof.) Let H intersect edge vi vj at vij = (xij , yij , zij ) and
edge vi vk at vik = (xik , yik , zik ). We compute these intersection points as follows.
Let ij and ik be the lines containing vi vj and vi vk , respectively. For real-valued parameters t and r,
the equations of these two lines are:
ij :
x = xi + (xj xi )t,
y = yi + (yj yi )t,
z = zi + (zj zi )t,
ik :
x = xi + (xk xi )r,
y = yi + (yk yi )r,
z = zi + (zk zi )r.
and
Since zij = zik = h, the parameters t and r are given by
t=
h zi
,
zj zi
r=
h zi
.
zk zi
Let j = (xj xi )/(zj zi ), k = (xk xi )/(zk zi ), j = (yj yi )/(zj zi ), and k = (yk yi )/(zk
zi ). Then it follows that
xij = xi + j (h zi ),
yij = yi + j (h zi )
125
and
xik = xi + k (h zi ),
Let f
yik = yi + k (h zi ).
be the part of f below H ; f is a triangle with vertices vi , vij , and vik . Then
2 area(f ) = (v ij v i ) (v ik v i ),
126
In the algorithm to follow, we will need to optimize the active-area formula over a certain range of h
for which it is valid. We will show there how to handle these special cases.
3.1. The algorithm
We sweep the plane H upwards, starting at the lowest vertex of P. We stop at each vertex and update
the inactive-area and the active-area terms, based on the facets incident to the current vertex. We then
minimize the active-area term (hence the total contact-area) as the position, h, of H ranges between
the z-coordinates of the current vertex and the next one. This gives the optimal position for H between
successive vertices. We repeat this for all vertices to find the globally-best position for H .
Here is the algorithm in more detail:
In a preprocessing step, we sort the vertices of P according to non-decreasing z-coordinates, as v1 ,
v2 , . . . , vn (ties are broken arbitrarily). For each facet f P, we determine whether it is a front, a
back, or a parallel facet, and also compute area(f ). We set the active-area term identically equal to
zero and the inactive-area term equal to the total area of the back facets. We set the current minimum
contact-area equal to the sum of these two terms. We then scan the vertices in their sorted order.
Let v be the current vertex, 1 < n. For each facet f incident to v , we do the following:
Case 1: v is the lowest vertex of f . (Thus, f changes from inactive to active at v .) If f is a
back facet, then we subtract area(f ) from the inactive-area term. Using Lemma 3.1, we
compute and add the expression af h2 + bf h + cf to the active-area term, thereby including
the contribution of f + to the total contact-area when H is between z and z+1 . If f is a
front facet, then we update only the active-area term to include the contribution of f to the
total contact-area.
Case 2: v is the highest vertex of f . (Thus, f changes from active to inactive at v .) This case is
symmetric to Case 1. That is, if f is a back facet then we use Lemma 3.1 to compute and
subtract the expression af h2 + bf h + cf from the active-area term, thereby removing the
contribution of f + to the total contact-area when H is between z and z+1 . If f is a front
facet, then we update the active area term to remove the contribution of f , and we add
area(f ) to the inactive-area term.
Case 3: v is the middle vertex of f . Here f continues to be active, but the active-area term must be
updated since H intersects a different edge of f above v than it did below. We perform this
update using Lemma 3.1.
After one of the three cases above is executed for all facets f incident to v , we have a new activearea term Ah2 + Bh + C, which is valid for h in the interval [z , z+1]. We can minimize this term
using standard techniques from calculus: If A = 0, then the minimum is attained at h = B/2A if
B/2A [z , z+1 ], and at h = z or at h = z+1 otherwise. If A = 0 and B = 0, then the minimum
is attained at either h = z or at h = z+1 . If A = B = 0, then the active-area is constant in [z , z+1],
so we (arbitrarily) pick z as the optimum value of h. In any case, once the optimum h has been determined, we compute the total contact-area for this h and update the current minimum contact-area,
if necessary.
Theorem 3.1. The contact-area version of Problem 2.1 can be solved in O(n log n) time for a convex
polyhedron P with n vertices (O(n) time if the vertices are given in sorted order in the decomposition
direction d).
127
Proof. The correctness of the algorithm follows from the earlier discussion. The initialization time is
dominated by the O(n log n) time to sort the vertices. At each vertex v , the incident faces can be accessed
in constant time apiece, since P is given as a doubly-connected edge list. The time to update the activearea and inactive-area terms is proportional to the degree of v . The minimization of the active-area
term takes constant time. Summing over all vertices, the sweep time is O(n) since the sum of the vertex
degrees in P is O(n). The claimed time bound follows.
3.2. Experimental results
We have implemented the above algorithm and tested it on several convex polyhedra. The program is
written in C++, and performs floating point computations in double-precision. The tests were done on a
SUN Ultra 10 Sparc machine with 256 MB of main memory and a 440 MHz processor.
We generated two classes of test polyhedra. For the first class, we generated for each n, a set of n
points at random on a sphere of radius 100 centered at the origin. (In our experiments, n ranged from
20,000 to 200,000, in steps of 20,000.) We then computed the convex hull of these n points using the
qhull program [10], and used it as our test polyhedron. (Since the n points were in convex position, all
of them appeared on the convex hull. Also, we set the parameters to qhull such that it did not merge
coplanar facets; thus all facets were triangles.) Table 1 shows the running times of our program and the
minimum contact-area computed. To illustrate the savings realized by decomposition, we also computed
the contact-area without decomposition in each case.
Table 1
Minimum support contact-area for convex polyhedra generated from random
points on a sphere of radius 100. Here non-decomp. contact-area refers to
the support contact-area when the polyhedra are built without decomposition; observe the significant reductions achieved via decomposition. Note
that the support contact-area without decomposition is roughly equal to the
area of the lower hemisphere, as it should be
Support contact-area
#verts
n
min
contact-area
hmin
run time
(s)
non-decomp.
contact-area
20,000
579.0
0.14
0.6
62,708.1
40,000
424.2
0.04
1.2
62,832.6
60,000
338.6
0.04
2.0
62,803.7
80,000
286.6
0.05
2.7
62,802.5
100,000
274.6
0.02
3.5
62,840.0
120,000
243.6
0.05
4.2
62,864.0
140,000
226.4
5.0
62,824.7
160,000
211.6
0.01
5.8
62,833.2
180,000
191.2
0.03
6.5
62,845.1
200,000
174.7
0.02
7.4
62,814.9
128
mean run
time (s)
non-decomp.
contact-area
7,752.6
3.2
0.6
55,300.5
37
11,705.0
2.3
40
12,193.1
2.7
75
3,973.7
0.7
240
7,037.8
0.5
112
5,315.5
0.5
80
2,714.5
150
10,108.5
1.5
280
2,649.1
187
3,447.8
3.6
120
7,018.4
0.2
225
11,908.1
1.0
320
12,209.7
1.2
263
1,967.0
0.1
160
7,657.2
2.1
300
6,962.6
0.2
5.0
1.7
338
8,175.7
1.5
200
7,625.8
2.1
15
6,198.2
3.4
#verts
n
angle
20,001
200
40,001
60,001
80,001
10,0001
120,001
140,001
160,001
180,001
200,001
min
contact-area
57,111.7
1.3
58,304.3
52,005.6
2.0
55,082.1
55,068.2
2.8
52,272.1
51,825.6
3.6
52,160.8
59,820.0
4.3
55,068.5
49,168.8
5.1
58,237.1
54,011.3
5.9
55,325.7
51,425.1
6.7
44,798.2
51,938.3
7.5
55,297.5
49,509.5
As one might expect, the test polyhedra generated above were quite symmetric about the origin. As a
result, the optimum decomposition plane was always close to the xy-plane. Therefore, we also generated
a second set of polyhedra that did not exhibit such symmetry. For this, we used qhull to generate n + 1
points at random on a cone whose major axis was along the z-axis, for n in the range 20,000200,000
(the additional point was the apex of the cone). We then rotated the cone by a randomly chosen angle to
129
make it non-symmetric about the origin. For each n, we generated two non-symmetric test polyhedra in
this fashion. Table 2 shows our results; here angle refers to the angle by which the cone was rotated.
For each input size, the running times on the two polyhedra were nearly the same; therefore, we averaged
the times. This closeness in run times is to be expected since the complexity of the algorithm depends
primarily on the graph structure of P, which is the same regardless of orientation. In fact, since the graph
is fully triangulated, the number of edges and faces are the same for different polyhedra with the same
number of vertices. This is borne out by Tables 1 and 2.
3.3. Discussion
One might wonder if there is always an optimal solution where the plane H passes through a vertex
of P, thus obviating the need to minimize the active-area formula in between successive vertices. In this
section, we show that this is not the case by proving that for the pyramid P of Fig. 5 the optimal plane
does not contain any vertex.
In what follows, we will use the notation vi , vj , vk to denote a facet (triangle) of P that is bounded
by vertices vi , vj , and vk .
It is easy to verify that
2 area v1 , v3 , v2 = (v 3 v 1 ) (v2 v 1 ) = 6,
2 area v1 , v2 , v4 = (v 4 v 1 ) (v2 v 1 ) = 6,
2 area v2 , v3 , v4 = (v 3 v 2 ) (v4 v 2 ) = 8.
Note that facet v1 , v3 , v4 is a parallel facet for the indicated decomposition direction d, and, therefore,
does not contribute to the contact-area.
We now compute the total contact-area for P + and P for each decomposition plane H that passes
through a vertex of P.
Fig. 5. A polyhedron for which the decomposition plane realizing the minimum contact-area does not pass through a vertex.
130
1.5
,
2 area v23 , v13 , v3 = (v 23 v 3 ) (v 13 v 3 ) =
4
1.5
.
2 area v14 , v4 , v24 = (v 14 v 4 ) (v 24 v 4 ) =
4
Thus, the total contact-area is (1/2)1/ 2 + (1/2) 1.5/4 + (1/2) 1.5/4 = 0.660, which is less than
any of the contact-areas computed in Cases 13. This proves that the decomposition plane that realizes
the minimum contact-area need not pass through any vertex of P. It turns out that, for this example, the
optimal plane is H : z = 0.46, and the corresponding total contact-area is 0.656. (This was computed by
our program in Section 3.2.)
131
Each support polyhedron for P + is bounded from above by a back facet, on the sides by vertical edges
emanating from the edges of the facet, and from below by the decomposition plane H . A symmetric
discussion applies for P .
For any given decomposition plane H : z = h, the expression for the support volume consists of two
terms. The inactive-volume term and the active-volume term, which are, respectively, the total volumes
of the support polyhedra contributed by the inactive and the active facets. If we move H up or down
without crossing a vertex, the active-volume as well as the inactive-volume changes (unlike contact-area,
where only the active-area changes). Lemma 4.1 below proves that the active-volume term is cubic in h,
and Lemma 4.2 shows that the inactive-volume is linear in h.
Lemma 4.1. Let the plane H be at height h above the xy-plane. The total support volume contributed
by the active facets (i.e., the active-volume) is of the form Ah3 + Bh2 + Ch + D, where the coefficients
A, B, C, and D depend only on the coordinates of the vertices of the active facets.
Proof. Let f be any active facet, with vertices vi = (xi , yi , zi ), vj = (xj , yj , zj ), and vk = (xk , yk , zk ),
where zi < zj , zi < zk and let the vertices vi , vj , and vk be in counterclockwise order when viewed
from the outside of P (i.e., (v j v i ) (v k v i ) has the same direction as the outward unit-normal,
nf , to f ). Clearly, it suffices to prove that the support volume contributed by f is of the form
af h3 + bf h2 + cf h + df , where the coefficients af , bf , cf , and df depend only on the coordinates
of the vertices of f .
Note that, by definition of an active facet, f is not contained in H . Assume that H intersects edges
vi vj and vi vk , so that f is a triangle and f + is a quadrilateral. (The other cases are similar and are
discussed at the end of the proof.) If f is a front facet, then it contributes a support polyhedron only to
P , whereas if f is a back facet, then it contributes a support polyhedron only to P + . Let us denote this
support polyhedron by Rf . Let vi
, vj
, and vk
be the vertical projections of vi , vj , and vk , respectively, on
H . If f is a front facet, then Rf is defined by the vertices vi , vi
, vij , and vik (Fig. 6); if f is a back facet,
then Rf is defined by the vertices vij , vik , vj
, vk
, vj , and vk (Fig. 7). Our goal is to find a formula for the
volume, vol(Rf ), of Rf in each case.
Let Sj , 1 j r be the facets of Rf , for some positive integer r. Let N j be the outward unit-normal
to Sj (outward with respect to Rf , not P). Let Qj be any point on Sj and let Qj be the position vector
of Qj . From [18] we have
1
(1)
vol(Rf ) = (Qj N j )area(Sj ).
3 j
We next consider the two possibilities for f separately.
Case 1. f is a front facet of P (Fig. 6).
In this case Rf is bounded by the following facets:
S1 :
S2 = f :
S3 :
S4 :
vi , vij , vi
vi , vik , vij
vi , vi
, vik
vi
, vij , vik
132
Fig. 6. The support polyhedron, Rf , contributed by an active front facet f . Rf is defined by the vertices vi , vi , vij , and vik .
Table 3
Facet
Point Qj
Normal N j
S1
vi
(v j v i ) d/|(v j v i ) d|
S2
vi
nf
S3
vi
d (v k v i )/|d (v k v i )|
S4
vi
Table 3 shows N j and the point Qj for each facet Sj . We have chosen Qj such that subsequent
calculations become simple.
Note that all the dot products Qj N j , except for Q4 N 4 , depend only on f (and d, which is fixed);
the dot product Q4 N 4 = h. We now generate an expression for each area(Sj ).
Expression for area(S1 ):
Consider the vertical projection, vi
, of vi on the plane passing through vj and parallel to H .7
Facet S1 is simply the triangular portion of vi , vj , vi
lying below H . From the proof of
Lemma 3.1
area(S1 ) = (h zi )2
area(vi , vj , vi
)
,
(zj zi )(zj zi )
133
(2)
for some coefficients af(1) , bf(1) , and cf(1) that depend only on the coordinates of the vertices of f .
Expression for area(S2 ):
From the proof of Lemma 3.1 it is immediate that
area(S2 ) = af(2) h2 + bf(2) h + cf(2) ,
(3)
for some coefficients af(2) , bf(2) , and cf(2) that depend only on the coordinates of the vertices of f .
Expression for area(S3 ):
The discussion here is identical to the one for area(S1 ), except that we use the vertical projection,
vi
, of vi on the plane passing through vk and parallel to H . Therefore,
area(S3 ) = (h zi )2
area(vi , vk , vi
)
,
(zk zi )(zk zi )
where area(vi , vk , vi
) = |(v k v i ) (v
i v i )|/2, and v i v i = (0, 0, zk zi ). It follows
that area(S3 ) can be written in the form
(4)
for some coefficients af(3) , bf(3) , and cf(3) that depend only on the coordinates of the vertices of f .
Expression for area(S4 ):
Now, area(S4 ) is simply the area of the projection of f on H , and is hence equal to area(f )
times the cosine of the angle between H and the plane containing f . Therefore, area(S4 ) =
area(f )(nf d).
Recall from the proof of Lemma 3.1 that area(f ) is quadratic in h. It follows that area(S4 ) can
be written in the form
area(S4 ) = af(4) h2 + bf(4) h + cf(4) ,
(5)
for some coefficients af(4) , bf(4) , and cf(4) that depend only on the coordinates of the vertices of f .
Let us denote by active-volume f (h) the support volume contributed by an active facet f with respect
to the plane H : z = h. From Eqs. (2)(5) and the fact that Q4 N 4 = h, we have
4
(j ) 2
1
(j )
(j )
active-volume f (h) = (Qj N j ) af h + bf h + cf
3
j =1
3
(j ) 2
(4) 2
1
(j )
(j )
(4)
(4)
= (Qj N j ) af h + bf h + cf + h af h + bf h + cf
3 j =1
134
Fig. 7. The support polyhedron, Rf , contributed by an active back facet f . Rf is defined by the vertices vj , vk , vij , vik , vj
,
and vk
.
3
1 (4) 3
(j )
(4)
= af h + bf +
(Qj N j )af h2
3
j =1
+
cf(4)
3
3
(j )
(Qj N j )cf .
h+
(j )
(Qj N j )bf
j =1
j =1
Therefore,
active-volume f (h) = af h3 + bf h2 + cf h + df ,
(6)
for some coefficients af , bf , cf , and df that depend only on the coordinates of the vertices of f .
Case 2. f is a back facet of P (Fig. 7).
In this case Rf is bounded by the following facets:
S1 : vik , vk
, vk
S2 = f + : vik , vk , vj , vij
S3 : vij , vj , vj
S4 : vj , vk , vk
, vj
S5 : vij , vj
, vk
, vik
Table 4 shows N j and the point Qj for each facet Sj . Again, we have chosen Qj such that subsequent
calculations become simple.
Note that all the dot products Qj N j , except for Q5 N 5 , depend only on f (and d, which is fixed);
the dot product Q5 N 5 = h. We now generate an expression for each area(Sj ).
135
Table 4
Facet
Point Qj
Normal N j
S1
vk
d (v i v k )/|d (v i v k )|
S2
vk
nf
S3
vj
d (v j v i )/|d (v j v i )|
S4
vj
d (v k v j )/|d (v k v j )|
S5
vk
(7)
for some coefficients af(1) , bf(1) , and cf(1) that depend only on the coordinates of the vertices of f .9
Expression for area(S2 ):
From the proof of Lemma 3.1 it is immediate that
area(S2 ) = af(2) h2 + bf(2) h + cf(2) ,
(8)
for some coefficients af(2) , bf(2) , and cf(2) that depend only on the coordinates of the vertices of f .
Expression for area(S3 ):
The discussion is identical to the one above for area(S1 ), except that we use the projection vj
of
vj on the plane passing through vi and parallel to H . Therefore,
area(S3 ) = (h zj )
2
area(vi , vj , vj
)
(zi zj )(zi zj )
af(3) ,
bf(3) ,
and
cf(3)
(9)
that depend only on the coordinates of the vertices of f .
136
(10)
where af(4) = 0, and bf(4) and cf(4) depend only on the coordinates of the vertices of f .
Expression for area(S5 ):
Let fH be the vertical projection of f on the plane H , with vertices vi
, vj
, and vk
, corresponding
to vi , vj , and vk , respectively. (Note that vij and vik get projected to themselves.) Then
area(S5 ) = area(fH ) area vi
, vij , vik .
Now area(vi
, vij , vik ) has already been computed in Case 1 (Eq. (5)). Moreover, area(fH ) =
(((v j v i ) (v k v i )) d)/2.
Since the former is quadratic in h and the latter is a constant, it follows that area(S5 ) is quadratic
in h. Thus,
area(S5 ) = af(5) h2 + bf(5) h + cf(5) ,
(11)
for some coefficients af(5) , bf(5) , and cf(5) that depend only on the coordinates of the vertices of f .
From Eqs. (7)(11) and the fact that Q5 N 5 = h, we have
5
(j ) 2
1
(j )
(j )
active-volumef (h) = (Qj N j ) af h + bf h + cf
3 j =1
4
(j ) 2
1
(j )
(j )
= (Qj N j ) af h + bf h + cf h af(5) h2 + bf(5) h + cf(5)
3 j =1
4
1 (5) 3
(j )
(5)
(Qj N j )af h2
= af h + bf +
3
j =1
4
4
(j )
(j )
+ cf(5) +
(Qj N j )bf h +
(Qj N j )cf .
j =1
j =1
Therefore,
active-volumef (h) = af h3 + bf h2 + cf h + df ,
(12)
for some coefficients af , bf , cf , and df that depend only on the coordinates of the vertices of f .
The lemma now follows if we sum the active-volume contributions of all front and back facets,
using Eqs. (6) and (12), respectively.
137
We now discuss how to handle the other cases mentioned at the beginning of the proof. Let H
intersect f such that f is a quadrilateral and f + is a triangle. If f is a back facet, then we
can use the discussion from Case 1 to compute the active-volume. Suppose that zi > zj , zi > zk ,
and the vertices vi , vj , and vk are in counterclockwise order with respect to nf . All the formulas
for the facet areas still apply. However, the directions of the normals N j must now be reversed
(except for N 2 ). Also, now Q4 N 4 = h, and therefore the coefficients of area(S4 ) in the
active-volume formula must be taken with opposite signs.
If f is a front facet we use the discussion from Case 2 to compute the active-volume. Again,
suppose that zi > zj , zi > zk , and the vertices vi , vj , and vk are given in counterclockwise order
with respect to nf . All the formulas for the facet areas still apply. However, the directions of the
normals N j must now be reversed (except for N 2 ). Also, now Q5 N 5 = h, and therefore the
coefficients of area(S5 ) in the active-volume formula must be taken with opposite signs.
Next we obtain an expression for the inactive-volume.
Lemma 4.2. Let the plane H be at height h above the xy-plane. The total support volume contributed
by the inactive facets (i.e., the inactive-volume) is of the form Ch + D, where the coefficients C and D
depend only on the coordinates of the vertices of the inactive facets.
Proof. Let f be any inactive back facet with vertices vi = (xi , yi , zi ), vj = (xj , yj , zj ), and vk =
(xk , yk , zk ), where zi zj zk ; see Fig. 8. (The other cases are similar and discussed at the end of
Fig. 8. The support polyhedron Tf = Tfconst Tfvar contributed by an inactive back facet f . Tfconst is defined by the vertices
vi , vj , vk , vj
, and vk
. Tfvar is defined by vi , vi
, vj
, vk
, vj
, and vk
.
138
the proof.) We will prove that the support volume contributed by f is of the form cf h + df where the
coefficients cf and df depend only on the coordinates of the vertices of f . This implies the result.
Since f is an inactive back facet it will contribute to the support volume only if H is below f . Let vj
and vk
be the projections of vj and vk , respectively, on the plane passing through vi and parallel to H .
Let vi
, vj
, and vk
be the projections of vi , vj , vk , respectively, on H . We would like to find a formula for
the volume of the polyhedron, Tf , defined by the vertices vi , vj , vk , vi
, vj
and vk
.
Tf consists of two polyhedra. The first, denoted Tfconst , is defined by vi , vj , vk , vj
, and vk
, and the
second, denoted Tfvar , is defined by vi , vi
, vj
, vk
, vj
, and vk
. As long as H is below f (i.e., f is inactive),
the volume of Tfconst does not change when H is moved. The volume, vol(Tfconst ), of Tfconst can, in fact,
be computed using Eq. (12) in Lemma 4.1, evaluated at h = zi .
The polyhedron Tfvar is a prism with base vi , vk
, vj
, and height zi h. The volume, vol(Tfvar ), of
var
Tf can be computed as
vol Tfvar = area vi , vk
, vj
(zi h),
where area(vi , vk
, vj
) is just the area of the vertical projection of f onto the plane z = zi , and depends
only on the coordinates of the vertices of f . (It can also be computed using Eq. (11) in Lemma 4.1,
evaluated at h = zi .)
Let us denote by inactive-volume f (h) the support volume contributed by an inactive facet f , with
respect to the plane H : z = h. Then
Table 5
Minimum support volume for convex polyhedra generated from random
points on a sphere of radius 100. Here non-decomp. volume refers to
the support volume when the polyhedra are built without decomposition;
observe the significant reductions achieved via decomposition. Note that
the support volume without decomposition is roughly equal to the volume
under the lower hemisphere, as it should be
Support volume
#verts
n
min
volume
hmin
run time
(s)
non-decomp.
volume
20,000
2.7
0.17
4.1
1,046,037.3
40,000
1.0
0.02
8.2
1,047,241.1
60,000
0.6
0.08
12.6
1,047,256.4
80,000
0.3
0.04
16.7
1,047,234.3
100,000
0.3
20.9
1,047,201.5
120,000
0.2
0.03
25.5
1,047,197.6
140,000
0.2
0.02
29.7
1,047,167.5
160,000
0.1
34.1
1,047,192.4
180,000
0.1
0.02
37.9
1,047,188.5
200,000
0.1
0.03
43.2
1,047,200.0
139
Table 6
Minimum support volume for convex polyhedra generated from random points on a
cone; each polyhedron has been rotated by the indicated angle to make it non-symmetric
about the origin. Here non-decomp. volume refers to the support volume when the
polyhedra are built without decomposition; observe the significant reductions achieved
via decomposition
Support volume
#verts
n
angle
min
volume
hmin
mean run
time (s)
non-decomp.
volume
20,001
200
10,999.5
21.1
4.2
965,039.4
37
26,389.1
21.5
40
24,003.9
21.2
75
3,631.2
4.4
240
12,900.6
4.1
112
8,118.6
2.4
80
1,359.2
4.2
150
20,249.8
24.6
280
1,349.3
4.2
187
1,068.5
10.7
120
12,892.3
4.1
225
13,784.8
19.8
320
22,932.9
21.4
263
549.0
3.2
160
10,760.1
21.2
300
12,908.9
4.0
40,001
60,001
80,001
100,001
120,001
140,001
160,001
180,001
200,001
1.7
338
14,356.3
21.2
200
10,749.7
21.2
15
6,736.2
17.2
1,107,383.9
8.6
947,591.6
994,452.0
12.7
815,518.8
865,432.8
17.3
1,014,386.0
887,435.1
21.5
1,014,432.7
1,033,711.3
25.8
815,171.4
767,197.8
30.3
948,013.1
959,299.2
34.7
962,983.8
849,211.7
39.5
2,128,798.5
1,754,483.3
43.6
962,390.9
1,952,343.8
inactive-volume f (h) = vol Tfvar + vol Tfconst
= area vi , vk
, vj
(zi h) + vol Tfconst
= cf h + df ,
for some coefficients cf and df that depend only on the coordinates of the vertices of f .
(13)
140
141
142
is completely in contact with supports. Therefore, it follows that ts contribution to the total contactarea depends on the position of H . In fact, this contribution is exactly the same as for a front facet in
the convex case. That is, if t is inactive, then its contribution is zero or area(t); if t is active, then its
contribution is a quadratic function of the position, h, of H , as in Section 3.
So far, we have considered the case where the facet f P is a front facet. If f is a back facet of P
then we define the black and gray triangles on f by building P, without decomposition, in direction d.
Then a discussion symmetric to the one above again shows that, in the case with decomposition, only
gray triangles need be considered.
Finally, we turn to the case where f is a parallel facet. Suppose that we build P without decomposition
in direction d, and, independently, in direction d. The black polygons consist of all points on f that
are in contact with supports for both directions. The gray polygons consist of all points on f that are in
contact with supports for exactly one of the two directions. The white polygons consist of all points on
f that are not in contact with supports for either of the two directions. By definition, these polygons
partition f . The set Bf (respectively Gf , Wf ) of black (respectively gray, white) triangles on f is
obtained by triangulating the black (respectively gray, white) polygons.
Now suppose that we build P with decomposition. It is easy to see that regardless of the position
of the decomposition plane H , a black triangle will always be in contact with supports, while a white
triangle will never be in contact with supports. Therefore, both these types of triangles may be ignored.
However, a gray triangle will contribute to the contact-area an amount which depends on the position of
H . For instance, let t Gf be a gray triangle which exists because f is in contact with supports when
P is built, without decomposition, in direction d. Then, in the case with decomposition, t + is in contact
with supports and t is not. So the contribution of t to the total contact-area varies quadratically with the
position, h, of H , from zero to area(t). So, again only gray triangles need to be considered.
5.3. Computing black and gray triangles for front and back facets
We discuss how to to compute the footprint of the supports on each front facet, hence the black and
gray triangles on it.
We will use a technique called cylindrical decomposition [29]. From each edge, e, of each back
facet, b, we erect a strip, Ve,b , which passes exactly through e and extends vertically downwards, in
direction d. As soon as a part of Ve,b intersects another facet of P (which must be a front facet), we
stop propagating that part below the intersected facet; however, we continue propagating the remaining
parts of Ve,b .10 Each such intersection of Ve,b with a front facet will be a part of the footprints that we are
trying to compute.
To perform this step efficiently, we compute the intersection of each front facet with Ve,b to get a
set, L, of line segments. (Since the facets of P do not intersect each other, the segments in L are noncrossing, but possibly touching.) We do a trapezoidal decomposition [13] of L {e} in the plane of Ve,b .
We identify each trapezoid in this decomposition that is adjacent to e at the top and to a line segment
L at the bottom. The bottom edge of this trapezoid is one of the sought intersections of Ve,b with a
front facet. We store this edge with the front facet that generated .
However, not all footprints on front facets will be discovered by the above process. For instance, if the
projection of b completely covers a front facet, f , below it, then none of the strips Ve,b erected from b
10 The process resembles water cascading down from e.
143
will intersect f , and, yet, supports for b will rest on f . To handle such situations, we also erect from
each edge, e, of each front facet, f , a strip Ve,f vertically upwards, stopping the propagation of any part
of the strip as soon as it intersects a (back) facet above it, while continuing to propagate other parts. To
compute these intersections we do a trapezoidal decomposition of the set L
{e}, where L
contains the
intersections of all the back facets with Ve,f . For each trapezoid in this decomposition that is incident to e
at the bottom and to a segment
L
at the top, we take the top edge of the trapezoid as the intersection
of Ve,f with the back facet that generated
, and store it with that back facet.
After we have carried out the above steps for all front and back facets, we have associated with each
facet a list of line segments corresponding to intersections of the different vertical strips with the facet.
Since a strip is not propagated below an intersected facet, it is easy to see that the line segments associated
with a facet are non-crossing (but may be touching). For each facet, we compute the arrangement [13] of
the set consisting of the associated segments and the edges bounding the facet.
Let f be any front facet and let c be any cell of the arrangement computed on f . Then c is the
footprint of a support on f for build direction d, hence a black polygon, iff there is a cell c
on a back
facet b above f , such that c
projects exactly to c. (The cells c and c
form the bottom and top facets of a
support cylinder; the other facets of this cylinder are vertical and bounded below and above by edges of
c and c
.) Any other cell of f is a gray polygon.
We can identify the black triangles of f directly (instead of first computing the black polygons). We
project the arrangement on each front facet to the xy-plane, triangulate its cells, and then lift the triangles
back to the front facet. We make a list, F , of these lifted triangles along with their centroids, and sort F
lexicographically on the x-, y-, and z-coordinates of the centroids, taken in that order. We make a similar
sorted list B for the the back facets. Note that if a cell, c, from a front facet and a cell, c
, from a back
facet form the bottom and top facets of a support cylinder, then c and c
have identical projections on
the xy-plane and will, therefore, be triangulated identically (if a deterministic triangulation algorithm is
used, e.g., [13, Chapter 3]). It should be clear now that a simultaneous scan of the two sorted lists suffices
to identify matching pairs of triangles, where one triangle is from B and the other is from F such that
the former is above the latter and projects exactly to it. For each matching pair, the triangle from F is a
black triangle on some front facet; all unmatched triangles of F are gray triangles on front facets. (This
approach for matching triangles, using a lexicographic sort, is due to [11].)
In this way, we can compute all the black and gray triangles for each front facet. A symmetric approach
yields the black and gray triangles for the back facets.
Lemma 5.1. The set of black and gray triangles for all front and back facets of an n-vertex polyhedron
P can be computed in O(n2 log n) time.
Proof. Correctness is clear from the discussion above. We establish the running time.
The number of line segments generated by intersecting front facets with any strip Ve,b is O(n), so
their trapezoidal decomposition has size O(n) and can be computed in time O(n log n) per strip, hence
O(n2 log n) for all strips.
The total number of segments (intersections) created on all the front facets of P by the propagation of
any Ve,b is O(n). This is because the trapezoidal decomposition has O(n) trapezoids and the segments of
interest are the bottom edges of a subset of these trapezoids. Since there are O(n) Ve,b s, the total number
of segments generated by them on all front facets is O(n2).
144
145
Lemma 5.2. The set of black, gray, and white triangles for all parallel facets of an n-vertex polyhedron
P can be computed in O(n2 log n) time.
Proof. The correctness of the method is clear from the above discussion. For the running time, note
that the sets A and A
each have size O(n) and can be computed in O(n) time. Doing the trapezoidal
decomposition and computing Tf and Tf
takes O(n log n) time. Finally, sorting and scanning the lists
and computing the different polygons takes O(n log n) time. Therefore each of the O(n) parallel facets
can be handled in time O(n log n), and the lemma follows.
5.5. Decomposing to minimize contact-area
At this point, we have for each front, back and parallel facet of P, a list of the black, gray, and white
polygons. As discussed in Section 5.2, only the gray triangles are relevant when decomposing P to
minimize the contact-area of supports. We store the subdivision defined by the union of the set of gray
146
triangles in a doubly-connected edge list and perform a sweep over them as in Section 3 to compute
the optimum decomposition plane H . (Even though the algorithm in Section 3 is for convex polyhedra,
the sweep does not depend on convexity per se, and so it works for our collection of gray triangles as
well.)
As seen above, the set of gray triangles can be computed in time O(n2 log n). Also, from the proofs of
Lemmas 5.1 and 5.2, the number of gray triangles is O(n2). The time to sort the vertices of the induced
subdivision by z coordinates, in preparation for the sweep, is O(n2 log n). During the sweep, each vertex
can be processed in time proportional to its degree, which implies a time bound of O(n2 ) for processing
all vertices, since the subdivision has O(n2) edges.
As noted at the beginning of Section 5, the volume minimization problem is easier, and essentially the
same approach works for this also. We will see in Section 5.7 that the size of the decomposition can be
controlled in O(n log n) time. We conclude:
Theorem 5.1. The contact-area and support volume versions of Problem 2.1 can be solved in O(n2 log n)
time for a non-convex polyhedron P with n vertices.
5.6. Experimental results
Our primary goal was to investigate the extent of support reduction achievable via decomposition
of typical models. Therefore, for convenience, we implemented a simpler, but slower, version of the
algorithm described above, for support volume minimization. The algorithm differs mainly in how the
footprints are computed instead of using the earlier algorithm for cylindrical decomposition, we use a
somewhat less efficient approach, as follows.
Let f be a fixed front facet and let b be any back facet. We project f and b to the xy-plane and compute
the intersection of their projections (i.e., triangles), which yields a convex polygon, C(b). If C(b) = ,
then let p be any point in it, say the centroid. If the pre-images, pf and pb , of p on f and b, respectively,
are such that pb is above pf in direction d, then pf is in contact with supports. This implies that the
pre-image Cf (b) of C(b) on f is in contact with supports. This follows since no facet of P pierces
another, so there cannot be another point p
in C(b), whose pre-images on f and b are in the opposite
order from those of p. (Note that it need not be the case that the cylinder bounded by Cf (b) and by Cb (b)
the pre-image of C(b) on b is a support cylinder, since b, or parts thereof, need not be immediately
above f ; there could be parts of other back facets in between.) Given the polygons C(b) that are found
to be in contact with supports, we can compute the footprint of supports on f by taking the union of
the pre-images, Cf (b), of these polygons. (In our implementation, we used the functions provided by
LEDA [28] to perform the union and intersection operations.) We triangulate the footprint (respectively
the complement of the footprint) on f to get the black (respectively gray) triangles on f . We handle
back facets in a symmetric fashion, using direction d instead of d. Thereafter, we apply the sweepbased algorithm on the set of all gray triangles to compute the optimum position of the decomposition
plane.
The most expensive part of this algorithm turns out to be the union step in the computation of the
footprints. Note that the algorithm simply projects all back facets down to the xy-plane, without regard
to any intervening facets. Thus, the complexity of the union of the polygons C(b) on a single front facet,
f , can be .(n2) in the worst case, and .(n3) over all front facets. (An example of this is a configuration
of .(n) front facets stacked on top of each other and .(n) back facets above them that overlap in the
147
Fig. 10. Non-convex models tested. Here z-span denotes the span of coordinates in the z-direction; it is given to help visualize
the position, hmin , of the decomposition plane. The decomposition direction, d, points vertically upwards.
form of a trellis. Notice that this situation would not create a problem for cylindrical decomposition,
since there we do not project through intervening front facets.) The total time to compute the union is
O(n2 log n) in the worst case for any front facet [13], hence O(n3 log n) over all front facets.
We performed our experiments on the six models shown in Fig. 10. The first five models were obtained
from Stratasys, Inc., a Minnesota-based company specializing in LM. To keep the running time of our
algorithm on these models reasonable, we reduced the number of facets in some of the larger models
specifically, 0-2190.stl (to about 25% of its original number), speedo.stl (to about 15%),
and engine2.stl (to about 18%). For this we used the Decimator software package from Raindrop
Geomagic, Inc., a North Carolina-based company specializing in the design of CAD software. This
package reduces model sizes while preserving the original topology to the maximum extent possible.
The sixth model, cc.stl, was hand-generated; it is used to show that on some models our algorithm
may not achieve any reduction in support requirements.
Table 7 summarizes our experimental results for the six models. To give an idea of the relative sizes
of the models, the table also gives the dimensions of their axes-parallel bounding boxes. The models are
listed in the table in decreasing order of the reduction in support volume that is achieved (the sixth column
divided by the fourth). On the first four models, our algorithm achieved a reduction ranging from a factor
of seven to about a factor of four. On the fifth model, it achieved a reduction of about 1.4. It achieved no
reduction at all on the last model, cc.stl, which is essentially a hollow cube, with walls of thickness 1
and with four holes on the top face. If this model is built without decomposition, the interior of the cube
will be filled with supports, except for the regions directly below the holes. Any decomposition plane
that intersects the model strictly above the inner base (which is at height 1), will generate two pieces for
which the total support volume is higher than without decomposition, since the region in the lower piece
that was originally below the holes is now filled with supports. The optimal position for decomposition
is any height in the interval [0, 1].
148
Table 7
Experimental results for non-convex models. Experiments were performed on a SUN Ultra 60 Sparc machine with 512 MB of
main memory and a 450 MHz processor
model
# facets
min
volume
hmin
non-decomp.
volume
run
time (s)
bounding box
lwh
0-2190.stl
3,492
0.1
0.0
0.7
16,661
speedo.stl
2,500
0.9
1.9
5.1
15,730
mj.stl
2,832
1.7
2.1
8.1
13,911
r59043b.stl
3,386
0.8
0.4
3.0
20,833
engine2.stl
4,180
174.9
1.3
251.6
41,156
cc.stl
112
823,210.0
1.0
823,210.0
4.7
149
is already in the Union-Find-Makeset data structure we do the following. If u and v are in different
connected components, then we union the sets containing u and v, and decrement c by one. Notice that
in this sweep, we only add edges to P , so the connected components of P always merge, never split.
Thus, a Union-Find-Makeset structure suffices to maintain the connected components of P . After all
vertices of Vj have been processed, we set kj to c. At the end of the sweep, all the intervals [zj , zj +1 ),
and their associated integers kj will have been computed.
Excluding the O(n log n) time for the sorting, the algorithm takes O(n(n)) time, where (n) is the
slow-growing inverse Ackerman function. Hence this preprocessing step does not affect the asymptotic
running time of the decomposition algorithm of Section 5.5.
150
Unfortunately, the approach in Section 5 (where facets are decomposed into black, gray, and white
triangles) does not extend to methods 24 when P is non-convex. Consider, for instance, method 2.
Let t be a black triangle from a front facet and assume that H intersects t. Now, t + is completely in
contact with supports, since it is built in direction d. However, the structure of the supports that will
be in contact with t depends on the (yet-to-be-built) portion of P that is above H , which can be quite
complex. (This problem did not arise in method 1, for reasons discussed at the beginning of Section 5.2.)
Similar problems arise in method 3 for a black triangle belonging to a front facet and in method 4 for a
black triangle belonging to a back facet. At present, we do not know how to overcome these difficulties
and it appears that a different approach will be needed.
Throughout the paper, we have assumed a fixed decomposition direction d and found an optimum
plane that is normal to d. A challenging next step is to consider the problem of computing, over all
directions d, an optimum decomposition plane (while also limiting the number of pieces). The methods
developed in this paper could be useful in computing such a plane once a small set of candidate directions
has been identified.
Acknowledgements
We thank Stratasys, Inc. for providing us with STL files for our experiments. We also thank the referees
for helpful comments that improved the paper substantially.
References
[1] P. Agarwal, P. Desikan, Approximation algorithms for layered manufacturing, in: Proceedings of the Eleventh Annual
ACM-SIAM Symposium on Discrete Algorithms, 2000, pp. 528537.
[2] S. Allen, D. Dutta, Determination and evaluation of support structures in layered manufacturing, J. Design Manufacturing 5
(1995) 153162.
[3] B. Asberg, G. Blanco, P. Bose, J. Garcia-Lopez, M. Overmars, G. Toussaint, G. Wilfong, B. Zhu, Feasibility of design in
stereolithography, Algorithmica 19 (1997) 6183.
[4] M. Bablani, A. Bagchi, Quantification of errors in rapid prototyping processes and determination of preferred orientation
of parts, in: Transactions of the 23rd North American Manufacturing Research Conference, 1995.
[5] M.J. Bailey, Tele-manufacturing: Rapid prototyping on the Internet, IEEE Comput. Graphics Appl. 15 (6) (1995) 2026.
[6] G. Barequet, Y. Kaplan, A data front-end for layered manufacturing, Comput. Aided Design 30 (4) (1998) 231243.
[7] B.G. Baumgart, A polyhedron representation for computer vision, in: Proceedings of the AFIPS National Computer
Conference, Vol. 44, 1975, pp. 589596.
[8] J.H. Bhn, Removing zero-volume parts from CAD models for layered manufacturing, IEEE Comput. Graphics
Appl. 15 (6) (1995) 2734.
[9] P. Bose, Geometric and computational aspects of manufacturing processes, Ph.D. Thesis, School of Computer Science,
McGill University, Montral, Canada, 1995.
[10] C. Bradford Barber, D.P. Dobkin, H. Huhdanpaa, The quickhull algorithm for convex hulls, ACM Trans. Math.
Software 22 (4) (1996) 469483, see also http://www.geom.umn.edu/software/qhull/.
[11] B. Chazelle, L. Palios, Triangulating a nonconvex polytope, Discrete Comput. Geom. 5 (1990) 505526.
[12] T.H. Cormen, C.E. Leiserson, R.L. Rivest, Introduction to Algorithms, MIT Press and McGraw-Hill, 1990.
[13] M. de Berg, M. van Kreveld, M. Overmars, O. Schwarzkopf, Computational Geometry: Algorithms and Applications,
Springer, Berlin, 1997.
[14] A. Dolenc, I. Mkel, Slicing procedures for layered manufacturing techniques, Comput. Aided Design 26 (1994) 119
126.
151
[15] D. Dutta, V. Kumar, M. Pratt, R. Sriram, Towards STEP-based data transfer in Layered Manufacturing, in: Proceedings of the Tenth International IFIP WG 5.2/5.3 Conference PROLOMAT, 1998, see also http://www.mel.nist.
gov/msidlibrary/summary/9826.html.
[16] S. Fekete, J. Mitchell, Histogram decomposition and stereolithography, 1997, Manuscript, http://www.zpr.unikoeln.de/paper/paper.php3?paper=280.
[17] D. Frank, G. Fadel, Preferred direction of build for rapid prototyping processes, in: Proceedings of the 5th International
Conference on Rapid Prototyping, 1994, pp. 191200.
[18] R.N. Goldman, Area of planar polygons and volume of polyhedra, in: J. Arvo (Ed.), Graphics Gems II, Academic Press,
1991, pp. 170171.
[19] P. Jacobs, Rapid Prototyping and Manufacturing: Fundamentals of StereoLithography, McGraw-Hill, 1992.
[20] E. Johnson, Support generation for three-dimensional layered manufacturing, Masters Project Report, Department of
Computer Science and Engineering, University of Minnesota, Minneapolis, MN, 1999.
[21] P. Kulkarni, D. Dutta, An accurate slicing procedure for layered manufacturing, Comput. Aided Design 28 (1996) 683697.
[22] J. Majhi, Geometric methods in computer-aided design and manufacturing, Ph.D. Thesis, Department of Computer Science
and Engineering University of Minnesota, Minneapolis, MN, 1998.
[23] J. Majhi, R. Janardan, J. Schwerdt, M. Smid, Multi-criteria optimization algorithms for layered manufacturing, in:
Proceedings of the 14th Annual ACM Symposium on Computational Geometry, 1998, pp. 1928.
[24] J. Majhi, R. Janardan, J. Schwerdt, M. Smid, P. Gupta, Minimizing support structures and trapped area in two-dimensional
layered manufacturing, Computational Geometry 12 (1999) 241267.
[25] J. Majhi, R. Janardan, M. Smid, P. Gupta, On some geometric optimization problems in layered manufacturing,
Computational Geometry 12 (1999) 219239.
[26] A. Marsan, V. Kumar, D. Dutta, M. Pratt, An assessment of data requirements and data transfer formats for Layered
Manufacturing, Technical Report NISTIR 6216, National Institute of Standards and Technology, September 1998, see also
http://www.mel.nist.gov/msidlibrary/summary/9821.html.
[27] S. McMains, C. Squin, A coherent sweep plane slicer for layered manufacturing, in: Proceedings of the Fifth ACM
Symposium on Solid Modeling and Applications, 1999, pp. 285295.
[28] K. Mehlhorn, S. Nher, LEDA: A Platform for Combinatorial and Geometric Computing, Cambridge University Press,
Cambridge, UK, 1999.
[29] K. Mulmuley, Computational Geometry: An Introduction through Randomized Algorithms, Prentice-Hall, 1993.
[30] J. Schwerdt, M. Smid, R. Janardan, E. Johnson, J. Majhi, Protecting critical facets in layered manufacturing, Computational
Geometry 16 (2000) 187210.
[31] J. Schwerdt, M. Smid, J. Majhi, R. Janardan, Computing the width of a three-dimensional point-set: an experimental study,
ACM J. Experimental Algorithmics 4 (8) (1999), available online at http://www.jea.acm.org/1999/SchwerdtWidth/.
[32] P. Stucki, J. Bresenham, R. Earnshaw, Computer graphics in rapid prototyping technology, IEEE Comput. Graphics
Appl. 15 (6) (1995) 1719, Guest Editors introduction.