constructing medial axis transform of planar domains with curved boundariesraman/article.pdf ·...

14
UNCORRECTED PROOF Constructing medial axis transform of planar domains with curved boundaries M. Ramanathan, B. Gurumoorthy * Department of Mechanical Engineering, Indian Institute of Science, Bangalore 560 012, India Received 11 July 2001; revised 13 March 2002; accepted 20 March 2002 Abstract The paper describes an algorithm for generating an approximation of the medial axis transform (MAT) for planar objects with free form boundaries. The algorithm generates the MAT by a tracing technique that marches along the object boundary rather than the bisectors of the boundary entities. 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 or branch points and the search for these branch points is more efficient than while tracing the bisectors. The algorithm works for multiply connected objects as well. Results of implementation are provided. q 2002 Elsevier Science Ltd. All rights reserved. Keywords: Medial axis transform; Voronoi diagram; Free form boundaries 1. Introduction: medial axis transform The medial axis transform (MAT) was first introduced by Blum [1,2] to describe biological shape. It can be viewed as the locus of the center of a maximal disc as it rolls inside an object. Since its introduction, the MAT has found use in a wide variety of applications that primarily involve reason- ing about geometry or shape. The MAT has been used in pattern analysis and image analysis [3,4], finite element mesh generation [5,6], mold design [7] and path planning [8] to name a few. There is a one-to-one correspondence between the MAT and object boundary which means that for an object there will be a unique MAT. Moreover it is possible to reconstruct the object given its MAT [9]. 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) [10]. More importantly, 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 applied to application areas 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 inside D which lie at the centers of all closed discs (or balls in 3-D) which are maximal in D, together with the limit points of this locus. A closed disc (or ball) is said to be maximal in a subset D of the 2-D (or 3-D) space if it is contained in D but is not a proper subset of any other disc (or ball) contained in D. The radius function of the MA of 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 disc or ball. The MAT of D is the MA together with its associated radius function. The boundary and the corresponding MAT of an object is shown in Fig. 1. If the boundary segments of the object consists of only points, straight line segments and circular arcs, then the MAT segments will be one of the conic sections [11]. An important characteristic of the MAT is that it can be used to simplify the original object and still retain the original object’s information. For instance, the 2-D MAT defines a unique, coordinate-system-independent decomposition of a planar shape into lines and the 3-D MAT simplifies a solid model into a collection of surface patches. MAT of an object is therefore also called the skeleton or symmetric axis transform of a part/shape. Properties of MAT include: Uniqueness [24]. There is an unique MAT for a given object. Invertibility [9]. With the axis and its radius function one 0010-4485/02/$ - see front matter q 2002 Elsevier Science Ltd. All rights reserved. PII: S0010-4485(02)00085-4 Computer-Aided Design xx (xxxx) xxx–xxx www.elsevier.com/locate/cad * Corresponding author. E-mail addresses: [email protected] (B. Gurumoorthy); [email protected] (M. Ramanathan). JCAD 791—2/5/2002—AWINDOW—47146 – MODEL 5 ARTICLE IN PRESS 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112

Upload: others

Post on 01-Apr-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Constructing medial axis transform of planar domains with curved boundariesraman/article.pdf · 2017. 11. 3. · cases—a point and a rational curve in a plane for which case the

UNCORRECTED PROOF

Constructing medial axis transform of planar domains

with curved boundaries

M. Ramanathan, B. Gurumoorthy*

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

Received 11 July 2001; revised 13 March 2002; accepted 20 March 2002

Abstract

The paper describes an algorithm for generating an approximation of the medial axis transform (MAT) for planar objects with free form

boundaries. The algorithm generates the MAT by a tracing technique that marches along the object boundary rather than the bisectors of the

boundary entities. 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 or branch points and the search for these branch points is more

efficient than while tracing the bisectors. The algorithm works for multiply connected objects as well. Results of implementation are

provided. q 2002 Elsevier Science Ltd. All rights reserved.

Keywords: Medial axis transform; Voronoi diagram; Free form boundaries

1. Introduction: medial axis transform

The medial axis transform (MAT) was first introduced by

Blum [1,2] to describe biological shape. It can be viewed as

the locus of the center of a maximal disc as it rolls inside an

object. Since its introduction, the MAT has found use in a

wide variety of applications that primarily involve reason-

ing about geometry or shape. The MAT has been used in

pattern analysis and image analysis [3,4], finite element

mesh generation [5,6], mold design [7] and path planning

[8] to name a few. There is a one-to-one correspondence

between the MAT and object boundary which means that

for an object there will be a unique MAT. Moreover it is

possible to reconstruct the object given its MAT [9]. 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) [10]. More importantly, 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 applied to application areas 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 inside D which lie at

the centers of all closed discs (or balls in 3-D) which are

maximal in D, together with the limit points of this locus. A

closed disc (or ball) is said to be maximal in a subset D of the

2-D (or 3-D) space if it is contained in D but is not a proper

subset of any other disc (or ball) contained in D. The radius

function of the MA of 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 disc or

ball. The MAT of D is the MA together with its associated

radius function.

The boundary and the corresponding MAT of an object is

shown in Fig. 1. If the boundary segments of the object

consists of only points, straight line segments and circular

arcs, then the MAT segments will be one of the conic

sections [11]. An important characteristic of the MAT is that

it can be used to simplify the original object and still retain

the original object’s information. For instance, the 2-D

MAT defines a unique, coordinate-system-independent

decomposition of a planar shape into lines and the 3-D

MAT simplifies a solid model into a collection of surface

patches. MAT of an object is therefore also called the

skeleton or symmetric axis transform of a part/shape.

Properties of MAT include:

† Uniqueness [24]. There is an unique MAT for a given

object.

† Invertibility [9]. With the axis and its radius function one

0010-4485/02/$ - see front matter q 2002 Elsevier Science Ltd. All rights reserved.

PII: S0 01 0 -4 48 5 (0 2) 00 0 85 -4

Computer-Aided Design xx (xxxx) xxx–xxx

www.elsevier.com/locate/cad

* Corresponding author.

E-mail addresses: [email protected] (B. Gurumoorthy);

[email protected] (M. Ramanathan).

JCAD 791—2/5/2002—AWINDOW—47146 – MODEL 5

ARTICLE IN PRESS

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

Page 2: Constructing medial axis transform of planar domains with curved boundariesraman/article.pdf · 2017. 11. 3. · cases—a point and a rational curve in a plane for which case the

UNCORRECTED PROOF

can reconstruct the object by taking the union of all

circles centered on the points corresponding to the axis,

each with a radius given by radius function.

† Dimensional reduction [6]. The dimensionality of a

MAT is lower than that of its object.

† Topological equivalence [24]. A MAT is topologically

equivalent to its object.

† Symmetry information [26]. MAT establishes an object

centered representation from which individual shape

characteristics can be measured.

† One-to-one correspondence [22]. There exists an one-to-

one correspondence between the object boundary and its

MAT.

There have been several efforts reported for the

construction of MAT. These approaches can be classified

based on the type of representation of the part used in the

construction and on the nature of the description of MAT

constructed. A continuous description of the MAT is

possible from a continuous representation of the part only

for the case of polygons where the boundary consists of

linear segments. For a part with nonlinear or curved

segments a continuous description of MAT is only possible

if the part representation is discretized. This, however,

results in artificial MAT segments that are artifacts of the

representation used and not due to the underlying part

geometry (see Fig. 2) [12]. For objects with free-form

entities, a continuous description of the MAT is possible

only if it is possible to obtain a continuous description of the

bisector of a pair of free-form curved edges. For a pair of

edges in a plane the bisector is a set of points which are

equidistant from the two edges. It is possible to obtain a

continuous description of the bisector only for a few special

cases—a point and a rational curve in a plane for which case

the bisector is a rational curve [13] and two rational space

curves for which the bisector is a rational surface [14].

However, for the case of coplanar curves (polynomial or

rational), the bisector has been shown to be algebraic but not

rational [13]. This has resulted in the need for numerical

tracing of the bisector curves (or surfaces) [15,16] which is

computationally expensive [14]. 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. This adds to the substantial effort already

required in generating the bisector segments. For example

the dashed line in Fig. 3 (where B(a,b) denotes the bisector

between entities a and 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 some of which

may be nonlinear (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.

The choice of the part representation used and the type of

description of MAT obtained depends on the application

that the MAT is to be used for. For applications such as

finite element mesh generation and path planning a

discretized representation of the object could be used to

obtain a continuous MAT. It must be noted that even here

some effort is required in trimming and post-processing the

continuous MAT to be in conformity with the topology of

the free-form object. The additional MAT segments will

distort the reasoning based on MAT (see Fig. 2, where the

MAT is substantially different when the exact represen-

tation is used). Exact representation of the part has to be

used in applications where the geometry of the part has to be

reconstructed from the MAT [9]. Using the exact represen-

tation of the part for constructing the MAT also eliminates

the need for additional processing required to eliminate the

artificial segments that may arise due to the discretization

[12].

In this paper, the problem of generating a MAT for planar

objects with free-form curved entities has been addressed.

Fig. 1. Boundary and its medial axis.

Fig. 2. Effect of discretizing boundary on MAT.

Fig. 3. Difference between MAT and bisector.

JCAD 791—2/5/2002—AWINDOW—47146 – MODEL 5

M. Ramanathan, B. Gurumoorthy / Computer-Aided Design xx (xxxx) xxx–xxx2

ARTICLE IN PRESS

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

207

208

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

Page 3: Constructing medial axis transform of planar domains with curved boundariesraman/article.pdf · 2017. 11. 3. · cases—a point and a rational curve in a plane for which case the

UNCORRECTED PROOF

The algorithm proposed uses the exact representation of the

part and generates an approximate rational description (to

within a defined tolerance) of the MAT. The remainder of

this paper is structured as follows: Section 2 presents a

review of work reported on the construction of MAT.

Terminologies used in the paper are defined in Section 3 and

Sections 4 and 5 describe the algorithm and present the

results of implementation. A discussion on the directions for

future work is given in Section 6.

2. Literature review

The MAT was first introduced and explored by Blum [1,

2] to describe biological shape. Soon after its introduction,

continuous algorithms for computing the MAT were

developed for planar regions. Lee [17] developed an

Oðn log nÞ algorithm for polygons with nonconvex corners.

His algorithm was based on divide and conquer method

where the Voronoi diagram for the polygon is first generated

and then the Voronoi edges incident at the nonconvex vertex

of the polygon are removed to obtain the MAT for the

polygon.

Srinivasan and Nackman [18] presented an Oðnh þ

n log nÞ algorithm for multiply-connected polygons with h

holes which is basically an extension of Lee’s [17]

algorithm. Gursoy and Patrikalakis [5] developed an

algorithm to compute the MAT of a multiply-connected

planar region bound by circular arcs, and used this algorithm

to generate finite element meshes automatically. Their

algorithm is based on an offset process directed towards the

interior of a shape which is analogous to the propagation of

the grass-fire wavefront toward the interior of a shape. The

implementation details and extension of the algorithm to

trimmed curved surface patches is presented in a companion

paper [19].

Sheehy et al. [20] have presented an algorithm for medial

surface construction by exploiting the properties of

Delaunay triangulation of the domain and also on the

basis of definition and classification of the medial surface.

The emphasis of the algorithm is on computing the medial

surface topology correctly. It is indicated that the developed

algorithm can be extended to spheres having contact with

the object surface over a finite line or area.

Sherbrooke et al. [12] have presented an algorithm for

computing the MAT of 3-D polyhedral objects. The

algorithm is based on a classification scheme which relates

different parts of the MAT to one another and also provides

a continuous representation of the MA and associated radius

function. The algorithm is based on offset sweeping of the

boundary segments and solving appropriate equations using

singular value decomposition technique. They acknowledge

that the classification scheme for solids with curved

boundaries is more complicated and indicate that it is

possible to develop a connectivity scheme similar to the one

that they have developed for the polyhedral objects.

Lavender et al. [21] use an octree based approach to

determine the Voronoi diagram (more precisely, MAT) for

the set theoretic solid models, composed of unions,

intersections, and differences of primitive regions rep-

resented by a collection of polynomial inequalities.

Kim et al. [11] describe a method for constructing the

Voronoi diagram of a simple polygon consisting of points,

lines segments and/or arcs which are restricted to lie in a

plane. Their algorithm constructs the Voronoi diagram of

the interior of a simple polygon using the trisection of plane

method. Particular emphasis is placed on the representation

of bisectors using rational quadratic Bezier curve which is

claimed to unify four different cases.

Constructing the MAT for planar domains with curved

boundaries has been studied by Chou [22] and Ramamurthy

[23]. The main idea in these approaches revolves around

tracing the bisector of pairs of boundary entities and

trimming the bisector to obtain the correct topology of the

MAT.

Chou [22] has presented an algorithm for constructing

Voronoi diagrams (more precisely, MAT) of a domain D,

where D is a planar, simply connected, closed shape with a

boundary composed of curve segments, including points,

line segments, and analytic curves without holes using a

differential geometry approach. The boundary curve can

have both tangent and curvature discontinuity. It is

mentioned that the algorithm can be extended to curves

with zero curvature (straight lines) and curves with constant

curvature.

The approach outlined by Ramamurthy is based on

constructing bisectors of pairs of boundary entities in the

domain [13,15]. The approach generates points on the

bisector and then interpolates the points to obtain an

approximation to the bisector curve [15]. The points on the

bisector curve are obtained by constructing a point/curve

bisector and then intersecting the bisector with the normal to

the curve. Elber and Kim [14] present a symbolic

representation scheme for planar bisector curves that allows

the construction of bisector curves using B-spline subdivi-

sion techniques.

For planar domains with curved entities, the approaches

relying on tracing the bisector have to first obtain an

approximation of the bisector for each pair of edges

(untrimmed bisector for point-curve pair can be constructed

[13]) using either a numerical procedure [15] or a

combination of symbolic and numerical procedures [14].

Once the bisector segments are obtained these have to be

properly trimmed to obtain the correct topology of the

MAT. This requires utilities for computing intersections of

bisector segments represented as rational curves.

In this paper, an algorithm for generating an approxi-

mation of the MAT for 2-D objects with free-form entities

has been described. As the input is the exact boundary

representation, the approach presented can be categorized as

a continuous approach. The algorithm is broadly based on

the idea of tracing proposed by Chou [22]. The algorithm

JCAD 791—2/5/2002—AWINDOW—47146 – MODEL 5

M. Ramanathan, B. Gurumoorthy / Computer-Aided Design xx (xxxx) xxx–xxx 3

ARTICLE IN PRESS

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

254

255

256

257

258

259

260

261

262

263

264

265

266

267

268

269

270

271

272

273

274

275

276

277

278

279

280

281

282

283

284

285

286

287

288

289

290

291

292

293

294

295

296

297

298

299

300

301

302

303

304

305

306

307

308

309

310

311

312

313

314

315

316

317

318

319

320

321

322

323

324

325

326

327

328

329

330

331

332

333

334

335

336

Page 4: Constructing medial axis transform of planar domains with curved boundariesraman/article.pdf · 2017. 11. 3. · cases—a point and a rational curve in a plane for which case the

UNCORRECTED PROOF

presented, however, traces the MAT of the part, segment by

segment by marching along the boundary (as opposed to

stepping along the bisector as done by Chou [22]). This

allows the proposed algorithm to handle multiply-connected

objects.

3. Preliminaries

Points on the MAT can be classified based on the

properties of their maximal disks [24]. A point whose

maximal disc touches exactly two separate boundary

segments is called normal point. Point N (or any point on

the line segment (A,E1) excluding the end points A and E1)

in Fig. 4(a) is a normal point. Its underlying maximal disk is

shown in Fig. 4(b).

A point whose maximal disc touches the domain

boundary in three or more separate segments is called

branch point. Points E1 and F1 in Fig. 4(a) are branch

points. Fig. 4(c) shows the maximal disk corresponding to

the branch point E1.

A point whose maximal disc touches the boundary in

exactly one contiguous set is called an end point. Fig. 4(a),

shows the end points A, B, C and D. These points touch the

boundary at a point and the corresponding maximal disc is

of radius zero.

Blum and Nagel [24] view the MAT of a domain as

collection of simplified segments. A simplified segment is a

set of contiguous normal points bound by either a branch

point or an end point [24].

A point of contact with the domain boundary, of the

underlying disk of a point on the MAT is called the footpoint

of the point on the MAT. From the definition of the point

types in a MAT, a normal point will have two footpoints

(Fp1 and Fp2 in Fig. 4(b)), a branch point will have three or

more (Fp1, Fp2, and Fp3 in Fig. 4(c)) and an end point will

have one or more footpoints.

From the definition of the MAT the following two

conditions that have to be satisfied by points on a simplified

segment can be derived [22].

Distance criterion. Any point on a simplified segment

(apart from the end points of the segment) should be

equidistant to two different boundary segments.

Curvature criterion. 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. Otherwise, the disk will not satisfy the maximal

disk criterion [24] and so the point is no longer a MAT point

even though the equidistant criterion is satisfied (one can

call such points as bisector points since those points have to

be only equidistant [14]). Curvature criterion becomes very

important in the case of determining MAT points for free

form entities. Without this condition, the generated points

belong to a bisector segment and not to a MAT segment.

This is also one reason why any approach based on

generating bisectors of free-form edge pairs would require

additional processing.

In Fig. 5(a) line segments e–a1 and e–b1 are normal to

the boundary segments and also equal in length. So the point

e is a point on the MAT. But for the point e1 shown in Fig.

5(b), even though the line segments e1–a1 and e1–b1 are

normal to the boundary segments , they are not equal in

length. So point e1 is not a point on MAT.

Fig. 6 shows the curvature criterion (the distance

criterion is satisfied). Fig. 6(a) shows that the ball is

completely inside the boundary segments 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. A point

will belong to the MAT only when it satisfies both criteria.

4. Overview of algorithm

The algorithm works by finding the footpoint of a normal

MAT point on one edge given the footpoint on another edge.

This is accomplished by solving the intersection of the

normals to the two edges and imposing the distance

Fig. 4. Classification of points on MA.

Fig. 5. Distance criterion.

JCAD 791—2/5/2002—AWINDOW—47146 – MODEL 5

M. Ramanathan, B. Gurumoorthy / Computer-Aided Design xx (xxxx) xxx–xxx4

ARTICLE IN PRESS

337

338

339

340

341

342

343

344

345

346

347

348

349

350

351

352

353

354

355

356

357

358

359

360

361

362

363

364

365

366

367

368

369

370

371

372

373

374

375

376

377

378

379

380

381

382

383

384

385

386

387

388

389

390

391

392

393

394

395

396

397

398

399

400

401

402

403

404

405

406

407

408

409

410

411

412

413

414

415

416

417

418

419

420

421

422

423

424

425

426

427

428

429

430

431

432

433

434

435

436

437

438

439

440

441

442

443

444

445

446

447

448

Page 5: Constructing medial axis transform of planar domains with curved boundariesraman/article.pdf · 2017. 11. 3. · cases—a point and a rational curve in a plane for which case the

UNCORRECTED PROOF

criterion. The next point on the MAT is obtained by finding

the intersection of the normals to the edges on the boundary

followed by check against curvature criterion. The algor-

ithm therefore replaces the intersection of bisectors (favored

by current art [22,23,25]) with intersection of normals.

Given that the normals are linear in contrast to the bisectors

which can be rational curves or quadratic conics, the

computational effort and complexity are reduced

considerably.

Tracing of the MAT starts from a convex vertex, where

both the footpoints are known (they are the convex vertex

itself). It is assumed that the input domain contains atleast

one convex vertex. During the tracing of normal MAT

points, at chosen intervals, the algorithm checks for the

existence of a branch point. This check is a distance check

with all other edges in the object. However, the algorithm

does not check against all the edges and proposes a more

restricted check that gives the correct results. For determin-

ing the presence of a branch point it will be shown that it is

sufficient to check for interference with edges that have not

been traced thus far. This ensures that as the generation of

MAT progresses, the check for branch point involves fewer

edges.

Once the existence of a branch point is confirmed, two of

the footpoints corresponding to the branch point are known

and the remaining footpoints of the branch point are

determined from the edges that fail the distance check.

Failure of the curvature criterion indicates the presence

of a point with locally maximal positive curvature (LMPC)

(curvature at a point ‘p’ on a curve is locally maximal if it is

greater than the curvatures at points p þ e and p 2 e [22])

in the vicinity. In such cases the MAT segment will

terminate at the center of curvature corresponding to the

point that has the maximal curvature locally. The tracing

procedure used therefore originates at a convex vertex and

ends at either a convex vertex or at the center of curvature of

a point that has LMPC. At each branch point one or more

new segments become available to be traced and the

algorithm traces each of these.

The algorithm terminates when all the convex vertices in

the part have been visited and no edge pairs remain to be

traced at any branch point. The algorithm uses two step

sizes. One is used for generating the next MAT point and the

other is used while checking for potential branch points.

The output of the algorithm is a set of points on each

MAT segment. Rational curves are fit to points in each

segment to a desired tolerance to obtain the MAT

segments.

5. Algorithm details

The algorithm for constructing the MAT consists of the

following steps:

† tracing step;

† checking for a branch point;

† proceeding from a branch point;

† handling a reflex corner;

† termination of the algorithm;

† illustration of the algorithm.

5.1. Tracing step

The boundary segments are parameterized such that the

interior (material side) is always to the left of increasing

direction of the parameter. In the following, with reference

to the convex corner A (refer Fig. 7), the parameter for the

left boundary segment is termed as u1 and that for the right

is termed as u2.. The tracing step consists of the following

tasks:

1. Commence tracing from a convex vertex (let e1, e2

be the left and right edge at the vertex and let u1 and u2

Fig. 7. Parameterization of edges.

Fig. 6. Curvature criterion.

JCAD 791—2/5/2002—AWINDOW—47146 – MODEL 5

M. Ramanathan, B. Gurumoorthy / Computer-Aided Design xx (xxxx) xxx–xxx 5

ARTICLE IN PRESS

449

450

451

452

453

454

455

456

457

458

459

460

461

462

463

464

465

466

467

468

469

470

471

472

473

474

475

476

477

478

479

480

481

482

483

484

485

486

487

488

489

490

491

492

493

494

495

496

497

498

499

500

501

502

503

504

505

506

507

508

509

510

511

512

513

514

515

516

517

518

519

520

521

522

523

524

525

526

527

528

529

530

531

532

533

534

535

536

537

538

539

540

541

542

543

544

545

546

547

548

549

550

551

552

553

554

555

556

557

558

559

560

Page 6: Constructing medial axis transform of planar domains with curved boundariesraman/article.pdf · 2017. 11. 3. · cases—a point and a rational curve in a plane for which case the

UNCORRECTED PROOF

be the parameters corresponding to the two edges,

respectively).

2. Locate the next footpoint on e2 by incrementing u2 by

the tracing step size (du2).

3. Find the corresponding footpoint on e1. This step

requires the intersection of normals to the two edges

and enforcing the distance criterion. The computational

effort is in finding the roots of a nonlinear equation in one

variable (see Appendix A for details). Convergence is

fast as a good initial guess is always available (the

previous footpoint on the edge).

4. Check if the intersection point satisfies the curvature

check.

The intersection of normals that also satisfies the distance

criterion is the MAT point. Such a point exists as the MAT

point is the intersection of the bisector and the normals from

the respective edges. Here one normal is fixed and the other

is searched for such that their intersection is the MAT point

(equidistant from the respective edges).

The check against the curvature criterion is a comparison

of the radius function (distance between the footpoint and

the intersection point) with the radius of curvature at the

footpoint. The procedure followed when the curvature

criterion is violated at a point during tracing is discussed

later during the description of tracing from a branch point.

5.2. Check for branch point

A simplified MAT segment terminates at one of the

following—a convex vertex, a branch point, the center of

curvature of a point with LMPC. Termination of the tracing

of a single MAT segment at a convex vertex is straightfor-

ward as it only involves comparing the parameter values

with the bounds on the same and checking if the vertex is a

convex vertex or not. When the segment terminates at a

branch point, however, additional checks are required to

first determine the existence of the branch point and then to

trace a new segment from the branch point. Termination at

the center of curvature of a point with LMPC is indicated by

either failure in the curvature criterion or when the end of an

edge that is not a convex vertex is reached without

encountering a branch point. Both these cases are described

later.

The existence of a branch point can be identified by

finding the distance of the current MAT point from the

remaining boundary segments and checking if this distance

is less than the radius function at the current MAT point. It is

extremely costly to check the distance at each and every

point generated during the tracing with all the remaining

boundary segments. Two things are done to reduce the effort

in this step. First, the distance check is done for only a few

boundary segments (and not all boundary segments in the

part). Secondly, the check for existence of a branch point is

done only after a finite portion of the MAT segment is

generated (and not at every point on the MAT).

The distance check to identify a branch point need not

include all the boundary segments because of the following

propositions.

Proposition 1. Portions of the boundary segments for which

the MAT segments have already been traced need not be

considered in performing distance check to identify branch

points, while generating subsequent MAT segments.

Proof. Let the proposition be not true. Then at some point

‘P’ on the MAT segment being generated using the edge

pair ei and ej; the maximal disk will cut one or more

boundary edges that have been already traced. In such a case

it is possible to find a smaller disk centered at P that is

tangential to an edge that has been cut ðekÞ and one of the

two edges ei and ej in the current pair. This would result in a

point on the edge segment cut ðekÞ 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) [22]. The onto

correspondence holds even in the presence of reflex

(concave) corners when the reflex corner is represented by

multiple segments of zero length but with a normal. The

maximal disk at point P therefore cannot cut any of the

boundary edges that have already been traced. The

proposition follows. A

Checking for the existence of a branch point is not done

at every point traced on the MAT. It is therefore possible to

overshoot a branch point during the tracing procedure. A

simple bisection procedure implemented between the last

point on the MAT where the distance check was not violated

and the current point where the check is violated will

identify the branch point.

5.3. Tracing from a branch point

At a branch point, the current segment being traced will

continue along one or more branches. For each branch

chosen (represented by a pair of edges or an edge and a

reflex vertex), the edge common with the edge pair

corresponding to the current segment will continue to be

traversed in the same direction. The direction of traversal

for the other edge (handling reflex vertices will be described

later) is opposite to the direction of traversal of the first edge

in the pair. If the first edge is traversed along the direction of

parameterization (increasing value of its parameter), then

the other edge will be traversed in the decreasing value of its

parameter and, vice versa. The points on the MAT segment

corresponding to this pair is determined as described earlier.

This process can be made more efficient by noting that when

a pair is traversed from a branch point, further checks for

branch points need not be made if the pair has a common

convex vertex (Proposition 2). There may be branch points

JCAD 791—2/5/2002—AWINDOW—47146 – MODEL 5

M. Ramanathan, B. Gurumoorthy / Computer-Aided Design xx (xxxx) xxx–xxx6

ARTICLE IN PRESS

561

562

563

564

565

566

567

568

569

570

571

572

573

574

575

576

577

578

579

580

581

582

583

584

585

586

587

588

589

590

591

592

593

594

595

596

597

598

599

600

601

602

603

604

605

606

607

608

609

610

611

612

613

614

615

616

617

618

619

620

621

622

623

624

625

626

627

628

629

630

631

632

633

634

635

636

637

638

639

640

641

642

643

644

645

646

647

648

649

650

651

652

653

654

655

656

657

658

659

660

661

662

663

664

665

666

667

668

669

670

671

672

Page 7: Constructing medial axis transform of planar domains with curved boundariesraman/article.pdf · 2017. 11. 3. · cases—a point and a rational curve in a plane for which case the

UNCORRECTED PROOF

due to the edges in the current pair, however, these will be

trapped by the failure of the curvature condition.

The above procedure is repeated recursively for any

branch points encountered (where possible) during tracing

from a branch point. The recursion terminates at a convex

vertex or at the center of curvature of LMPC or when no

further branch points are obtained.

Proposition 2. When a MAT segment is being generated

from a branch point by traversing along a pair of edges that

share a convex corner, no other branch point (with a

boundary segment other than the current pair ) will be

encountered during the traversal till the convex corner.

Proof. The proof is established by contradiction. Fig. 8

shows the tracing of the MAT from a branch point (point

‘b’) using the edge pair (AB, AE) that intersects in a convex

corner A. Since they intersect in a convex corner, it is clear

that there cannot be any other boundary segment between

them. Assume that another branch point (‘b1’) is encoun-

tered during the tracing along this edge pair. This implies

that there are two MAT segments for the pair (AB, AE). One

from the branch point ‘b’ to branch point ‘b1’ and the other

that starts/ends from the end point A. As there can be only

one MAT segment for a pair of boundary segments (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 branch point ‘b’ to the

convex corner cannot encounter any other branch point. The

proposition follows.

This implies that there is no need for the distance check

for the MAT points generated during traversal from a

branch point along a pair of edges that share a convex

corner. There may be branch points due to the edges in the

current pair. These will be, however, trapped by the failure

of the curvature condition.

Failure in the curvature criteria indicates that the tracing

of MAT has missed a branch point. This is because the

check for branch points does not include the current edge

pair and in this case, the third footpoint also belongs to one

of the edges in the edge pair used for tracing. In Fig. 9(a),

MAT corresponding to the edge pair (AC, AB) is being

traced. The curvature criterion is violated at the point D1 on

edge AB indicating a branch point earlier. The footpoints

corresponding to this branch point (Br in the figure) are G, F

and H where F, H belong to the same edge AB. In this case,

tracing with the current edge pair is stopped and tracing of

the MAT commences at the point where the curvature

criterion is violated. Portions of the edge to either side of

this point are treated as the edge pair. At the point itself the

point on the MAT is the center of curvature at that point.

Tracing of the MAT with the above edge pair continues till

it meets the MAT segment traced when the curvature

criterion was violated. Referring to Fig. 9(b), the point on

the MAT corresponding to point D1 (where the curvature

criterion was violated) is the center of curvature at D1 (point

CC in the figure). Treating D1A and D1B as the edge pair,

the MAT is traced from point CC till it meets the MAT

traced earlier at the point ‘Br’. Further tracing of the MAT

will now proceed with the edge pair AC and AB

corresponding to the footpoints ‘G’ and ‘H’.

Checking against the curvature criterion is better than

including the current edge pair also in the check for branch

point because, in the latter case tracing of the MAT from the

branch point becomes cumbersome. In Fig. 9(a), the

distance check that includes the current edge pair (AB–

AC) can correctly identify the branch point ‘Br’ and the

three footpoints ‘G’, ‘F’ and ‘H’. However, for generating

the portion of the MAT corresponding to the segment FH on

the edge AB, the termination point ‘CC’ of the correspond-

ing segment of the MAT has to be identified apriori. This

will be the center of curvature of the point that has LMPC

[22]. The check against the curvature criterion mentioned

above will identify the termination point correctly enabling

Fig. 8. Existence of a branch point.

Fig. 9. Violation of curvature condition.

JCAD 791—2/5/2002—AWINDOW—47146 – MODEL 5

M. Ramanathan, B. Gurumoorthy / Computer-Aided Design xx (xxxx) xxx–xxx 7

ARTICLE IN PRESS

673

674

675

676

677

678

679

680

681

682

683

684

685

686

687

688

689

690

691

692

693

694

695

696

697

698

699

700

701

702

703

704

705

706

707

708

709

710

711

712

713

714

715

716

717

718

719

720

721

722

723

724

725

726

727

728

729

730

731

732

733

734

735

736

737

738

739

740

741

742

743

744

745

746

747

748

749

750

751

752

753

754

755

756

757

758

759

760

761

762

763

764

765

766

767

768

769

770

771

772

773

774

775

776

777

778

779

780

781

782

783

784

Page 8: Constructing medial axis transform of planar domains with curved boundariesraman/article.pdf · 2017. 11. 3. · cases—a point and a rational curve in a plane for which case the

UNCORRECTED PROOF

the tracing of this portion of the MAT. This algorithm finds

the point with LMPC and its center of curvature as required

and does not need to process the boundary of the entire

domain to identify such points as is done by Chou [22].

5.4. Handling a reflex corner

A reflex corner is represented as a set of circular arcs with

zero radius. Associated with each circular arc segment is a

normal. The normals are assigned to these segments in order

so that the change in the normal while crossing the reflex

corner is divided across these segments (see Fig. 10).

Tracing of points on the MAT for a pair consisting of an

edge and a reflex corner proceeds in the same manner as for

tracing the MAT for a pair of edges. The check for the

presence of a branch point has to be done here as well as it is

possible to encounter a branch point as shown in Fig. 10(a)

(Point G is one such point). Fig. 10(b) shows the MAT

segments that emanate from branch point G.

5.5. Handling smooth junctions between edges

The domain may contain edges that are tangential, that is

the junction between two edges is smooth. In such cases, the

tracing procedure will not terminate when the smooth

junction (end of the edge) is reached as it is not a convex

vertex. The tracing procedure continues with the neighbor-

ing tangential edge and the other edge in the current pair

(Fig. 11(a)). When the neighboring tangential edge is the

same as the other edge in the current pair (refer Fig. 11(b),

where DE is the edge), it indicates that there is a point on

this edge where the curvature is locally maximal. In Fig.

11(b), ‘L’ is the point with LMPC. The MAT segment will

now be traced from the last MAT point traced to the center

of curvature at this point (point ‘P’ in Fig. 11(b)). In other

cases, termination of a MAT segment will happen at a

branch point or convex corner as described earlier.

5.6. Termination of the algorithm

The algorithm ends when all the convex vertices have

been visited by the tracing step and no edge pairs remain to

be traced at any branch point.

5.7. Illustration of the algorithm

In this section we use a simple example (Fig. 12) to

illustrate the procedure to construct the MAT. Tracing starts

at a convex vertex, ‘A’ (Fig. 12(a)). For every foot point on

edge AB (obtained by incrementing the parameter by the

tracing step size) the tracing step computes the correspond-

ing foot point on edge AG and the point on the MAT, Pi. In

Fig. 12(b) the distance criterion is violated at point P0

as the

disk corresponding to this point cuts the edge FG. The

procedure then uses the bisection method between this point

and the previous point found on the MAT to identify the

branch point B1 (Fig. 12(c)). The boundary segments

corresponding to the branch point are AB, AG and FG.

Tracing now continues with the pair AG and FG. As these

two edges share a convex vertex (G) no check for branch

point is required and the tracing of the MAT segment ends at

G (Fig. 12(d)). The tracing procedure next starts at B1 with

the other possible pair of edges, namely AB and FG (Fig.

12(e)).

Tracing with this pair continues till the point N1 on the

MAT where one of the footpoint (for the edge AB) reaches

the limiting value (Fig. 12(e)). This end point is also a

concave vertex that has been represented as a sequence of

zero length edges with normals uniformly varying between

the normals to edges AB and BC at B. The procedure now

traces with pairs formed by the edge FG and each of these

zero length edges at B in order to obtain the segment N1–

B2 of the MAT (Fig. 12(f)). As explained earlier, B2 is

Fig. 10. Handling a reflex corner.

Fig. 11. Tangential edges.

JCAD 791—2/5/2002—AWINDOW—47146 – MODEL 5

M. Ramanathan, B. Gurumoorthy / Computer-Aided Design xx (xxxx) xxx–xxx8

ARTICLE IN PRESS

785

786

787

788

789

790

791

792

793

794

795

796

797

798

799

800

801

802

803

804

805

806

807

808

809

810

811

812

813

814

815

816

817

818

819

820

821

822

823

824

825

826

827

828

829

830

831

832

833

834

835

836

837

838

839

840

841

842

843

844

845

846

847

848

849

850

851

852

853

854

855

856

857

858

859

860

861

862

863

864

865

866

867

868

869

870

871

872

873

874

875

876

877

878

879

880

881

882

883

884

885

886

887

888

889

890

891

892

893

894

895

896

Page 9: Constructing medial axis transform of planar domains with curved boundariesraman/article.pdf · 2017. 11. 3. · cases—a point and a rational curve in a plane for which case the

UNCORRECTED PROOF

identified as the branch point. The procedure now traces the

segment B2–F of the MAT using the edge pair FG and EF

(Fig. 12(g)). Tracing starts again from the branch point B2

and proceeds with the remaining dummy edges representing

the concave vertex B and the edge EF. After the last of the

segments in the list of dummy edges is reached (at the point

N2 on the MAT in Fig. 12(h)) the tracing continues with the

edge pair BC and EF. Tracing of this pair stops when BC

reaches the limiting parameter value (at the MAT point S1

in Fig. 12(i)). Since C is a smooth corner, tracing of MAT

continues between the pair CD and EF. Tracing with this

pair stops with the detection of the branch point B3

Fig. 12. Illustration of the algorithm.

JCAD 791—2/5/2002—AWINDOW—47146 – MODEL 5

M. Ramanathan, B. Gurumoorthy / Computer-Aided Design xx (xxxx) xxx–xxx 9

ARTICLE IN PRESS

897

898

899

900

901

902

903

904

905

906

907

908

909

910

911

912

913

914

915

916

917

918

919

920

921

922

923

924

925

926

927

928

929

930

931

932

933

934

935

936

937

938

939

940

941

942

943

944

945

946

947

948

949

950

951

952

953

954

955

956

957

958

959

960

961

962

963

964

965

966

967

968

969

970

971

972

973

974

975

976

977

978

979

980

981

982

983

984

985

986

987

988

989

990

991

992

993

994

995

996

997

998

999

1000

1001

1002

1003

1004

1005

1006

1007

1008

Page 10: Constructing medial axis transform of planar domains with curved boundariesraman/article.pdf · 2017. 11. 3. · cases—a point and a rational curve in a plane for which case the

UNCORRECTED PROOF

(Fig. 12(j)) and the MAT segment B3–D is traced using the

edge pair ED–DC (Fig. 12(k)).

The procedure again returns to the branch point B3 to

trace with the other possible edge pair DE–EF (Fig. 12(l)).

When the tracing with this edge pair ends at point E, there

are no edge pairs at any branch point left to be traced and

there are no convex vertices that have not been visited. The

procedure therefore terminates (Fig. 12(l)).

6. Results and discussion

The algorithm described has been implemented and this

section presents the results obtained for some typical planar

domains. The input to the algorithm is the B-Rep of the

object. Curved entities are represented using rational B-

Spline curves. Output is the set of MAT segments and each

MAT segment is available as either a set of points or set of

B-Spline segments.

The step size for tracing is chosen to be smaller than the

smallest feature in the domain (tracked through the length of

boundary segments) so that no features are missed.

Presently the implementation uses a step size of 0.001 (for

domains scaled to 1) or one hundredth of the smallest edge

whichever is smaller, for tracing. This choice gives a fine

approximation to the MAT with reasonably real time

response (order of seconds for the parts shown in this

section). A larger step size will result in a coarser

approximation. The step size for checking for branch points

is taken to be an order of magnitude greater than the step

size for tracing.

Since the algorithm traces the MAT segment by segment,

and also each segment starts from a branch point (except the

starting one) with a predetermined direction (parameter in

the edge to the left of MAT always decreases and that for the

edge to the right of the MAT always increases), directed

graphs can be used to represent MAT. The graph

representing the MAT will be acyclic for multiply

connected domains. Fig. 13 shows the MAT for a

multiply-connected object and its representation as a

directed acyclic graph(dag). The first node represents the

starting convex corner and the end nodes (no connecting

segment from these nodes) represent the remaining convex

corners and centers of curvature of points with LMPC, and

the interior nodes represent the branch points.

MAT obtained for some typical free-form planar objects

are shown in Figs. 14–19. The algorithm is able to generate

the MAT for objects with complex boundary profiles (Figs.

14 and 15), concave vertices (Fig. 16), spiral shaped (Fig.

17), and, multiply-connected objects (Fig. 18) and objects

with smooth corners (Fig. 19). Smooth vertices are marked

by dots to distinguish the tangential edges in Fig. 19. Note

that the MAT is generated even for domains with

constricted passages and sharp changes in the curvature

along the boundary (Fig. 15).

Table 1 shows the time taken for generating MAT for

some of the figures. The implementation is on a PIII

machine with 256MB RAM. The step size for tracing and

checking for branch points are 0.001 and 0.01, respectively.

If the step size is larger, then a coarser MAT will be

generated but takes lesser time. Figs. 20 and 21 show the

MAT for the object in Fig. 15 with step sizes for tracing set

Fig. 13. Representation of MAT.

Fig. 14. MAT for test object 1.

JCAD 791—2/5/2002—AWINDOW—47146 – MODEL 5

M. Ramanathan, B. Gurumoorthy / Computer-Aided Design xx (xxxx) xxx–xxx10

ARTICLE IN PRESS

1009

1010

1011

1012

1013

1014

1015

1016

1017

1018

1019

1020

1021

1022

1023

1024

1025

1026

1027

1028

1029

1030

1031

1032

1033

1034

1035

1036

1037

1038

1039

1040

1041

1042

1043

1044

1045

1046

1047

1048

1049

1050

1051

1052

1053

1054

1055

1056

1057

1058

1059

1060

1061

1062

1063

1064

1065

1066

1067

1068

1069

1070

1071

1072

1073

1074

1075

1076

1077

1078

1079

1080

1081

1082

1083

1084

1085

1086

1087

1088

1089

1090

1091

1092

1093

1094

1095

1096

1097

1098

1099

1100

1101

1102

1103

1104

1105

1106

1107

1108

1109

1110

1111

1112

1113

1114

1115

1116

1117

1118

1119

1120

Page 11: Constructing medial axis transform of planar domains with curved boundariesraman/article.pdf · 2017. 11. 3. · cases—a point and a rational curve in a plane for which case the

UNCORRECTED PROOFas 0.01 and 0.1, respectively. Table 2 shows the time taken

for generating MAT with different step sizes for the object

shown in Fig. 15.

6.1. Discussion

The completeness of the algorithm can be derived from

the graph structure of MAT. ‘Completeness’ here refers to

the generation of all the segments constituting the MAT.

The starting and end nodes in the graph representing the

MAT correspond to convex corners and centers of curvature

of points with LMPC present in the object. Each branch of

the graph corresponds to a MAT segment. Each downward

traversal of a branch corresponds to the generation of a

MAT segment. The algorithm starts at A (Fig. 13(b)) and

proceeds toward 1 generating the segment A–1. From 1 the

downward traversal generates the MAT segments 1–2 and

1–4. Then it starts form 2 and generates 2–B and 2–3.

From 4, MAT segments 4–3 and 4–D are generated.

Finally 3–C is generated. A topological sort [27] (a variant

of the depth first search) will list all the convex corners in

the object indicating that all the MAT segments have been

generated.

The proposed algorithm does not trace the bisectors for

all the boundary pairs and then trim the bisectors. Rather it

traces the MAT segments directly by tracing the boundary

of the domain. As the points on the MAT determined are

based on the definition of the MAT, the result will always be

correct. Branching from one pair of boundary segments to

another is also based on the continuity of the MAT. The

Fig. 16. MAT for test object 3.

Fig. 17. MAT for spiral shaped object.

Fig. 18. MAT for a multiply connected object.

Fig. 15. MAT for test object 2.

JCAD 791—2/5/2002—AWINDOW—47146 – MODEL 5

M. Ramanathan, B. Gurumoorthy / Computer-Aided Design xx (xxxx) xxx–xxx 11

ARTICLE IN PRESS

1121

1122

1123

1124

1125

1126

1127

1128

1129

1130

1131

1132

1133

1134

1135

1136

1137

1138

1139

1140

1141

1142

1143

1144

1145

1146

1147

1148

1149

1150

1151

1152

1153

1154

1155

1156

1157

1158

1159

1160

1161

1162

1163

1164

1165

1166

1167

1168

1169

1170

1171

1172

1173

1174

1175

1176

1177

1178

1179

1180

1181

1182

1183

1184

1185

1186

1187

1188

1189

1190

1191

1192

1193

1194

1195

1196

1197

1198

1199

1200

1201

1202

1203

1204

1205

1206

1207

1208

1209

1210

1211

1212

1213

1214

1215

1216

1217

1218

1219

1220

1221

1222

1223

1224

1225

1226

1227

1228

1229

1230

1231

1232

Page 12: Constructing medial axis transform of planar domains with curved boundariesraman/article.pdf · 2017. 11. 3. · cases—a point and a rational curve in a plane for which case the

UNCORRECTED PROOFgraph structure used for both tracing the boundary and

storing the MAT ensures completeness. As mentioned

earlier, numerical tracing of bisectors cannot be avoided and

therefore the proposed technique will be as accurate as those

based on tracing bisectors. It is also believed that the

trimming of bisectors will require as much computation if

not more as generating them to obtain the MAT [15]. Also,

the techniques based on tracing the bisectors will have to

subject the MAT segments generated to the curvature

criterion [22]. The algorithm does not have the problems of

degeneracy as mentioned by Kim et al. [11]. Degeneracy

refers to the need for processing many branches in the

algorithm, each dealing with an exception to the main

algorithm [11]. The main steps of the algorithm described

are those of tracing the simplified segment, checking for a

branch point and handling reflex corners. Each step in itself

has no exceptions to handle and works for the general case.

Let n be the number of boundary segments and N be the

number of points on each boundary segments. The

complexity of the main computational tasks in the

procedure are Oð1Þ for computing the intersection of two

normals and OðnÞ for implementing the distance check. The

complexity for finding the part of the MAT corresponding to

a single boundary edge is OðNnÞ and for the complete

domain is OðNn2Þ which is the worst case complexity of the

algorithm.

A formal analysis of the algorithm with respect to the

effect of numerical errors due to finite precision compu-

tation has not been done. It is believed that errors in the

computation will not affect the topology of the resulting

MAT (and therefore result in abnormal behaviour of the

algorithm). It must be mentioned that as long as the feature

size constraint is not violated, even a coarser step size for

tracing will yield the correct connectivity between the MAT

segments. The algorithm is robust enough to capture an

overshot branch point. The branching decisions are there-

fore made correctly, while maintaining continuity of both

the tracing procedure and of the MAT.

7. Conclusions

An algorithm for generating the MAT for planar domains

Table 1

Time taken for generation of MAT for typical objects

Figure no. No. of MAT seg. Time (s)

14 21 3

15 9 2

16 15 1

17 32 3

Fig. 20. MAT for test object 2 with step size 0.01.

Fig. 21. MAT for test object 2 with step size 0.1.

Fig. 19. MAT for an object having tangential edges.

JCAD 791—2/5/2002—AWINDOW—47146 – MODEL 5

M. Ramanathan, B. Gurumoorthy / Computer-Aided Design xx (xxxx) xxx–xxx12

ARTICLE IN PRESS

1233

1234

1235

1236

1237

1238

1239

1240

1241

1242

1243

1244

1245

1246

1247

1248

1249

1250

1251

1252

1253

1254

1255

1256

1257

1258

1259

1260

1261

1262

1263

1264

1265

1266

1267

1268

1269

1270

1271

1272

1273

1274

1275

1276

1277

1278

1279

1280

1281

1282

1283

1284

1285

1286

1287

1288

1289

1290

1291

1292

1293

1294

1295

1296

1297

1298

1299

1300

1301

1302

1303

1304

1305

1306

1307

1308

1309

1310

1311

1312

1313

1314

1315

1316

1317

1318

1319

1320

1321

1322

1323

1324

1325

1326

1327

1328

1329

1330

1331

1332

1333

1334

1335

1336

1337

1338

1339

1340

1341

1342

1343

1344

Page 13: Constructing medial axis transform of planar domains with curved boundariesraman/article.pdf · 2017. 11. 3. · cases—a point and a rational curve in a plane for which case the

UNCORRECTED PROOF

with free form boundaries has been described. The

algorithm generates the MAT by a tracing technique that

marches along the object boundary rather than the bisectors

of the boundary entities. Criteria derived from the definition

of the MAT are used to generate the points on the MAT and

identify the branch points. The algorithm is shown to be

robust and correct. A smooth approximation to the desired

accuracy is obtained by interpolating the points obtained on

each simplified segment of the MAT. Results of implemen-

tation on typical domains, including multiply-connected

domains have been provided.

Appendix A. Determining point on MA

The procedure outlined here for determining the

footpoint on the other edge and the intersection of the

normals to obtain the point on MA is based on the derivation

in Ref. [14]. The procedure is described here using the

notation used in this paper for completeness.

Let C1ðu1Þ ¼ ðx1ðu1Þ; y1ðu1ÞÞ and C2ðu2Þ ¼ ðx2ðu2Þ;y2ðu2ÞÞ be the underlying curve of edges e1 and e2;respectively. Curves C1ðu1Þ and C2ðu2Þ are planar regular

rational curves with C1-continuity.

Let N1ðu1Þ ¼ ð2y01ðu1Þ; x01ðu1ÞÞ and N2ðu2Þ ¼ ð2y02ðu2Þ;x02ðu2ÞÞ be the (in plane) normals of C1ðu1Þ and C2ðu2Þ;respectively. The intersection point of the normal lines is

given by

C1ðu1Þ þ N1ðu1Þa ¼ C2ðu2Þ þ N2ðu2Þb

for some a and b: We then have the following two equations

in two unknowns, a and b :

x1ðu1Þ2 y01ðu1Þa ¼ x2ðu2Þ2 y02ðu2Þb;

y1ðu1Þ2 x01ðu1Þa ¼ y2ðu2Þ2 x02ðu2Þb:

Solving for a and b

a ¼ aðu1; u2Þ

¼ðx1ðu1Þ2 x2ðu2ÞÞx

02ðu2Þ þ ðy1ðu1Þ2 y2ðu2ÞÞy

02ðu2Þ

x02ðu2Þy01ðu1Þ2 x01ðu1Þy

02ðu2Þ

;b

¼ bðu1; u2Þ

¼ðx1ðu1Þ2 x2ðu2ÞÞx

01ðu1Þ þ ðy1ðu1Þ2 y2ðu2ÞÞy

01ðu1Þ

x02ðu2Þy01ðu1Þ2 x01ðu1Þy

02ðu2Þ:

ðA1Þ

The point of intersection of the two normals is given by:

Pðu1; u2Þ ¼ C1ðu1Þ þ N1ðu1Þaðu1; u2Þ

¼ C2ðu2Þ þ N2ðu2Þbðu1; u2Þ: ðA2Þ

For Pðu1; u2Þ to be a point on the MA of the edges e1 and e2;it must be equidistant from e1ðC1ðu1ÞÞ and e2ðC2ðu2ÞÞ :

kPðu1; u2Þ2 C1ðu1Þk ¼ kðC1ðu1Þ þ N1ðu1Þaðu1; u2Þ2 C1ðu1Þk

¼ kðC2ðu2Þ þ N2ðu2Þbðu1; u2Þ2 C2ðu2Þk

¼ kPðu1; u2Þ2 C2ðu2Þk

The above condition simplifies to

kN1ðu1Þaðu1; u2Þk ¼ kN2ðu2Þbðu1; u2Þk:

Squaring the above equation and substituting aðu1; u2Þ and

bðu1; u2Þ from Eq. (A1) into the resulting equation, we get

0 ¼ kN1ðu1Þ;N1ðu1Þlaðu1; u2Þ2 2 kN2ðu2Þ;N2ðu2Þlbðu1; u2Þ

2

¼ kN1ðu1Þ;N1ðu1Þl

�ððx1ðu1Þ2 x2ðu2ÞÞx

02ðu2Þ þ ðy1ðu1Þ2 y2ðu2ÞÞy

02ðu2ÞÞ

2

ðx02ðu2Þy01ðu1Þ2 x01ðu1Þy

02ðu2ÞÞ

2

2 kN2ðu2Þ;N2ðu2Þl

�ððx1ðu1Þ2 x2ðu2ÞÞx

01ðu1Þ þ ðy1ðu1Þ2 y2ðu2ÞÞy

01ðu1ÞÞ

2

ðx02ðu2Þy01ðu1Þ2 x01ðu1Þy

02ðu2ÞÞ

2:

ðA3Þ

The denominator of Eq. (A3) would vanish when the

normals of the two curves are either parallel or opposite (the

normals overlap) at some values of the parameters u1 and

u2: For the case where N1ðu1Þ and N2ðu2Þ are neither parallel

nor opposite, the denominator of Eq. (A3) cannot vanish and

the condition in Eq. (A3) becomes:

0 ¼ F1ðu1; u2Þ ¼�x012ðu1Þ þ y012ðu1Þ

��ðx1ðu1Þ2 x2ðu2ÞÞx

02ðu2Þ

þ ðy1ðu1Þ2 y2ðu2ÞÞy02ðu2Þ

�22�x022ðu2Þ þ y022ðu2Þ

��ðx1ðu1Þ

2 x2ðu2ÞÞx01ðu1Þ þ ðy1ðu1Þ2 y2ðu2ÞÞy

01ðu1Þ

�2: (A4)

Given the parametric value u1 of the footpoint C1ðu1Þ on

edge e1 of the point on the MA, the solution of Eq. (A4) is

the parameter u2 of the corresponding footpoint C2ðu2Þ on

edge e2: The point on the MA is obtained from Eq. (A2).

The condition:

x01ðu1Þy02ðu2Þ2 x02ðu2Þy

01ðu1Þ ¼ 0;

indicates that the normals of the curves are parallel or

opposite. For the cases where the normals overlap each

other, the parametric variables ðu1 and u2Þ must also satisfy

the following conditions:

Table 2

Time taken for generation of MAT for various step sizes

Figure no. Step size Time (s)

15 0.001 2

20 0.01 1

21 0.1 1

JCAD 791—2/5/2002—AWINDOW—47146 – MODEL 5

M. Ramanathan, B. Gurumoorthy / Computer-Aided Design xx (xxxx) xxx–xxx 13

ARTICLE IN PRESS

1345

1346

1347

1348

1349

1350

1351

1352

1353

1354

1355

1356

1357

1358

1359

1360

1361

1362

1363

1364

1365

1366

1367

1368

1369

1370

1371

1372

1373

1374

1375

1376

1377

1378

1379

1380

1381

1382

1383

1384

1385

1386

1387

1388

1389

1390

1391

1392

1393

1394

1395

1396

1397

1398

1399

1400

1401

1402

1403

1404

1405

1406

1407

1408

1409

1410

1411

1412

1413

1414

1415

1416

1417

1418

1419

1420

1421

1422

1423

1424

1425

1426

1427

1428

1429

1430

1431

1432

1433

1434

1435

1436

1437

1438

1439

1440

1441

1442

1443

1444

1445

1446

1447

1448

1449

1450

1451

1452

1453

1454

1455

1456

Page 14: Constructing medial axis transform of planar domains with curved boundariesraman/article.pdf · 2017. 11. 3. · cases—a point and a rational curve in a plane for which case the

UNCORRECTED PROOF

ðx1ðu1Þ2 x2ðu2ÞÞx01ðu1Þ þ ðy1ðu1Þ2 y2ðu2Þy

01ðu1Þ ¼ 0;

ðx1ðu1Þ2 x2ðu2ÞÞx02ðu2Þ þ ðy1ðu1Þ2 y2ðu2ÞÞy

02ðu2Þ ¼ 0:

In these cases, the footpoint C2ðu2Þ is obtained by

intersecting the normal at C1ðu1Þ with the edge e2. The

mid-point of the vector between the two footpoints C1ðu1Þ

and C2ðu2Þ is taken as the point on the MA.

References

[1] Blum H. A transformation for extracting new descriptors of shape. In:

Dunn W, editor. Models for the perception of speech and visual form.

Cambridge: MIT Press. p 362–80.

[2] Blum H. Biological shape and visual science (Part I). J Theor Biol

1973;38:205–87.

[3] Baja GS, Thiel E. (3–4)-Weighted skeleton decomposition for pattern

representation and description. Pattern Recogn 1994;27(8):1039–49.

[4] Montanari U. Continuous skeletons from digitized images. J Assoc

Comput Machinery 1969;16(4):534–49.

[5] Gursoy HN, Patrikalakis NM. An automatic coarse and finite surface

mesh generation scheme based on medial axis transform: Part 1

Algorithms. Engng Computers 1992;8:121–37.

[6] Armstrong CG. Modeling requirements for finite element analysis.

Comput Aided Des 1994;26(7):573–8.

[7] Ramanathan M. Medial axis transform for the prediction of shrinkage

and distortion in castings. M.Sc. Thesis, Department of Mechanical

Engineering, Indian Institute of Science, Bangalore, India.

[8] O’Rourke J. Computational Geometry in C. Cambridge; 1993.

[9] Gelston S, Dutta D. Boundary surface recovery from skeleton curves

and surfaces. Comput Aided Geometr Des 1995;12:27–51.

[10] Wolter FE. Cut locus and medial axis in global shape interrogation

and representation. Comput Aided Geometr Des 1992;.

[11] Kim D, Hwang I, Park B. Representing the Voronoi diagram of a

simple polygon using r ational quadratic Bezier curves. CAD 1995;

27(8):605–14.

[12] Sherbrooke EC, Patrikalakis NM, Brisson E. Computation of the

medial axis transform of 3-D polyhedra. Proceedings of the Solid

Modeling ’95. p. 187–99.

[13] Farouki R, Johnstone J. The bisector of a point and a plane parametric

curve. Comput aided Geometr des 1994;11(2):117–51.

[14] Elber G, Kim M. Bisector curves for planar rational curves. CAD

1998;30(14):1089–96.

[15] Farouki R, Ramamurthy R. Specified-precision computation of curve/

curve bisectors. Int J Comput Geometr Applic 1998;8(5,6):599–617.

[16] Culver T, Keyser J, Manocha D. Accurate computation of the medial

axis of a polyhedron. Proceedings of the Symposium on Solid

Modeling, Ann Arbor, Michigan; 1999. p. 179–90.

[17] Lee DT. Medial axis transformation of a planar shape. IEEE Trans

Pattern Anal Mach Intell 1982;PAMI-4(4):362–9.

[18] Srinivasan V, Nackman LR. Voronoi diagram for multiply-connected

polygonal domains I: Algorithm. IBM J Res Develop 1987;31(3):

361–72.

[19] Gursoy HN, Patrikalakis NM. An automatic coarse and finite surface

mesh generation scheme based on medial axis transform: Part 2

Implementation. Engng Comput 1992;8:179–96.

[20] Sheehy DJ, Armstrong CG, Robinson DJ. Shape description by medial

surface construction. IEEE Trans Visualisat Comput Graphics 1996;

2(1):62–72.

[21] Lavender D, Bowyer A, Davenport J, Wallis A, Woodwark J. Voronoi

diagrams of set theoretic solid models. IEEE Comput Graphics Applic

1992;September:69–77.

[22] Chou JJ. Voronoi diagrams for planar shapes. IEEE Comput Graphics

Applic 1995;March:52–9.

[23] Ramamurthy R. Voronoi diagrams and medial axes of planar domains

with curved boundaries. PhD Thesis, Department of Mechanical

Engineering, University of Michigan, Ann Arbor, Michigan; 1998.

[24] Blum H, Nagel RN. Shape description using weighted symmetric axis

features. Pattern Recogn 1978;10:167–80.

[25] Held M. Voronoi diagram and offset curves of curvilinear polygons.

Comput Aided Des 1998;30(4):287–300.

[26] Ho S-B, Dyer C. Shape smoothing using medial axis properties. IEEE

Pattern Anal Mach Intell 1986;8(4):512–9.

[27] Aho, Hopcroft, Ullman, Data structures and algorithms, Reading,

MA: Addison-Wesley; 2000.

Ramanathan M. is currently working as a research scholar in the

Department of Mechanical Engineering at the Indian Institute of Science,

Bangalore, India. He earned a BE degree in Mechanical Engineering from

Thiagarajar college of Engineering, Madurai, India and received the

Masters’ degree from Indian Institute of Science. His current research

interests include geometric modeling, computational geometry and

computer graphics.

B. Gurumoorthy is currently an Associate 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 ME and PhD 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, features technology, reverse engineering and rapid

prototyping

JCAD 791—2/5/2002—AWINDOW—47146 – MODEL 5

M. Ramanathan, B. Gurumoorthy / Computer-Aided Design xx (xxxx) xxx–xxx14

ARTICLE IN PRESS

1457

1458

1459

1460

1461

1462

1463

1464

1465

1466

1467

1468

1469

1470

1471

1472

1473

1474

1475

1476

1477

1478

1479

1480

1481

1482

1483

1484

1485

1486

1487

1488

1489

1490

1491

1492

1493

1494

1495

1496

1497

1498

1499

1500

1501

1502

1503

1504

1505

1506

1507

1508

1509

1510

1511

1512

1513

1514

1515

1516

1517

1518

1519

1520

1521

1522

1523

1524

1525

1526

1527

1528

1529

1530

1531

1532

1533

1534

1535

1536

1537

1538

1539

1540

1541

1542

1543

1544

1545

1546

1547

1548

1549

1550

1551

1552

1553

1554

1555

1556

1557

1558

1559

1560

1561

1562

1563

1564

1565

1566

1567

1568