Interior Medial Axis Transform computation of 3D objects bound by ...

2 downloads 0 Views 2MB Size Report
Aug 3, 2010 - whose maximal spheres have a single touchpoint (such as the sphere S in Fig. 4(a)) with the surface of the object. A skeletal edge is possible ...
Computer-Aided Design (

)



Contents lists available at ScienceDirect

Computer-Aided Design journal homepage: www.elsevier.com/locate/cad

Interior Medial Axis Transform computation of 3D objects bound by free-form surfaces M. Ramanathan a,∗,1 , B. Gurumoorthy b a

Department of Engineering Design, Indian Institute of Technology Madras, Chennai-600036, India

b

Department of Mechanical Engineering, Indian Institute of Science, Bangalore 560 012, India

article

info

Article history: Received 12 October 2009 Accepted 3 August 2010 Keywords: Medial Axis Transform Voronoi diagram Skeleton Free-form boundaries

abstract This paper presents an algorithm for generating the Interior Medial Axis Transform (iMAT) of 3D objects with free-form boundaries. The algorithm proposed uses the exact representation of the part and generates an approximate rational spline description of the iMAT. The algorithm generates the iMAT by a tracing technique that marches along the object’s boundary. The level of approximation is controlled by the choice of the step size in the tracing procedure. Criteria based on distance and local curvature of boundary entities are used to identify the junction points and the search for these junction points is done in an efficient way. The algorithm works for multiply-connected objects as well. Results of the implementation are provided. © 2010 Elsevier Ltd. All rights reserved.

1. Introduction: Medial Axis Transform The Medial Axis Transform (MAT) was first introduced by Blum [1] to describe shapes. Since its introduction, the MAT has found use in a wide variety of applications that primarily involve reasoning about geometry or shapes [2,3]. The MAT has been used in pattern analysis and image analysis [4,5], finite element mesh generation [6,7], and path planning [8], to name a few applications. There exists a bijective mapping between the MAT and the object’s boundary [9] which means that for an object, there will be a unique MAT. Moreover, it is possible to reconstruct the object given its MAT [10]. The MAT can potentially be used as a representation scheme in geometric modelers, along with more popular schemes, such as constructive solid geometry (CSG) and boundary representation (B-rep) [11]. Dimensional reduction and topological equivalence make the MAT a simplified, abstract representation of the geometry. Since the MAT also provides details with respect to the symmetry of the object, it can be used in applications where this property is considered important. The Medial Axis (MA), or skeleton of the set D, denoted M (D), is defined as the locus of points which lie at the centers of all closed balls (or disks in 2-D) which are maximal with respect to D, together with the limit points of this locus. A closed ball (or disk) is said to be maximal in a subset D of the 3D (or 2D) space if it is contained in D but is not a proper subset of any other ball (or disk)



Corresponding author. Tel.: +91 44 22574734. E-mail addresses: [email protected], [email protected] (M. Ramanathan).

1 Part of this work was carried out when he was a Ph.D. student in the Indian Institute of Science. 0010-4485/$ – see front matter © 2010 Elsevier Ltd. All rights reserved. doi:10.1016/j.cad.2010.08.006

contained in D. The radius function of the MA of a connected set D is a continuous, real-valued function defined on M (D) whose value at each point on the MA is equal to the radius of the associated maximal ball or disk. The Medial Axis Transform (MAT) of D is the MA together with its associated radius function. Note that this definition of MAT is not restricted to R3 and is applicable to metric space of any dimension. MAT of an object is also called the Skeleton or Symmetric axis transform [12] of a part/shape. In this paper, though the definition of MAT is applicable for both the interior as well as the exterior of an object, we compute only for the interior. Hence, it can be termed as iMA/iMAT, with ‘i’ denoting the interior. In the remainder of the paper, the term MA/MAT is used to denote the iMA/iMAT. It should be noted that a majority of algorithms for MAT compute it only on the interior of the object (but see e.g. Leymarie and Kimia [13] for a recent approach applied to both interior and exterior MA computations). The existing approaches can be categorized according to the representation of the part that is taken as the input and the representation of the corresponding MAT that is the output. There are two constituents in the output — the geometry and the topology or connectivity of the MAT. Geometry of the MAT refers to the representation of the underlying geometric entities (curves, surfaces) corresponding to the entities in the MAT. Topology of the MAT refers to the connectivity between the various MAT segments of the object. Topology of the MAT can also be characterized by the pair/set of boundary entities in the object that correspond to a segment in the MAT. The input part model can be classified into the following:

• Exact representation — Here the geometry of the entities in the part boundary is represented exactly in the form of

2

M. Ramanathan, B. Gurumoorthy / Computer-Aided Design (

D B(B,CD) B(

A,C

C

)

P1

P3

P2 B1

B2

P4 B(B,D

)

A

B(C,AB)

B B(AB,CD)

Fig. 1. Difference between MAT and bisector. Dashed lines show the portions of the bisector that need to be removed to get MAT.

curve/surface equations. When the entities involved are simple geometrical entities such as lines/planes, and other 2nd degree curves/surfaces, the representation is referred to as exactanalytical. The representation is referred to as exact-freeform or freeform when entities such as Bézier or B-spline are involved. • Tessellated representation — Here the boundary of the part is approximated by linear entities such as edges and triangles/polygons. • Discrete representation — Here the object is represented by a set of points sampled along the part boundary or a cell decomposition of the object. The latter two representations are approximate representations of the domain. 1.1. Exact representation as input When the input is exact-analytical or exact-freeform, most of the existing methods use bisectors to generate MAT. Bisectorbased methods [14] typically construct segments that are a superset of the required MAT portion. In addition to this, the topology of the final MAT has to be ensured by correctly trimming each bisector segment and connecting the valid segments and hence they are computationally expensive. Alternately, pairs of entities that generate a valid bisector (that will become part of a MAT segment) have to be identified and this needs additional processing. For example, the dashed line in Fig. 1 (where B(a,b) denotes the bisector between entity a and entity b on the boundary of the domain) shows the bisector curve for the pair of edges AB and CD. The bisector consists of several segments (segment P3–P4 in the figure corresponds to the set of points equidistant from point B in edge AB and the edge CD). For the same pair of line segments AB and CD, when it is part of the object ABCD, B1–B2 is the corresponding MAT segment, requiring trimming of the rest of the segments forming the bisector. Moreover, problems due to round-off errors are involved in finding the intersection of bisectors. For example, as shown in Fig. 2, the two bisectors which are supposed to join each other may not intersect because of some round-off errors. This could impede implementation of algorithms which rely on accurate intersection of bisectors. A rational representation of the bisector is proven to be available only for certain special cases — between two rational space curves [16] and for CSG primitives in special configurations [17,18]. The bisector surface between two rational surfaces in R3 is non-rational, in general [18]. Also, the bisector of simple geometries is not always simple. While the bisector of two lines in the plane is a line, the bisector of two skewed lines in R3 is a hyperbolic paraboloid of one sheet [19]. When exact-freeform representation is taken as the input, the bisector curves have to be traced numerically and it has been shown to be possible in 2D domain. Sherbrooke et al. [20,21] implemented a numerical tracing method using partial differential equations with floating point arithmetic that is applicable only

)



for polyhedral objects. It is shown that more accurate results can be obtained using exact arithmetic [22]. However, optimization methods are required to improve the speed because exact arithmetic has been proven to be very slow. A tracing method for an exact-freeform object does not seem to have been developed so far. Construction of the MAT of CSG objects (obtained by Boolean combinations of primitive objects such as cuboid, or cylinders) involves nonlinear curves and surfaces and this has been addressed in [17]. However, the approach is restricted to quadric curves and surfaces. Higher order curves can result due to intersections. The procedure outlined involves the construction of Voronoi surfaces (to identify equidistant points) for each pair of boundary entities, and trimming these Voronoi surfaces by other Voronoi surfaces. The nature of surfaces in the primitive solids are used to simplify the computation in constructing the Voronoi surfaces to solution of algebraic equations but the trimming of these Voronoi surfaces is non-trivial. No implementation results are provided. 1.2. Tessellated representation as an input When a tessellated representation of a free-form domain is used, the output MAT invariably consists of artificial MAT segments that are artifacts of the representation used and not due to the underlying part’s geometry (see Fig. 3(a) and (b)) [21]. Though the computed MAT is continuous, the points on the output MAT do not conform to the definition of MAT for the exact domain. It must be noted that additional effort is required in trimming and post-processing the generated MAT to be in conformity with the topology of the original free-form object. The additional MAT segments distort any reasoning based on MAT. Exact representation of the part has to be used to construct the MAT in applications where the geometry of the part has to be reconstructed from the MAT [10]. 1.3. Discrete representation as an input In approaches using the point set representation of the domain, an infinite point set is required to generate maximal spheres from circumspheres and hence the generated MAT points do not conform to the definition of MAT with respect to the exact domain. Voronoi-based algorithms such as [23–25] work on the assumption that the sample is dense. However, with finite sampling, this density condition can never be satisfied at the nonsmooth edges and vertices that are quite common in CAD models. The approximate medial axis with Voronoi facets stops before touching the convex edges and non-concave corners while the true medial axis passes through them and hence the structure of the medial axis for such objects is not complete. Further, due to inherent under-sampling, the medial axis is approximated poorly near the sharp edges and corners. Proper approximation of medial axis in the vicinity of sharp edges may be required for applications like dimensional reduction, feature recognition and suppression. A smoother approximation of the medial axis in high-curvature regions is possible only with smaller Voronoi facets. However, if the density is too low, artifacts such as holes appear in the medial axis. Criteria that involve parameters such as angles, ratio etc. have been used to get a closer approximation to the exact MAT [24,26,25]. Resulting MAT has many spikes and requires further processing. Adaptive refining [27] based correction is not proven to be correct and gives only the topology of the MAT and not the geometry. Optimization procedures have to be used to derive the exact geometry [28], but they are shown to work only for implicit solid models. Spatial/cell decomposition of the domain using octree has been used to construct MAT for set-theoretic solid models [29] and polyhedral models [30,31]. However, the algorithm in [31] does

M. Ramanathan, B. Gurumoorthy / Computer-Aided Design (

)



3

Fig. 2. No intersection point is found between bisectors B1 and B2 if some gap exists [15]. All MAT segments are not shown in the figure.

(a) Outer curved boundary not discretized.

(b) Outer curved boundary discretized.

Fig. 3. MAT when tessellated representation is used (b) discretized representation generates more number of patches than required (a).

not generate all medial surface patches and the algorithm in [30] generates the approximate Voronoi graphs for degenerate Voronoi diagrams. Free-form solid models are required to be discretized into polyhedral models for applying this method. Moreover, this method does not provide a complete description of adjacency relationships unless the resolution is very high. Recently, the notion of a medial scaffold for an unorganized cloud of points has been introduced in [13]. 1.4. Extension of 2D methods to 3D Most algorithms that work for 2D domains may not readily extend to 3D domains. The divide and conquer algorithm has now been extended to 3D polyhedral objects by Stroud et al. [32]. The wavefront propagation algorithm, however, does not appear to generalize easily to three dimensions. Recent algorithms such as [33,34] for generating a Voronoi cell of 2D free-form objects using a symbolic representation of bisectors and a lower-envelope do not appear to have been extended to 3D (for an even more recent algorithm for MAT of planar shapes, see [35]). Only algorithms based on tracing appear to be capable of extension to 3D free-form objects. 1.5. Summary To the best of the knowledge of the authors, only [36] and [37] have used the exact–free-form representation of an object to generate the MAT. However, it appears that, in [36], only non-adjacent medial surface patches are generated. In [37], the construction of MAT was carried out only for extruded and revolved 3D free-form objects. Construction of the Voronoi surfaces of CSG objects has been addressed in [17] as a solution of algebraic equations but trimming of the Voronoi surfaces (to obtain the MAT) is non-trivial. However, no implementation results are provided. In this paper, the problem of generating a MAT for solids with free-form entities is addressed. It is believed that the richest shape variety can be reached by solids with free-form boundary

surfaces that are typically defined by Non-Uniform Rational BSpline (NURBS) surface patches [38]. The algorithm uses the fact that, when the boundary consists of finite union of rational surface patches, the MAT becomes a semi-algebraic set that can be decomposed into a finite union of smooth curves and surfaces [38]. The proposed algorithm uses the exact–free-form representation of the part and generates an approximation of the MAT that is represented by rational spline curves and surfaces. The algorithm is approximate in the sense that, though the points that are generated lie on the MAT, the same cannot be said when a point located in between the two generated points is considered. As the input is the exact boundary representation, the approach presented can be categorized as a continuous approach. The algorithm presented traces the MAT of the part, segment by segment by marching along the boundary. This algorithm is based on the 2D MAT algorithm presented in [2]. Unlike the 2D case, the equations to be solved here are multi-dimensional, precisely, five equations in six variables. Points on the MAT are obtained by tracing along one variable (tracing parameter) and solving the set of five equations for the other variables. This paper is an extended version of the one that appeared in IEEE Shape Modeling International [39]. The remainder of this paper is structured as follows: The next section presents some preliminaries that are necessary for describing the algorithm. An overview of the algorithm is presented in the following section. Details of the steps used are presented next followed by the illustration of the algorithm. Results of an implementation and a discussion of the results and the algorithm are presented next. 2. Preliminaries In this paper, the term ‘boundary segments’ refers to boundary surfaces (a free-form surface represented in Bézier or B-spline form), reflex edges (an edge is called reflex if the angle between the normals from either surface on the edge is greater than 180°, at all points on the edge. otherwise the edge is called convex) as well as reflex corners (a vertex is convex if angle between the incident faces are less than 180°, otherwise it is called reflex) in an object.

4

M. Ramanathan, B. Gurumoorthy / Computer-Aided Design (

a

)



b

c

Fig. 4. Classification of points on 3D MAT. Terminologies are taken from [40,20,28].

2.1. Classification of points in 3D MAT The various elements that generally comprise the 3D MAT have been defined by Sherbrooke et al. [20], Turkiyyah et al. [28] and Giblin et al. [41,40,42–44]. For convenience, all the terminologies are explained here. Towards the end of this section, the terms (from the existing set) used in this paper are noted clearly. Fig. 4 illustrates the terminologies. Touchpoint: A point at which a maximal sphere is tangent to the boundary surface. Touchpoints are sometimes referred as ‘‘footpoints’’. Seam: A connected space curve consisting of points that have at least three touchpoints and are non-manifold. Points on the seam are called seam points. It is also termed as y-junction points [41,40, 43] and the seam as Y-junction curve. Seam-End point: These points do not arise from the maximal ball condition of the MAT, but are actually the limit points of the MAT. A seam-end point generally results when a seam runs into the boundary of the solid. Therefore, vertices with convex edges incident are seam-end points [20]. Ribs/Skeletal edge: A connected space curve consisting of points whose maximal spheres have a single touchpoint (such as the sphere S in Fig. 4(a)) with the surface of the object. A skeletal edge is possible only if a surface contains principal curve [28] (also called ridges [45]). It is also termed simply as Ribs [3] and the corresponding touchpoint is called ridge point. Rib-end/Fin (creation) point: This is the point where a seam end at the center of curvature (L, M in Fig. 4(a)) corresponding to the extremal maximal positive curvature on the boundary surface. It can also be seen as the point where the rib and seam end [46]. A sphere centered at the rib-end point is tangent to two points, one of which is a ridge point (touchpoint corresponding to points such as L, M and lying on ridge AB) Sheet: A sheet is a manifold subset of the MAT which is maximal in the sense that it is connected and bounded only by seams and ribs.

Sheet point: A point in the interior of a sheet. Sheet points have exactly two touchpoints. Junction point: A point where the seams intersect. Typically, at this point, four seams intersect, such as (J in Fig. 4(b)). One can also see that as the intersection of 6-sheets, and hence it is also called 6-junction [43]. For example, in Fig. 4(b), seams emanating from the junction point (J are JA, JB, JK and JM. Six sheets (JBAJ, JMCAJ, JKEAJ, JKFBJ, JMDBJ, JMLKJ) come together at the junction point J. A junction point will have four touchpoints (such as J1 in Fig. 4(c), where T1 (on the top surface AGLM), T2 (on the left surface AMNB), T3 (on the front surface ABCDEFG), and T4 (on the back surface LKJIHNM) are the touchpoints). In this paper, the formulation for the junction point (6-junction) is based on the seam curves. Using the Ank notation (maximal ball A with contact order k at n points) [40,3], seams are A31 points (curves), ribs are A3 points, and rib-end is an A1 A3 point. A sheet is made of A21 points and a junction point is an A41 point. From the classification of the points on 3D MAT, any seam point should be equidistant to three boundary segments, any sheet point should be equidistant to two boundary segments and the junction point should be equidistant to four or more boundary segments. In the paper, only the following terminologies are employed for clarity: seam, sheet, rib, rib-end, junction, touchpoints and ridge. 2.2. Conditions that determine a point on MAT From the definition of the MAT the following two conditions that have to be satisfied by points on a MAT segment can be derived [2]. Distance criterion: Any point on a seam (apart from the other points of the MAT) should be equidistant to three different boundary segments. This is equivalent to saying that any point on the simplified segment of MAT in 2D (apart from the terminal points) should be equidistant to two boundary segments [2]. In Fig. 5(a) line segments e-a1, e-b1 and e-c1 are normal to the

M. Ramanathan, B. Gurumoorthy / Computer-Aided Design (

Fig. 5. Distance criterion. (a) shows the condition satisfactory, where as in (b), though the point (e) is normal to the corresponding touchpoints, the distance criterion is not satisfied.

boundary segments and also equal in length. So the point e is a point on the MAT. But for the point e shown in Fig. 5(b), even though the line segments e-a1, e-b1 and e-c1 are normal to the boundary segments, they are not equal in length. So point e is not a point on MAT. Curvature criterion: In 2D, for free-form boundaries, the radius of curvature of the disk at any MAT point should be less than or equal to the minimum of the local radius of curvature of the boundary segments. Fig. 6(a) shows that the ball is completely inside the boundary segments (i.e. does not cut the boundary segment at the touchpoint) which implies that the indicated curvature criterion is fully satisfied and point M becomes a MAT point. Violation of this criterion indicates that the ball does not lie inside the boundary segments completely. The point m in Fig. 6(b) is not a MAT point but it still belongs to the set of bisector points. In 3D, the radius of curvature of the ball (or sphere) at any point on MAT should be less than or equal to the minimum of the radius of curvatures (reciprocal of the maximum normal curvatures) at the touchpoints of the boundary (Fig. 7(a)). Otherwise, the ball will not satisfy the maximal ball criterion (Fig. 7(b)) and so the point is no longer a MAT point (even though the distance criterion is satisfied (one can call such points as bisector points since these points are equidistant [16] from the boundary entities). Curvature criterion becomes very important in the case of determining MAT points for free-form entities [2]. It is to be noted that the distance and curvature criteria are necessary but not sufficient for a point to be on the MAT, since a point can satisfy both criteria but need not belong to MAT. This is explained in Fig. 6, using an example in 2D. Fig. 6(a) shows a point M, that satisfies both criteria (the ball does not cut the boundary). Fig. 6(b) shows a point ‘m’ where the curvature criterion is violated as the ball cuts the boundary at the touchpoint. However, there exist points between ‘Br’ and ‘m’ (Fig. 6(c)) that satisfy both criteria but they are not points on MAT as branching occurs at ‘Br’ (Fig. 6(d)). Note that the occurrence of this branching is identified only when there is a failure in the curvature criterion and this segment (Br–m) is removed during the processing after the failure in curvature criterion happens (Section 4.3.2). Hence, satisfying the distance and curvature criteria is only a necessary condition. The sufficiency is taken care of when a failure in the curvature criterion happens. As the touchpoints are the shortest path points corresponding to the MAT point, failure of the curvature criterion can also be viewed as an indication that the shortest path property to the touchpoints has been violated. For example, touchpoint of ‘m’ in AB is D1 (Fig. 6(c)) whereas its shortest path point to AB is in the vicinity of H. 3. Overview of the algorithm The algorithm constructs the MAT by tracing the seam segments. The seam segments are traced by marching along a

)



5

parametric direction (referred to as the tracing parameter) of one of the faces in a triplet and solving for the touchpoints corresponding to a point on the seam. This is accomplished by solving the intersection of the normals to the surfaces in the triplet and imposing the distance criterion. A point on the MAT is obtained from the intersection of the normals to the surfaces at the touchpoints followed by a check against curvature criterion. Given that the normals are linear in contrast to the bisectors which can be rational surfaces, the computational effort and computational complexity are greatly reduced. Tracing of a seam starts from a convex vertex, where all the touchpoints are known (they are the convex vertex itself). It is assumed that the input domain contains at least one convex vertex. It is assumed that the object is such that all seam points are regular (have exactly three touch points). However, two of the touch points can lie on the same surface (implying that the maximal ball can touch more than one point on a free-form surface). Moreover, the seam curves are assumed to be connected, which is true for simplyconnected objects. When multiply-connected objects are involved, it is assumed that there is a sufficient number of convex corners to start the tracing algorithm to compute the remaining set of seam curves. It is also to be noted that a single free-form surface can have arbitrarily connected seam curves, which can be traced when a starting point is available and the seam curves have distinct touchpoints on the same surface. During the tracing of seam points, at chosen intervals, the algorithm checks for the existence of a junction point. This check is a distance check with all other surfaces of the object. Distance check is done by finding the minimum distance between a point (here, seam point) and a surface. To improve the efficiency of the check for junction points, a more restricted check that gives the correct result is proposed. For determining the presence of a junction point, it can be shown that it is sufficient to check for interference with surfaces that have not been fully traced thus far. This ensures that as the generation of a seam progresses, the check for junction points involves fewer surfaces. Once the existence of a junction point is confirmed, three of the touchpoints corresponding to the junction point are known and the remaining touchpoints of the junction point are determined from the surfaces that fail the distance check. At a junction point, there will be at least four surfaces that have touchpoints corresponding to that junction point. Assuming a non-degenerate junction point (only four surfaces present at the junction point), the four triplets of surfaces are identified (note that one of the triplets is already used). Using the remaining triplets, other seam segments are traced from the junction point. The critical task here is the identification of the tracing parameter and the direction of tracing. These (parameter and direction) are fixed by determining/estimating the direction of tangent to the new seam at the junction point. Alternately, a generate and test procedure can be used with both parameters for each surface in the triplet for the new seam. Failure of curvature criterion indicates the presence of a point with extremal principal curvature [28] in the vicinity. In such cases, the seam will terminate at the center of curvature corresponding to the point that has the extremal principal curvature. The tracing procedure used therefore originates at a convex vertex and ends at either a convex vertex or at the center of curvature corresponding to the point that has the extremal principal curvature. The algorithm terminates when all the convex vertices in the part have been visited, no surface triplets remain to be traced at any junction point and all faces in the object have been flagged as visited. The output of the algorithm is a set of points on each seam. Rational curves are fit to points in each seam segment. Since sheets are bound by seam segments and a sheet is generated by two

6

M. Ramanathan, B. Gurumoorthy / Computer-Aided Design (

)



Fig. 6. Necessary and Sufficient Condition for a point on MAT. (a) shows the criterion is satisfied. (b) shows the failure of the curvature criterion indicating that a junction point has been superseded. (c) shows the junction point ‘Br’ that need to be identified. (d) shows the portions of MAT from ‘Br’.

a

b

Curvature criterion fails here

m D F

M E

Fig. 7. Curvature criterion in 3D. (a) shows the ball satisfies the criterion. (b) shows the curvature of the surface is larger than the ball curvature at the touchpoint, indicating failure in the curvature criterion. Also see Fig. 6(a) and (b) for the corresponding 2D version.

faces in the object, the topology of the sheet can be determined by grouping the seam segments where two of the faces in their governing triplet of faces are the same. The sheets can then be determined by either using bisectors of the face pair or through a numerical tracing scheme. 4. Algorithm details The algorithm consists of the following steps.

• • • • • • • •

tracing step; checking for a junction point; tracing from a junction point; handling a reflex edge; handling a smooth edge; starting of the algorithm; termination of the algorithm; determination of sheets.

4.1. Tracing step The boundary segments are parameterized such that the normal at any point on the surface is pointing outwards. Let S1 (u, v), S2 (s, t ), S3 (q, r ) be the surface triplet under consideration. The tracing steps consists of the following tasks. 1. Modify the tracing parameter by the tracing step size along the direction of tracing. The seam is traced by finding the intersection of normals to the three surfaces such that the distance criterion is satisfied. The computational effort is in

finding the roots of five nonlinear equations in five variables (see Appendix A). Convergence is fast as a good initial guess is always available (the previous touchpoints on the surfaces). 2. At each seam point, check if the intersection point satisfies the curvature criterion. The intersection of normals that satisfy both the distance and curvature criterion is a point on seam. Such a point exists as the seam point is the intersection of two bisectors. Here one parameter is fixed and the other parameters are searched for such that their intersection of normals from their respective surfaces satisfy the distance criterion for point on a seam. The choice of the tracing parameter and the tracing direction is described later. The set of equations are solved using the Globally convergent NewtonRaphson method (Newton-Raphson combined with Line searches and Backtracking). The check against the curvature criterion is a comparison of the radius function (distance between the touchpoint and the seam point) with the radius of curvature (reciprocal of maximum normal curvature) at the touchpoints. The maximum normal curvature is identified using the Gaussian (K ) and Mean (H) curvatures. The procedure followed when the curvature criterion is violated at a point during tracing is discussed later during the description of tracing from a junction point. 4.2. Checking for a junction point A seam terminates at one of the following-a convex corner, a junction point, the center of extremal principal curvature. Termination of tracing of a seam at a convex corner is straightforward as

M. Ramanathan, B. Gurumoorthy / Computer-Aided Design (

)



7

Fig. 8. Filtering the surfaces using bounding box for distance check. Distance check is performed with the surface (here C (t )) only if the minimum distance D to the bounding box from the MAT point ‘m’ is smaller than the current ball radius R.

it only involves comparing the parameter values with the bounds on the same and checking if the vertex is convex or not. When the seam terminates at a junction point, however, additional checks are required to first determine the existence of the junction point and then to trace seams from the junction point. Termination at the center of curvature of a point with extremal principal curvature is indicated by either failure in curvature criterion or when the end of a surface that is not on a convex vertex (such as the touchpoint of cc in Fig. 10(b)) is reached without encountering a junction point. The existence of the junction point can be identified by finding the distance of the current seam point from the remaining boundary segments and checking if this distance is less than the radius value at the current seam point. The distance between a seam point and a surface is identified by using the minimum distance calculation between a point and a surface. The surfaces that are in the current triplet are not used for finding the junction point. Since it is extremely costly to check with all the boundary segments at all the seam points, this effort is reduced by the following. Distance check is not performed at all points generated on the seam. Checks for junction point are triggered by a different (and larger) step size called ‘junction point’ step size. Moreover, filtering techniques are also employed so that all the surfaces are not used for distance check. One of the techniques uses the 3D bounding box constructed using the control polyhedron of the surfaces. Fig. 8 illustrates this in 2D, where the control polygon is XYZ for the curve C (t ) and the bounding box is XPQSX. Distance check is performed with the surface (here C (t )) only if the minimum distance D to the bounding box from the MAT point ‘m’ is smaller than the current ball radius R. Moreover, it is shown that the check for the junction point need not consider faces for which all the corresponding seam segments have already been identified (Appendix B, Proposition 1). Due to the different step sizes used for tracing the seam point and for checking for junction point, it is possible to overshoot a junction point during the tracing procedure. A simple bisection procedure implemented between last point on the seam where the distance check was not violated and the current point where the check is violated will identify the junction point. 4.3. Tracing from a junction point At a junction point, there will be at least four boundary entities. Four triplets of boundary segments are possible out of the four boundary segments. Let S1 (u1 , v1 ), S2 (u2 , v2 ), S3 (u3 , v3 ) and S4 (u4 , v4 ) be the four boundary segments at a junction point. One of the triplets, say, (S1 (u1 , v1 ), S2 (u2 , v2 ), S3 (u3 , v3 )) has already been used for tracing a seam. For each of the remaining triplets the corresponding zero-set equations are solved to generate the seam. Once the triplet generates a valid seam, that triplet is marked as VISITED to avoid duplicate tracing. Note that when the triplet meets in a convex corner, there is no need to check for junction

Fig. 9. Identifying the tracing direction. The normal (N1) of the triangle formed by the touchpoints is used as the tangent for the start of tracing from a junction point.

points during tracing. This is because, when the triplets meet in a convex corner, it is be shown that there will be no more junction points if the object is simply-connected (Appendix B, Proposition 2). For the multiply-connected objects, however, it is necessary to check for the surfaces in the interior as well (note however that a junction point is possible if there is a failure in the curvature criterion). 4.3.1. Identifying the tracing direction In this step, the tracing parameter and the direction along which tracing has to be done from a junction point is determined. Determining the tracing direction at the junction point uses the direction of the tangent to the new seam at the junction point. The tangent to the new seam is obtained from the touchpoints on the faces in the triplet corresponding to the new seam as follows. The normal of the triangle formed by the touchpoints (refer Fig. 9 where the touchpoints T1, T3 and T4 form a triangle) through the junction point is the direction of the tangent to the new seam corresponding to this triplet. The normal is projected onto the tangent plane of one of the faces at the touchpoint. This face must have also been part of the previous triplet for which seam was traced. The tracing parameter and the direction are then determined based on the direction of the projected normal. The parameter along which the tangent is closest to the projected normal is taken as the tracing parameter. The choice of tracing direction is made based on the direction in which this parameter has moved in tracing the previous seam. The seam point can also be obtained by marching along the tangent to the seam curve [47]. This has been used in [20] but only polyhedral entities are handled. The procedure used in the present approach uses the same idea but only at junction points thereby reducing the computational effort involved in determining the tangent of the seam (controlled by six parameters). 4.3.2. Failure of curvature criterion Failure in the curvature criterion implies that the tracing of seam has missed a junction point. Point ‘m’ in the Fig. 10(a) is a point where failure of curvature criterion happens (‘T’ is the touchpoint on the surface where curvature criterion fails). The failure in curvature criterion facilitates the identification of the junction point ‘J’, where the fourth surface corresponding to the junction point is also one of the surfaces in the current triplet. Junction point ‘J’ is identified by backtracking the traced seam. During backtracking at each seam point the distance check for a junction point is performed with only the surface where the curvature criterion has failed. After ‘J’ is identified, the corresponding touchpoints are T1 , T2 , T3 and T4 , where T4 is the

8

M. Ramanathan, B. Gurumoorthy / Computer-Aided Design (

a

)



tracing procedure will not terminate when the smooth edge is reached. The tracing procedure continues with the neighborhood’s tangential surface and the other surfaces in the current triplet. 4.6. Starting of the tracing Tracing starts from a convex corner. It is assumed that there is at least one convex corner present in the object. One of the parameters of any of the incident faces is chosen as the tracing parameter. The tracing direction is that which yields points inside the face.

b

4.7. Termination of the tracing The termination of the algorithm occurs when all the convex vertices are visited by tracing, no triplets remain to be traced at any junction point and all the faces have been visited. 4.8. Determination of sheets

Fig. 10. Failure of curvature criterion in 3D. (a) shows that the criterion fails at the touchpoint ‘T’. (b) shows the actual junction point ‘J’ along with the rib-end point CC.

touchpoint on the surface where T1 also lies (refer 10(a)). Checking against the curvature criterion is better than including the faces in the current triplet in the check for junction point because it becomes cumbersome. From the junction point ‘J’, the tracing can be done as usual. However, in two of the triplets, two surfaces are the same but with different touchpoints. One of the seams ends at the center of curvature of the point where the curvature criterion fails. The point on the surface is called the extremal maximal positive curvature point and a trace of such points on the surface gives the ridges [45]. Note that there is a seam corresponding to the ridge called the rib (refer 10(b)), where the maximal spheres have a single touchpoint. The violation of curvature criterion helps in identifying points on the ridges. There are procedures in the literature that will allow tracing of the ridge given a seed point on the ridge [45]. It is to be noted that the proof of the curvature criterion has been dealt with in detail in [48]. The utility of the curvature criterion has been presented in [2] and also described in detail in [33] (also see Figs. 5 and 6, p. 55). In the latter, the branch point (junction points in 2D are termed branch points) is then identified using a lowerenvelope procedure (albeit in 2D) [33], whereas in this paper, it is identified using backtracking. A similar figure is also presented in [40] (Fig. 3, A2 contact, p. 241). The failure of curvature criterion enables us to identify the junction point and thereby enabling to find the rib-end points (e.g. CC in Fig. 10(b)). 4.4. Handling a reflex edge A reflex edge is represented as a set of cylindrical arcs with zero radius. Associated with each arc segment is a normal. The normals are assigned to these segments in order, such that the change in the normal while crossing the reflex edge is divided uniformly across these segments. Tracing of seam points is done using the equations in Appendix C, considering one of the surfaces as a curve. The check for the presence of a junction point has to be done here as well, since it is possible to encounter a junction point. 4.5. Handling a smooth edge The domain may contain edges that are tangential, that is the edge between two surfaces is a smooth one. In such cases, the

In this step, the sheets formed by the seam segments are identified using a procedure similar to that described in [20]. Loops of seams and convex edges on the object boundary are formed. Each seam will be used in more than one loop. Each loop obtained forms the boundary of a sheet. From each loop, the face pair that corresponds to the sheet is obtained by identifying the common pair of faces in the triplets corresponding to each seam in the loop. In the paper, identification of precise geometry of the sheets has not been implemented, but it can be done in the following way: first find the bisector points corresponding to the two boundary surfaces and then fitting a surface through the set of bisector points, similar to the procedure described in [49]. The geometry of the sheet can then be obtained by trimming the bisector of the pair of faces with the bounding loop of seams. A similar procedure is applicable even when the sheet has ribs as its bounding edges. 5. Illustration of the algorithm In this section, we use a simple example to illustrate the procedure to construct all the seams and thereby the MAT of the object. Tracing starts at the convex corner A. The corresponding parameters of the seam starting from the convex corner A are identified using the equations in Appendix A. Let s be such a point on the seam (refer Fig. 11(a)). In Fig. 11(b), the imposed distance check is violated at point s′ as the sphere corresponding to this point cuts the surface S4 . The procedure then uses the bisection method between this point and the previous point found on the seam to identify the junction point J1 (Fig. 11(c)). The boundary surfaces corresponding to this junction points are S1 , S2 , S3 and S4 (Fig. 11(d)). The possible triplets of surfaces that can be used for tracing a seam are {S1 , S2 , S4 }, {S1 , S3 , S4 } and {S2 , S3 , S4 }. The first triplet {S1 , S2 , S4 } is then used for tracing the seam (Fig. 11(e)). The seam for this triplet is traced after identifying the tracing direction. The other two triplets are then processed. The triplet {S1 , S3 , S4 } generates the seam having the junction point J2 (Fig. 11(f)). While processing the triplet {S2 , S3 , S4 }, the seam encounters a concave edge at n1 (Fig. 11(g)). The procedure when one of the triplets is a concave edge (Appendix C) is then applied until it reaches n2 and the seam is continued until it reaches the junction point J3 (Fig. 11(h)). The surface triplets in junction points J2 and J3 are then processed in a similar fashion. While tracing one of the triplets that contains S6 , the seam encounters a smooth edge (Fig. 11(i)). Here the surface S6 is then replaced by S7 and seam tracing continues in a similar manner to identify the junction point J4 (Fig. 11(j)). Tracing of seams and hence the MAT of the object ends when all the convex corners are visited and all the triplets at a junction point are processed (Fig. 11(k)).

M. Ramanathan, B. Gurumoorthy / Computer-Aided Design (

)

a

b

c

d

e

f

g

h

j



9

i

k

Fig. 11. Illustration of the algorithm. The algorithm starts from the convex corner ‘A’ (a) follows with the identification of junction point ‘J’ in (d) and ends when all the MAT segments are traced as in (k).

6. Results and discussion The algorithm described has been implemented and this section presents the results obtained for some test objects. Currently, the generation of the seams and finding the boundary of sheets only has been implemented. The MAT for some test objects having free-form boundary surfaces are shown in Fig. 12(a)–(k) (some of the boundary surface

patches have been meshed). Fig. 12(a) shows the MAT for a humanlike object. Fig. 12(b) shows the MAT for an object having a top surface (Fig. 12(c)) with varying curvatures (surface with wriggles) and a flat region in the middle. Fig. 12(e) and (f) show the MAT for a bracket-kind of object with a concave edge in the latter. Fig. 12(g) shows the MAT for an airplane-like objects. Fig. 12(h) shows the MAT for an object having fillets. MAT for a multiply-connected object is shown in Fig. 12(i). Fig. 12(k) shows the MAT for a

10

M. Ramanathan, B. Gurumoorthy / Computer-Aided Design (

Table 1 Time taken for generation of 3D MAT for typical objects. Figure no.

No. of seams

Time (in s)

12(e) 12(j) 13(a)

22 52 72

36 80 115

polyhedral object. The results indicate that the algorithm can handle wide variety of free-form objects. 6.1. Discussion 6.1.1. Robustness Robustness of this algorithm primarily depends on the tracing step size that is being chosen. It is safe to say that no hard and fast rule exists to identify a correct step size. A small enough step size is recommended to achieve good accuracy in tracing of the seams and to avoid over-stepping, but not so small that the process becomes very slow. Assuming that the dimension of the object can be described using the degree of surfaces that has been tested, for the degree of surfaces ranging from 2 to 9, a step size of 10−3 has been found to be sufficient to achieve an accuracy of around 10−6 , though larger step sizes such as 10−2 may be sufficient for some objects. An automatic determination of step sizes a priori looks unlikely, though a curvature based step size is certain to make the algorithm more robust. Table 1 shows the time taken in seconds and the number of seams generated for the given objects. The implementation is done on a PIII 450 MHz with 256 MB RAM. The tracing step size is 10−3 and the junction point step size is ten times that of the tracing step size i.e. 10−2 . The overall tracing time ranges in the order of few seconds (for the object shown in Fig. 12(a)) to few minutes (for the object shown in Fig. 13(a)). The time scale looks very practical and this proves the efficiency of this algorithm. Papers [22,30,21] have reported the time scales for the computation of MAT, which deal only with polyhedral entities. It should be noted that our algorithm deals with a free-form input and also the architectures of the computational system are different. Hence, at best, we can report the times of similar 3D algorithm such as [22,30,21]. Sherbrooke’s [21] tests have been made on a graphics workstation with 150 MHz. The time scales vary from few seconds to few minutes. In [30], the time scale varies from 14 to 330 s on SGI-02 with R5000 processor running at 180 MHz. The number of seams has not been reported explicitly. [22] also deals with an algorithm for MAT of polyhedral entities using exact arithmetic. The test results were run on an SGI MIPS R12000 processor, with timings varying from few seconds for a smaller number of seams to few hours for larger ones. Fig. 13(b) shows the MAT for the object in Fig. 13(a) with a tracing step size of 10−4 and the junction point step size of 10−3 . The time taken for generating the MAT is higher (1105 s) which is understandable as the step size is ten times smaller. However, note that the topology of the medial axis is not affected by the step sizes chosen. 6.1.2. Stability/precision analysis The analysis of the algorithm with respect to the effect of numerical errors due to finite precision indicates that the algorithm is stable with respect to round-off errors. The MAT algorithm was implemented with single and double precision and there was no difference in the result to within the tolerance used (10E−6). Table 2 shows the values of some MAT points in both single and double precisions. The choice of junction point step size is critical. A smaller value ensures correctness at the cost of greater effort. A larger value may result in overshooting more

)



than one junction point. One option could be to use a larger junction point step size and backtrack after one junction point has been identified to ensure that no other junction point has been missed. If the junction point step size is chosen correctly, the algorithm is robust enough to capture an overshot junction point. The branching decisions are therefore, made correctly. In practice, we have found that a value ten times the tracing step size is appropriate for the junction point step size. As long as the tracing step size is below a threshold (smallest feature in the domain), the tracing procedure yields the correct connectivity between the MAT segments. 6.1.3. Correctness and completeness The proposed algorithm traces the MAT of the objects by tracing the seam segment by segment. As the points on the seam are determined based on the definition of MAT, the result will always be correct. Branching from one triplet to the other is based on the continuity of MAT. Completeness of the algorithm is argued as follows. As the algorithm correctly identifies the junction points and each of the triplets at every junction point are traced, the algorithm generates all the seam segments when the sheets are simply connected. As discussed above, by tracking the boundary entities as well (whether they have been visited during tracing or not), the presence of multiply-connected sheets are identified correctly. The algorithm therefore does not miss any entity in the MAT and generates all the seams (and sheets) in the MAT (Conjecture 1). Conjecture 1. All the non-degenerate seams will be generated for an object provided there is a sufficient number of starting points (convex corners). Conjecture 1 includes the generation of rib-end points which will allow the computation of ribs. 6.1.4. Complexity The worst-case complexity of the MAT for a polyhedron is known be O(n3+ϵ ) [22], where ‘n’ is the number of faces, edges and vertices of the polyhedron and ϵ > 0 though a complexity of O(n2 ) is also likely. Erickson [50] suggested that the worst case complexity for Delaunay triangulation of a set of points would be O(n2 ), even if one takes into account the spread ∆. In the case of models bound by free-form surfaces, there are many factors. A rough estimate of the complexity of our algorithm is made as follows. Let ‘n’ be the number of boundary segments (faces and reflex edges) and ‘s’ be the number of seams traced. Let ‘N’ be the largest number of points traced on a seam segment. Since the complexity for computing the intersection of three normals is O(1), the complexity of computing the seam segments is O(Ns). Each check for a junction point has a complexity of O(n) and therefore the complexity due to the check for junction point is O(ns). Assuming that the number of seams is a linear function of the number of boundary segments present (i.e. s = cn, where ‘c’ is some constant), then the overall complexity for the algorithm is O(Ncn + cn2 ). Therefore the worst case complexity of the algorithm with respect to the characteristic size of the input is O(n2 ). The complexity of O(n2 ) can possibly be improved to O(n log n) using strategies such as divide and conquer (as has been done for 2D [51]). However, such strategies in 3D, appears still difficult, though in recent times an algorithm for MAT of polyhedral objects has been developed [32]. It is to be noted that, for computing Voronoi cells of 2D freeform rational curves, lower envelope, a divide and conquer strategy, was employed in [33]. A similar one in 3D has not yet been developed, which could improve the worst case complexity from O(n2 ).

M. Ramanathan, B. Gurumoorthy / Computer-Aided Design (

)



(a) Test object and its 3D MAT.

(b) MAT for an object having varying curvatures.

(c) Zoomed view of the surface that has varying curvatures.

(d) MAT for another 3D object.

(e) Bracket-like object and MAT.

(f) Object having a reflex edge and its MAT.

(g) Airplane-like model and its MAT.

(h) Object (with fillets) and its 3D MAT (ribs not shown).

(i) MAT for a multiply-connected object.

(j) MAT for another test object.

(k) 3D MAT for a polyhedral object.

Fig. 12. Test objects and their corresponding MAT.

11

12

M. Ramanathan, B. Gurumoorthy / Computer-Aided Design (

(a) Step sizes 0.001, 0.01.

)



(b) Step sizes 0.0001, 0.001.

Fig. 13. MAT for the same object with different step sizes. Table 2 Comparison of MAT point co-ordinates for single and double precision. Precision

mat_x

mat_y

mat_z

Single Double Single Double Single Double Single Double Single Double

−8.499159 −8.499160015365 −8.572198 −8.572197516800 −8.499160 −8.499159600495 −15.971039 −15.971037909199 −0.374946 −0.374945407219

1.027492 1.027494860800 −2.901567 −2.901567719752 −26.027611 −26.027610348551 0.970950 0.970949478130 −7.879400 −7.879400354699

16.027491 16.027494862937 8.256032 8.256032201107 16.027609 16.027609692876 8.455536 8.455536797018 −0.374945 −0.374945706072

The approach in this paper is perhaps more computationally intensive (refer equations in Appendices A and C) than the ones used in [22,30,21] as one can expect because of the use of freeform surfaces as the input. Identifying junction points also involve computing the closest point on a surface corresponding to a point on the MAT. Note that the algorithm described in this paper can be used when two or more surfaces in the triplet associated with a seam are identical. This implies that the maximal ball can touch more than one point on a free-form surface, which is crucial for objects having free-form faces. Check for the violation of the curvature criterion helps in identifying the surface to be repeated in the triplet for tracing the seam. However, at present the ribs are not traced. Note that the same algorithm can be used to handle objects having internal vertices by suitably modifying the equations in Appendix A or C. 6.1.5. Multiply-connected object It has been shown that, if the faces of the solid are simply-connected, then all the sheets will be simply-connected as well [20]. When the object consists of multiply-connected faces then sheets may also be multiply connected. Earlier approaches split the multiply-connected faces into simplyconnected faces. This results in additional sheets that need to be post-processed. Moreover, splitting multiply-connected faces into simply-connected faces may be easy when dealing with planar faces but it is not the case for non-linear, free-form faces. In the proposed approach, the faces that are handled during the tracing of seam segments are flagged. If there are convex vertices or faces that remain unflagged even though all the triplets identified at junction points have been processed, multiply connected sheets are indicated. In this case the tracing procedure is again initiated from the convex corner(s) that have not been flagged. The MAT for a multiply-connected object is shown in Fig. 12(i).

6.1.6. Limitations The obvious limitation of the algorithm is that it requires a convex corner to be present in the object. However, it is not necessary that convex corners be present as it can be the case when arbitrary free-form surfaces are involved. In such a case, the output from the algorithm will be an empty set. The seam is assumed to have only three touchpoints which need not be true as in several degenerate cases. For example, when two concentric sphere are involved, there is neither a convex corner nor a seam having only three touchpoints is present. The seam is also assumed to be connected, which is not necessarily true for multiply-connected objects. When the disconnected seams are present, the algorithm requires a convex corner to trace all the seams. Also, if there are unflagged faces but no unflagged convex vertices, the present algorithm cannot generate the multiply-connected sheets. The ribs are also not traced currently. However, it should be noted that tracing of a ridge is possible, given a seed point on the ridge [45]. The procedure followed on the failure of the curvature criterion will result in tracing the seam until a rib-end point is reached, and the corresponding touchpoint can then be used as seed point for ridge identification. The ridges can then be used to trace the ribs. This procedure, however, has not been implemented at present. Currently, only a constant step-size has been used while tracing. However, this can be improved to a curvature-based using the formulated differential equations (see Appendix A) and the stepsize can be made adaptive. This has not been implemented yet. Though the algorithm was tested for wriggles, the surfaces in general are noise-free. We have not considered noisy surfaces so far and we presume that the algorithm might require improvements for noisy surfaces. However, it should be mentioned that, in general, most algorithm that generate MAT (except when the input object is represented as point-set [26,13]), cannot handle noisy surfaces due to the fact that it can create numerical instability.

M. Ramanathan, B. Gurumoorthy / Computer-Aided Design (

)



13

7. Conclusions

satisfied. By substituting for B from Eq. (A.11) into Eq. (A.10), we get the following equation:

An algorithm for generating the Medial Axis Transform (MAT) 3D objects with free-form boundaries has been described. The algorithm generates an interior MAT of closed simply or multiply connected smooth solids by a tracing technique by marching along the boundary of the object. Criteria derived from the definition of the MAT are used to generate the points on the MAT and identify the junction points. The algorithm is shown to be robust and correct. Results of implementation on some test solids have been provided. The algorithm proposed generates the trace of seams and ribend points. Ribs are not traced currently and the precise tracing of the interior of medial sheets is yet to be implemented. An alternate approach to determining step sizes is to use the curvature measure, computed from from the set of equations (see Appendices A and C) replacing the global one that we have proposed. This is currently under investigation.

2 ⟨α n1 , α n1 ⟩ = ⟨S1 + α n1 − S2 , S1 + α n1 − S2 ⟩ + ⟨S1 + α n1 − S3 , S1 + α n1 − S3 ⟩

Appendix A. Tracing a seam between three surfaces The following is based on the derivation for bisectors in [49]. Consider the seam point B between S1 (u, v), S2 (s, t ), S3 (q, r ) (denoted as S1 , S2 and S3 ), three regular rational surfaces which are sufficiently differentiable as needed. Then B should satisfy the following equations.

 ∂ S1 B − S1 , =0 ∂u   ∂ S1 =0 B − S1 , ∂v   ∂ S2 B − S2 , =0 ∂s   ∂ S2 =0 B − S2 , ∂t   ∂ S3 B − S3 , =0 ∂q   ∂ S3 =0 B − S3 , ∂r 

(A.1)

(A.2)

(A.3)

(A.4)

(A.5)

(A.6)

⟨B − S1 , B − S1 ⟩ − ⟨B − S2 , B − S2 ⟩ = 0 ⟨B − S2 , B − S2 ⟩ − ⟨B − S3 , B − S3 ⟩ = 0 ⟨B − S3 , B − S3 ⟩ − ⟨B − S1 , B − S1 ⟩ = 0

(A.7) (A.8) (A.9)

where ⟨a, b⟩ denote the dot product between a and b. Eqs. (A.1) and (A.2) mean that the point B is located on the normal line of S1 . Eqs. (A.3) and (A.4) mean that the point B is located on the normal line of S2 and Eqs. (A.5) and (A.6) mean that the point B is located on the normal line of S3 . Moreover, Eqs. (A.7)–(A.9) constrains the point B to satisfy the distance criterion. Combining Eqs. (A.7) and (A.9), we get, 2⟨B − S1 , B − S1 ⟩ = ⟨B − S2 , B − S2 ⟩ + ⟨B − S3 , B − S3 ⟩.

(A.10)

 α=−

⟨S1 − S2 , S1 − S2 ⟩ + ⟨S1 − S3 , S1 − S3 ⟩   2 ⟨S1 − S2 , n1 ⟩ + ⟨S1 − S3 , n1 ⟩

(A.12)

 (A.13)

where α = α(u, v, s, t , q, r ). Substituting the above in Eq. (A.11) and updating the Eqs. (A.3)–(A.6) and (A.8), we have the following equations:

 ∂ S2 = 0, ∂s   ∂ S2 f, = 0, ∂t   ∂ S3 = 0, g, ∂q   ∂ S3 = 0, g, ∂r 

f,

⟨f , f ⟩ − ⟨g , g ⟩ = 0

(A.14)

(A.15)

(A.16)

(A.17) (A.18)

where f = f (u, v, s, t , q, r ) = B − S2 = (S1 − S2 ) − α ∗ n1

(A.19)

g = g (u, v, s, t , q, r ) = B − S3 = (S1 − S3 ) − α ∗ n1 .

(A.20)

The common zero-set of the Eqs. (A.14)–(A.18) satisfies all the constraints of Eqs. (A.1)–(A.9). Since there is one degree of freedom left in Eqs. (A.14)–(A.18), solving this system of equations yields a curve in R3 . Point on the seam is then identified by substituting the α value in Eq. (A.11) and followed by a check against curvature criterion. Appendix B. Propositions and proofs Proposition 1. When the object is simply-connected, boundary segments for which all the MAT segments (seam curves) have already been traced need not be considered in performing distance check to identify junction points, while generating subsequent seam segments. Proof. Let the proposition be not true. Then at some point ‘P’ on the MAT segment being generated using the surface triplet Si , Sj and Sk , the maximal ball will cut one or more boundary surfaces that have been already traced. In such a case it is possible to find a smaller ball centered at P that is tangential to a surface that has been cut (Sl ) and one of the three surfaces Si , Sj and Sk in the current triplet. This would result in a point on the surface cut (Sl ) having two MAT points corresponding to it. This violates the onto correspondence between a point on the boundary and its corresponding MAT point (the correspondence relation between the two is a continuous, one-to-one onto map) [48]. The maximal ball at point P therefore cannot cut any of the boundary surfaces that have already been traced. The proposition follows.  Let ABCDA be a boundary surface (Fig. 14) for which all the seams have been generated (dashed lines without arrows in Fig. 14). Let the junction points be denoted as B1 to B6 . If at all a seam has to be generated from a junction point (say B1 ), then the seam will only be moving away from the boundary surface ABCDA (as indicated by the dashed line with arrow in the figure).

Since B lies on the normal line of S1 , it can be written as B = S1 + α n1

(A.11) ∂S

∂S

where n1 = n1 (u, v) = ∂ u1 ∗ ∂v1 is an unnormalized normal vector of S1 and α ∈ R. Then Eqs. (A.1) and (A.2) are automatically

Proposition 2. When a MAT segment is being generated from a junction point by traversing along a surface triplet that share a convex corner, no other junction point (with a boundary segment other than the current triplet) will be encountered during the traversal until the convex corner if the object is simply-connected.

14

M. Ramanathan, B. Gurumoorthy / Computer-Aided Design (

)



Combining Eqs. (C.6) and (C.7), we get, 2 ⟨B − S1 , B − S1 ⟩ = ⟨B − C1 , B − C1 ⟩ + ⟨B − S2 , B − S2 ⟩ .

(C.9)

Since B lies on the normal line of S1 , it can be written as B = S1 + α n1 ,

(C.10) ∂ S1 ∂u

∂ S1 ∂v

where n1 = n1 (u, v) = ∗ is the normal vector of S1 and α ∈ R. Then Eqs. (C.1) and (C.2) are automatically satisfied. By substituting for B from Eq. (C.10) into Eq. (C.9), we get:



⟨S1 − C1 , S1 − C1 ⟩ + ⟨S1 − S2 , S1 − S2 ⟩ α=−   2 ⟨S1 − C1 , n1 ⟩ + ⟨S1 − S2 , n1 ⟩

 (C.11)

where α = α(u, v, s, t , r ). Substituting the above in Eq. (C.9) and updating Eqs. (C.3)–(C.6) and (C.8), we have: Fig. 14. Dashed lines (without arrows) showing all the seams for the surface ABCDA.

Proof. Let Si , Sj , and Sk be the surface triplet that intersects in a convex corner ‘A’ and seam for that need to be traced from a junction point ‘J’. Since they intersect in a convex corner, it is clear that there cannot be any other boundary segment between them. Assume that another junction point (say ‘J1’) is encountered during the tracing along this surface triplet. This implies that there are two MAT segments for the same triplet, one from the junction point ‘J’ to junction point ‘J1’ and the other that starts/ends from the end convex corner ‘A’. As there can be only one MAT segment for a surface triplet (because of the one to one onto correspondence between the points on the MAT and their corresponding points on the boundary segments), the tracing of MAT from junction point ‘J’ to the convex corner cannot encounter any other junction point. The proposition follows.  Appendix C. Tracing a seam for surface-surface-curve case Let S1 (u, v), S2 (s, t ) be two regular rational surfaces and C1 (r ) be a rational curve which is sufficiently differentiable as required. We consider the seam between these three entities. For convenience, we denote the surfaces as S1 , S2 and the curve as C1 . Let B be a point on the seam. B then should satisfy the following equations:

 ∂ S1 = 0, ∂u   ∂ S1 B − S1 , = 0, ∂v   ∂ S2 B − S2 , = 0, ∂s   ∂ S2 B − S2 , = 0, ∂t   dC1 B − C1 , = 0, 

B − S1 ,

dr

⟨B − C1 , B − C1 ⟩ − ⟨B − S1 , B − S1 ⟩ = 0, ⟨B − S1 , B − S1 ⟩ − ⟨B − S2 , B − S2 ⟩ = 0, ⟨B − S2 , B − S2 ⟩ − ⟨B − C1 , B − C1 ⟩ = 0.

(C.1)

(C.2)

(C.3)

(C.4)

(C.5) (C.6) (C.7) (C.8)

Eqs. (C.1) and (C.2) mean that the point B is located on the normal line of S1 . Eqs. (C.3) and (C.4) mean that it is located on the normal line of S2 and Eq. (C.6) that it is on the normal plane of C1 . Moreover, Eqs. (C.6)–(C.8) constrain the point B to be equidistant to the three boundary entities.

 ∂ S2 = 0, ∂s   ∂ S2 f, = 0, ∂t   dC1 g, = 0, 

f,

dr

⟨f , f ⟩ − ⟨g , g ⟩ = 0

(C.12)

(C.13)

(C.14) (C.15)

where, f = B − S2 = (S1 − S2 ) − α ∗ n1 ,

(C.16)

g = B − C1 = (S1 − C1 ) − α ∗ n1 .

(C.17)

Note that f = f (u, v, s, t , r ) and g = g (u, v, s, t , r ). The common zero-set of Eqs. (C.12)–(C.15) satisfies all the constraints of Eqs. (C.1)–(C.8). Since there is one degree of freedom left in Eqs. (C.12)–(C.15), solving this system of equations yields a curve in R3 . References [1] Blum H. A transformation for extracting new descriptors of shape. Models for the Perception of Speech and Visual Form 1967;362–81. [2] Ramanathan M, Gurumoorthy B. Constructing medial axis transform of planar domains with curved boundaries. Computer-Aided Design 2003;35(7): 619–32. [3] Siddiqi Kaleem, Pizer Stephen. Medial representations: mathematics, algorithms and applications. Springer Publishing Company Incorporated; 2008. [4] di Baja Gabriella Sanniti, Thiel Edouard. (3, 4)-weighted skeleton decomposition for pattern representation and description. Pattern Recognition 1994; 27(8):1039–49. [5] Montanari Ugo. Continuous skeletons from digitized images. Journal of the ACM 1969;16(4):534–59. [6] Armstrong CG. Modeling requirements for finite element analysis. ComputerAided Design 1994;26(July):573–8. [7] Gursoy HN, Patrikalakis NM. An automatic coarse and finite surface mesh generation scheme based on medial axis transform: part 1 algorithms. Engineering with Computers 1992;8:121–37. [8] O’Rourke Joseph. Computational geometry in C. New York (NY, USA): Cambridge University Press; 1994. [9] Reddy JM, Turkiyyah GM. Computation of 3D skeletons using a generalized delaunay triangulation technique. Computer-Aided Design 1995;27(9):677–94. [10] Gelston S, Dutta D. Boundary surface recovery from skeleton curves and surfaces. Computer Aided Geometric Design 1995;12(January):27–51. [11] Wolter FE. Cut locus and medial axis in global shape interrogation and representation. Technical Report Design Laboratory Memorandum 92-2, Department of Ocean Engineering, MIT, 1992. [12] Nackman L.R.. Curvature relations in three-dimensional symmetric axes. 1982; 20(1): 43–57. [13] Leymarie FF, Kimia BB. The medial scaffold of 3D unorganized point clouds. IEEE Transactions on Pattern Analysis and Machine Intelligence 2007;29(2): 313–30. [14] Elber G, Kim M. Bisector curves of planar rational curves. Computer-Aided Design 1998;30(14):1089–96. [15] Chang YC, Kao JH, Pinnila JM, Dong J, Prinz FB. Medial axis transform of general 2D shapes and 3D polyhedra for engineering applications. In: 6th IFIP working conference on geometric modeling: fundamentals and applications. 1998.

M. Ramanathan, B. Gurumoorthy / Computer-Aided Design ( [16] Elber G, Kim M-S. The bisector surface of rational space curves. ACM Transaction on Graphics 1998;17(1):32–9. [17] Dutta D, Hoffmann CM. On the skeleton of simple CSG objects. Journal of Mechanical Design, Transaction of ASME 1993;115(March):87–94. [18] Elber G, Kim M-S. Rational bisectors of csg primitives. In: Proceedings of the symposium on solid modeling and applications. Ann Arbor (MI): ACM; 1999. p. 159–66. [19] Elber G, Kim M-S. Computing rational bisectors. IEEE Computer Graphics and Applications 1999;(November–December):76–81. [20] Sherbrooke EC, Patrikalakis NM, Brisson E. An algorithm for medial axis transform of 3-D polyhedral solids. IEEE Transaction on Visualization and Computer Graphics 1996;2(1):44–61. [21] Sherbrooke EC, Patrikalakis NM, Brisson E. Computation of the medial axis transform of 3-D polyhedra. In: SMA’95: Proceedings of the third ACM symposium on solid modeling and applications. New York (NY, USA): ACM; 1995. p. 187–200. [22] Culver Tim, Keyser John, Manocha Dinesh. Exact computation of the medial axis of a polyhedron. Computer Aided Geometric Design 2004;21(1):65–98. [23] Amenta Nina, Kolluri Ravi Krishna. The medial axis of a union of balls. Computational Geometry: Theory and Applications 2001;20(1–2):25–37. [24] Attali D, Montanvert A. Computing and simplifying 2D and 3D continuous skeletons. Computer Vision and Image Understanding 1997;67(3):261–73. [25] Dey TK, Zhao W. Approximate medial axis as a voronoi subcomplex. In: Proceedings of the symposium on solid modeling and applications. Saarbrcken (Germany): ACM; 2002. p. 356–66. Max-Planck-Institut fur Informatik. [26] Dey TK, Woo H, Zhao W. Approximate medial axis for cad models. In: Proceedings of the symposium on solid modeling and applications. Seattle: ACM; 2003. p. 280–5. University of Washington. [27] Sheehy DJ, Armstrong CG, Robinson DJ. Shape description by medial surface construction. IEEE Transactions on on Visualization and Computer Graphics 1996;2(1):62–72. [28] Turkiyyah GM, Storti DW, Ganter M, Chen H, Vimawala M. An accelerated triangulation method for computing skeletons of free-form solid models. Computer-Aided Design 1997;29(1):5–19. [29] Lavender D, Bowyer A, Davenport J, Wallis A, Woodwark J. Voronoi diagrams of set theoretic solid models. IEEE Computer Graphics and Applications 1992; (September):69–77. [30] Etzion Michal, Rappoport Ari. Computing the voronoi diagram of a 3-D polyhedron by separate computation of its symbolic and geometric parts. In: SMA’99: proceedings of the fifth ACM symposium on solid modeling and applications. New York (NY, USA): ACM; 1999. p. 167–78. [31] Lee Yong-Gu, Lee Kunwoo. Computing the medial surface of a 3-D boundary representation model. Advances in Engineering Software 1997;28(10): 593–605. [32] Stroud Ian, Renner Gábor, Xirouchakis Paul. A divide and conquer algorithm for medial surface calculation of planar polyhedra. Computer-Aided Design 2007; 39(9):794–817. [33] Hanniel Iddo, Muthuganapathy Ramanathan, Elber Gershon, Kim Myung-Soo. Precise voronoi cell extraction of free-form rational planar closed curves. In: SPM’05: proceedings of the 2005 ACM symposium on solid and physical modeling. New York (NY, USA): ACM; 2005. p. 51–9. [34] Hanniel Iddo, Muthuganapathy Ramanathan, Elber Gershon, Kim Myung-Soo. Precise voronoi cell extraction of free-form planar piecewise c1 -continuous closed rational curves. International Journal of Computational Geometry and Applications 2007;17(5):453–86. [35] Aichholzer O, Aigner W, Aurenhammer F, Hackl T, Jüttler B, Rabl M. Medial axis computation for planar free-form shapes. Computer-Aided Design 2009; 41(5):339–49. [36] Ang PY, Armstrong CG. Adaptive shape-sensitive meshing of the medial axis. Engineering with Computers 2002;18:253–64. [37] Ramanathan M, Gurumoorthy B. Constructing medial axis transform of extruded and revolved 3D objects with free-form boundaries. ComputerAided Design 2005;37(13).

)



15

[38] Wolter FE, Friese KI. Local and global methods for analysis interogation, reconstruction, modification and design of shape. In: Proceedings of computer graphics international conference. Geneva (Switzerland): ACM; 2000. p. 137–51. [39] Ramanathan M, Gurumoorthy B. A tracing algorithm for constructing medial axis transform of 3D objects bound by free-form surfaces. In: SMI’05: proceedings of the international conference on shape modeling and applications 2005. Washington (DC, USA): IEEE Computer Society; 2005. p. 228–37. [40] Giblin P, Kimia BB. Formal classification of 3D medial axis points and their local geometry. IEEE Transaction on Pattern Analysis and Machine Intelligence 2004;26:238–51. [41] Damon James. Tree structure for contractible regions in R3 . International Journal of Computer Vision 2007;74(2):103–16. [42] Giblin PJ. Symmetry sets and medial axes in two and three dimensions. In: Proceedings of the 9th IMA conference on the mathematics of surfaces. London (UK): Springer-Verlag; 2000. p. 306–21. [43] Pollitt Anthony James. Euclidean and affine symmetry sets and medial axes. Ph.D. thesis. University of Liverpool; September 2004. [44] Terriberry TB, Gerig Guido. A continuous 3-D medial shape model with branching. In Penned X, Joshi S, editors, MICCAI 2006, workshop on the mathematical foundations of computational anatomy. In: Springer Lecture. October 2006. [45] Musuvathy Suraj, Cohen Elaine, Seong Joon-Kyung, Damon James. Tracing ridges on b-spline surfaces. In: SPM’09: 2009 SIAM/ACM joint conference on geometric and physical modeling. New York (NY, USA): ACM; 2009. p. 55–66. [46] Giblin Peter. Geometry of shape via circles and spheres. 2007; http://www.samsi.info/200708/shape/presentations/Peter.Giblin.pdf. [47] Allgower EL, Georg K. Intoduction to numerical continuation methods. SIAM; 2003. [48] Chou JJ. Voronoi diagrams for planar shapes. IEEE Computer Graphics and Applications 1995;15(2):52–9. [49] Elber G, Kim M-S. A computational model for nonrational bisector surfaces: curve-surface and surface–surface bisectors. TR-CIS9908. Center for Intelligent Systems technical reports, Department of Computer Science, Technion-Israel Institute of Technology; 1999. [50] Erickson Jeff. Nice point sets can have nasty delaunay triangulations. In: SCG’01: proceedings of the seventeenth annual symposium on computational geometry. New York (NY, USA): ACM; 2001. p. 96–105. [51] Lee DT. Medial axis transformation of a planar shape. IEEE Transactions on Pattern Analysis and Machine Intelligence 1982;4(4):362–9.

M. Ramanathan is currently an Assistant Professor in the Department of Engineering Design, Indian Institute of Technology, Madras. He received his M.Sc. (Engg.) and Ph.D. from the Department of Mechanical Engineering at the Indian Institute of Science, Bangalore, India. He earned a B.E. degree in Mechanical Engineering from Thiagarajar College of Engineering, Madurai, India. His current research interests include geometric modeling, computational geometry, shape and image search, mesh model analysis, and BioCAD. B. Gurumoorthy is currently a Professor in the Centre for Product Design and Manufacturing, and the Department of Mechanical Engineering at the Indian Institute of Science in Bangalore, India. He received his B.Tech in Mechanical Engineering from Indian Institute of Technology, Madras in 1982. He received his M.E. and Ph.D. in Mechanical Engineering from Carnegie Mellon University, Pittsburgh, USA in 1984 and 1987 respectively. His current research interests are in the areas of geometric modelling, computational metrology and product information modelling.

Suggest Documents