Citation |

- Permanent Link:
- https://ufdc.ufl.edu/UFE1001154/00001
## Material Information- Title:
- Partitioning 3-D regions into cuboids
- Copyright Date:
- 2008
## Subjects- Subjects / Keywords:
- Algorithms ( jstor )
Awns ( jstor ) Engineering ( jstor ) Geometric lines ( jstor ) Heuristics ( jstor ) Maxims ( jstor ) Optimal solutions ( jstor ) Rectangles ( jstor ) Terminator regions ( jstor ) Vertices ( jstor )
## Record Information- Source Institution:
- University of Florida
- Holding Location:
- University of Florida
- Rights Management:
- Copyright the author. Permission granted to the University of Florida to digitize, archive and distribute this item for non-profit research and educational purposes. Any reuse of this item in excess of fair use or other copyright exemptions requires permission of the copyright holder.
- Embargo Date:
- 8/8/2002
- Resource Identifier:
- 52188756 ( OCLC )
## UFDC Membership |

Downloads |

## This item is only available as the following downloads: |

Full Text |

PAGE 1 P AR TITIONING 3-D REGIONS INTO CUBOIDS By ANUJ JAIN A THESIS PRESENTED TO THE GRADUA TE SCHOOL OF THE UNIVERSITY OF FLORID A IN P AR TIAL FULFILLMENT OF THE REQUIREMENTS F OR THE DEGREE OF MASTER OF SCIENCE UNIVERSITY OF FLORID A 2002 PAGE 2 A CKNO WLEDGMENTS I wish to express m y deep est gratitude and wholehearted appreciation to m y advisor, Dr. Sarta j K. Sahni. I am extremely thankful to him for his sagacious guidance, immeasurable patience and supp ort that he pro vided me during the course of m y researc h. He has enabled me to dev elop an ob jectiv e thinking pro cess that not only led to a successful accomplishmen t of this w ork but is going to guide me in all m y future endea v ors. I w ould also lik e to thank Dr. Jatinder P alta and Dr. Randy Cho w for serving on m y committee. I also thank Dr. Mic hael F rank for agreeing to substitute on m y committee, in the absence of Dr. Cho w. I am also thankful to Dr. Jim Dempsey and Dr. Siy ong Kim for man y fruitful discussions that help ed in m y researc h w ork. I am also thankful to Haejae Jung for giving me access to his w ork and his test data. I w ould lik e to thank m y friends Jagat Desai and V atsala Desai for making me feel at home during m y studies here. I also thank m y friends Srijit Kamath and Andrew Lomonoso v for b eing suc h go o d friends, and the man y in teresting con v ersations I had with them. Finally , I w ould lik e to express m y deep est regard and gratitude to m y paren ts and m y sister. Their lo v e, supp ort and encouragemen t ha v e b een with me throughout the p erio d of m y studies. I could ha v e nev er ac hiev ed this but for their understanding and condence in me. I dedicate this w ork to them. ii PAGE 3 T ABLE OF CONTENTS A CKNO WLEDGMENTS . . . . . . . . . . . . . . . . . . . . . . . . . ii LIST OF FIGURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv ABSTRA CT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi CHAPTERS 1 INTR ODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1 Ov erview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Thesis Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 PR OBLEM DESCRIPTION . . . . . . . . . . . . . . . . . . . . . . 4 3 ANAL YSIS F OR 2-D REGIONS . . . . . . . . . . . . . . . . . . . . . 8 4 ANAL YSIS F OR 3-D REGIONS . . . . . . . . . . . . . . . . . . . . . 18 5 NEW HEURISTIC . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 6 EXPERIMENT AL RESUL TS . . . . . . . . . . . . . . . . . . . . . . 39 7 CONCLUSION . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 REFERENCES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 BIOGRAPHICAL SKETCH . . . . . . . . . . . . . . . . . . . . . . . . 43 iii PAGE 4 LIST OF FIGURES 1.1 Radiological distance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2.1 2-D region with holes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2 3-D region with a hole . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.1 Degenerate Region . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.2 Non-degenerate region . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.3 First rectangle formed b y Algorithm 1 . . . . . . . . . . . . . . . . . . . 10 3.4 Conca v e v ertex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.5 Another conca v e v ertex . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.6 V ertex of 3 rectangles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.7 T-in tersection formed b y a c hord . . . . . . . . . . . . . . . . . . . . . . 14 3.8 Result of Algorithm 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4.1 Non-Simple region . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4.2 Degenerate conca v e edges . . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.3 Slice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.4 Slice segmen t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.5 Horizon tal slice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.6 A partitioning obtained b y slice segmen ts . . . . . . . . . . . . . . . . . . 21 4.7 P artitioning obtained b y Algorithm 1 . . . . . . . . . . . . . . . . . . . . 23 4.8 v is a v ertex of cub oid r 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.9 v is a v ertex of cub oid r 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.10 New v ertex v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 4.11 Example of K and P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 4.12 T otally con v ex v ertex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 iv PAGE 5 4.13 SSP of a simple region . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 4.14 Optimal partitioning of a 3-D region with holes . . . . . . . . . . . . . . 34 4.15 P ossible partitioning obtained b y Algorithm 1 . . . . . . . . . . . . . . . 34 5.1 Region to b e partitioned . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 5.2 Optimal SSP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 v PAGE 6 Abstract of Thesis Presen ted to the Graduate Sc ho ol of the Univ ersit y of Florida in P artial F ulllmen t of the Requiremen ts for the Degree of Master of Science P AR TITIONING 3-D REGIONS INTO CUBOIDS By An uj Jain August 2002 Chairman: Sarta j Sahni Ma jor Departmen t: Computer and Information Science and Engineering In this thesis w e analyze the problem of decomp osing a rectilinear 3-Dimensional heterogeneous phan tom in to homogeneous cub oids. One of the applications of this problem o ccurs in radiation treatmen t planning. F or transp ort calculations in v olv ed in this application, radiological distances need to b e computed b et w een p oin ts in a heterogeneous phan tom. One of the w a ys to compute radiological distances for a giv en ra y is to partition the phan tom in to homogeneous cub oids and then examine the in tersection p oin ts of the ra y with these cub oids. P olynomial time solutions exist for the partitioning problem in 2-Dimensional space. Ho w ev er, the problem is kno wn to b e NP-complete for 3-Dimensional phan toms. W e analyze the problem with a partitioning sc heme called slice segmen t partitioning. F rom the observ ations made in the analysis, w e prop ose a new heuristic that partitions a heterogeneous phan tom in to homogeneous cub oids. The exp erimen tal results on real computer tomograph y (CT) data sho w an impro v emen t of ab out 65 p ercen t o v er the kno wn heuristic, in terms of the n um b er of cub oids obtained. The new heuristic can b e further enhanced, utilizing the observ ations made in the analysis. vi PAGE 7 CHAPTER 1 INTR ODUCTION 1.1 Ov erview F or dose computation during radiation treatmen t planning, radiological distances need to b e calculated to compute the eect from one p oin t to another p oin t. In Figure 1.1, there are t w o regions, A and B. Let the regions A and B ha v e densities d 1 and d 2, resp ectiv ely . Also, let s 1, s 2 and s 3 b e the Euclidean distances b et w een p oin ts, p and r , b et w een r and s , and b et w een s and q resp ectiv ely . Then, the radiological distance b et w een p oin ts p and q is s 1 d 1 + s 2 d 2 + s 3 d 1. p q r s s1 s2 s3 A B Figure 1.1: Radiological distance T o compute this radiological distance, w e need to nd the in tersection p oin ts r and s , whic h can b e done b y ra y tracing. So, w e can describ e the problem as follo ws: Problem 1 Ther e is a heter o gene ous phantom in thr e e dimensional sp ac e in which e ach voxel may have a dier ent density. The phantom has fac es p ar al lel to the x-y, y-z and z-x planes. 1 PAGE 8 2 Given a query line se gment l with arbitr ary dir e ction, nd al l the interse ction p oints with dier ent density b oundaries in the se quenc e. A p ossible approac h for solving this problem is one wherein some geometric mo dels are dev elop ed [1]. The geometry of the region is represen ted b y some simple geometric shap es designed man ually and algorithms are designed that when applied to these geometric mo dels, p erform ecien t transp ort calculations [1]. As an attempt to automate this pro cess of forming a geometric mo del for the region, w e examine the problem of partitioning the region in to a minim um n um b er of disjoin t cub oids. There are ecien t partitioning algorithms in t w o dimensional space [2-4], but minimal partitioning in three dimensional space is kno wn to b e NP-complete [5]. Tw o-Dimensional partitioning has applications in computer graphics, data bases, image pro cessing, VLSI la y out, and art w ork analysis [3 ]. Minim um n um b er of nono v erlapping rectangles in a 2-Dimensional rectilinear region, is giv en b y the form ula n= 2 + w k d , where n is the n um b er of v ertices, w is the n um b er of holes or windo ws in the region, k is the n um b er comp onen ts and d is the maxim um n um b er of indep enden t degenerate c hords [2 ] (all these terms are dened in c hapter 2). An algorithm dev elop ed in Imai and Asano [6] partitions a 2-Dimensional rectilinear region in to rectangles in O ( n 3 = 2 l og n ) time, where n is the n um b er of v ertices in the region. An algorithm dev elop ed in an article b y Nahar and Sahni [3 ] partitions the 2-Dimensional rectilinear region in to rectangles in O ( k l og ( k ) + n ) time, where n is the n um b er of v ertices in the region and k is the n um b er of v ertical in v ersions. This algorithm uses only horizon tal cuts for partitioning. Some sc hemes that ha v e b een used for ra y tracing, are based on quadtrees or o ctrees [7]. These sc hemes use a regular partitioning strategy , indep enden t of the image b eing partitioned. Therefore, these sc hemes do not result in a v ery go o d partitioning and giv e man y more rectangular (for 2-Dimensional images) or cub oidal regions (for 3-Dimensional phan toms) than are necessary . PAGE 9 3 Jung [7] has prop osed a heuristic that impro v es up on a regular kind of partitioning based on quadtrees and o ctrees. In this thesis w e analyze the problem of partitioning a region in to rectangles (for 2-Dimensional regions) or cub oids (for 3-Dimensional regions). In particular the eectiv eness of the heuristic of Jung [7] is examined. Based on our analysis, a new impro v ed heuristic is prop osed that impro v es up on the heuristic of Jung [7]. Exp erimen tal results sho w an impro v emen t o v er the heuristic of Jung [7], b y ab out 65 p ercen t, in terms of the n um b er of cub oids. The new heuristic prop osed can b e further impro v ed as suggested in Chapter 7. 1.2 Thesis Organization The rest of the thesis is organized as follo ws. Chapter 2 describ es the problem and the heuristic prop osed b y Jung [7 ]. Chapter 3 analyses the problem for 2-Dimensional regions. Chapter 4 analyses the problem for 3-Dimensional regions. Chapter 5 prop oses a new heuristic that tak es some adv an tages of the observ ations made in the analysis. Chapter 6 giv es some exp erimen tal results obtained b y comparing the new heuristic and the heuristic of Jung [7]. Chapter 7 con tains the conclusion and scop e for future w ork. PAGE 10 CHAPTER 2 PR OBLEM DESCRIPTION The problem of partitioning a 3 Dimensional region in to cub oids can b e dened as follo ws. Problem 2 Given a heter o gene ous phantom in 3 Dimensional (3-D) sp ac e, r epr esente d as a thr e e dimensional arr ay of voxels. Each voxel may have a dier ent density value and has fac es p ar al lel to x-y, y-z and z-x planes. Partition this phantom into cub oids of uniform density. F rom the giv en phan tom ha ving dieren t densities, c ho ose one particular densit y among the dieren t densities presen t in the phan tom. The c hosen densit y w ould form a three dimensional rectilinear region if w e consider all the other densities as exterior to the region. In terior of the region is comp osed only of the c hosen densit y v alue. This three dimensional region is partitioned in to cub oids. Then another densit y v alue ma y b e c hosen to form a dieren t three dimensional region. This pro cess con tin ues till regions represen ted b y all the densit y v alues are partitioned in to cub oids. A t this p oin t the giv en heterogeneous phan tom w ould b e partitioned in to cub oids of uniform densit y . Therefore, essen tially the problem to b e solv ed is Problem 3 De c omp ose a given 3-D r e ctiline ar r e gion that might c ontain \holes" (dene d b elow) and may b e c omp ose d of mor e than one \c omp onent" (dene d b elow), into a minimal numb er of cub oids. This problem is kno wn to b e NP-complete [5]. So a heuristic needs to b e prop osed that can attempt to get near the optimal solution. Denition 1 R e ctiline ar 3-D R e gion { A 3-D r e gion that is b ounde d by fac es p ar al lel to x-y, y-z or z-x planes. 4 PAGE 11 5 Denition 2 Holes in r e gion { These ar e voids or op en sp ac es within a close d r e gion as shown in Figur e 2.1 for 2-D r e gion (w1 and w2 ar e holes), and Figur e 2.2 for 3-D r e gions (inner cub oid is a hole). The terms \holes" and \windows" ar e use d synonymously. 1 2 3 4 56 7 8 9 10 11 12 13 14 1516 1718 1920 r1 w1 r5 r2 r3 w2 r4 holes Figure 2.1: 2-D region with holes Interior v Convex edge Concaveedge totally convex vertex v' totally concave vertex l 270 h shaded cuboid as a hole h within the region. The bigger cuboid is the whole region with the Figure 2.2: 3-D region with a hole Denition 3 Comp onents of a r e gion { These ar e close d sp ac es that ar e a p art of the r e gion. F or a p art of the r e gion to qualify as a single c omp onent, every voxel in it should b e r e achable fr om every other voxel in it without cr ossing a b oundary. A lso, ther e should b e no other voxel in the r e gion that c an b e r e ache d by these voxels without cr ossing a b oundary. Denition 4 R e ctiline ar 2-D R e gion { A 2-D r e gion that is b ounde d by either horizontal or vertic al e dges, i.e. e dges p ar al lel to x or y axis. PAGE 12 6 A region partitioning algorithm w as prop osed [7] that partitions the giv en 3-D region with dieren t densities in to cub oids. Algorithm 1 The algorithm c onsists of two steps: 1. Cub oid Construction: In this step the given heter o gene ous phantom is de c omp ose d into a set of cub oids. Way this is done is to start with disjoint cub oids (initial voxels), whose union is the given r e gion. Then, p airs of neighb oring cub oids with same density ar e c ombine d in a r e gular fashion: A long the x axis, rst two neighb or cub oids ar e mer ge d if they have the same density and same size. A long the y axis, two cub oids ar e also mer ge d if they have the same density and size. A long the z axis, two cub oids c an b e mer ge d if the same two c onditions hold. Then again, along the x dimension, cub oids ar e c ombine d. In this way, cub oid mer ge c ontinues until no mor e cub oids ar e c ombine d. 2. Cub oid Gr owing: In this step the numb er of cub oids is de cr e ase d, by extending e ach cub oid as much as p ossible, eliminating the cub oids having the same density as the gr owing cub oid, when the gr owing cub oid me ets them. The heuristic is to gr ow the biggest cub oid by volume, among the ungr own cub oids rst. In this cub oid, the lar gest fac e is chosen to move outwar ds. If ther e is a tie, the cub oid or fac e is arbitr arily chosen. The fac e is move d outwar d til l a fac e with dier ent density or a fac e of an alr e ady gr own cub oid is met. While extending e ach fac e, ungr own cub oids, with the same density ar e absorb e d into the gr owing cub oid. If a cub oid is ful ly c ontaine d within the gr owing fac e, that cub oid is absorb e d c ompletely into the gr owing cub oid. If a cub oid is p artial ly c ontaine d, only the p art c ontaine d in the gr owing fac e is mer ge d into the gr owing cub oid, and the r est not c ontaine d is p artitione d to form new cub oids. L ater on, these new cub oids ar e che cke d for cub oid gr owing one after the other ac c or ding to their size. PAGE 13 7 A 2-D v ersion of this algorithm can b e obtained b y just eliminating the w ork done in one of the three dimensions. Therefore, the merging in the cub oid construction step is done only in sa y , x-y plane (th us forming rectangles instead of cub oids). Similarly the rectangles obtained are gro wn only in 2 dimensions (x and y). The eectiv eness of this algorithm is examined. The analysis b egins with considering the algorithm in a 2-Dimensional (2-D) region. It is pro v ed that the algorithm giv es an optimal solution for a non-degenerate 2-D region (dened later). F or degenerate regions (dened later) the algorithm can b e far from optimal. The upp er b ound of ho w far it go es from optimal is also examined. Then the algorithm is examined for 3-Dimensional (3-D) regions. Again it is seen that the algorithm is optimal for a simple 3-D region (dened later). F or all other 3-D regions the algorithm can b e far from optimal. Also, the reasons for the algorithm to b e far from optimal can b e observ ed in the analysis. Based on this analysis, a new heuristic is prop osed that attempts to o v ercome some of the shortcomings of Algorithm 1 th us giving solution closer to the optimal for \non-Simple" regions (dened later). PAGE 14 CHAPTER 3 ANAL YSIS F OR 2-D REGIONS Analysis of the 2-D v ersion of Algorithm 1, for partitioning a giv en rectilinear 2-D region in to cub oids, is p erformed in this c hapter. Wherev er the term \nal result" is used it refers to the result obtained after the heuristic terminates. A t this p oin t the region is partitioned in to distinct non-o v erlapping rectangles. Denition 5 Conc ave vertex { A vertex in a r e ctiline ar 2-D r e gion such that the two e dges incident on the vertex make an interior angle of 270 de gr e es. R efer to Figur e 3.1. Denition 6 Convex vertex { A vertex in a r e ctiline ar 2-D r e gion such that the two e dges incident on the vertex make an interior angle of 90 de gr e es. R efer to Figur e 3.1. Denition 7 Chor d { A horizontal or a vertic al line se gment that b e gins at a c onc ave vertex, extends in the r e gion interior, and ends in the r e gion interior or at the rst p oint at which it me ets an e dge of the r e gion. R efer to Figur e 3.1. Denition 8 De gener ate chor d { A chor d that joins two c o-horizontal (vertic es having same y c o or dinate) or two c o-vertic al c onc ave vertic es (vertic es having same x c o or dinate). R efer to Figur e 3.1. Denition 9 De gener ate r e ctiline ar r e gion { A r e ctiline ar r e gion is de gener ate i it is p ossible to dr aw a de gener ate chor d in the r e gion. R efer to Figur e 3.1. Denition 10 Non-de gener ate r e ctiline ar r e gion { A r e ctiline ar r e gion that c annot have a de gener ate chor d is c al le d non-de gener ate. R efer to Figur e 3.2. Lemma 1 is for all rectilinear regions (degenerate and non-degenerate) 8 PAGE 15 9 Chord Chord Co-horizontal concave vertices 270 90 Degenerate chord Degenerate chord Convex vertex Concave vertex Degenerate rectilinear region Figure 3.1: Degenerate Region Non-Degenerate rectilinear region Figure 3.2: Non-degenerate region PAGE 16 10 Lemma 1 After the c ompletion of A lgorithm 1 the sides of al l the r e ctangles ar e c omp ose d of the b oundary e dges of the r e gion and/or some p art of the chor ds dr awn fr om the c onc ave vertic es of the r e gion. Pro of: By Induction { Induction on the n um b er of regions b eing expanded. Base Case: The 1st rectangle b eing expanded in the 2nd phase of the algorithm stops only when it meets the b oundary of the region on all four sides. Some of the edges of this rectangle ma y b e formed fully of a b oundary edge of the region while the others ma y b e only partially formed b y the b oundary . The latter kind of sides w ould ha v e met some conca v e v ertices. The remaining part of suc h a side can b e considered Concave vertex formed by boundary formed by boundary and chord Figure 3.3: First rectangle formed b y Algorithm 1 to b e formed b y some part of a horizon tal or v ertical c hord dra wn from the conca v e v ertex that this particular side meets. F or example refer to Figure 3.3. Hyp othesis: Assume the 1st k expanded rectangles ha v e their sides comp osed of the b oundary edges and/or some p ortion of c hords dra wn from conca v e v ertices. Induction Step: The ( k +1)th rectangle b eing expanded w ould stop only when it meets the b oundary of the region or that of the previously expanded k rectangles. (a) The sides meeting the b oundary of the region w ould either b e comp osed fully of the b oundary edge or partially of the b oundary edge and partially of the c hords dra wn from the conca v e v ertices that the sides meet resp ectiv ely . PAGE 17 11 (b) The sides meeting the b oundary of the rectangles can b e considered to b e comp osed of the c hords that formed these sides of the already expanded rectangles. (from h yp othesis) F rom (a) and (b) it is clear that all the sides of the ( k +1)th region are comp osed of the b oundary edges of the region and/or some p ortion of the c hords dra wn from conca v e v ertices of the region. F rom here to Theorem 1 an y men tion of \Region" refers only to non-degenerate regions unless sp ecied otherwise. Lemma 2 Every c onc ave vertex in the r e gion is a vertex of exactly 1 r e ctangle in the nal r esult. Pro of: First it is pro v ed that ev ery conca v e v ertex is a v ertex of at least one rectangle. Then w e pro v e that conca v e v ertex can b e a v ertex of at most one rectangle. 1. A t ypical conca v e v ertex is as sho wn in Figures 3.4 and 3.5. Since the whole r1 r3 r2 v e1 e2 e1' e2' Figure 3.4: Conca v e v ertex in ternal region is co v ered b y disjoin t rectangles, there ha v e to b e some disjoin t rectangles co v ering the shaded region. The p ortions of the b oundary edges e 1 and e 2 closest to v ha v e to b e part of edges of 2 distinct disjoin t rectangles as they cannot b e part of edges of a single rectangle. Let the t w o rectangles that ha v e an edge eac h coinciding with e 1 and e 2 b e r 1 and r 2 resp ectiv ely . There can b e t w o p ossibilities: PAGE 18 12 r1 r2 v e1 e1' e2 e2' Figure 3.5: Another conca v e v ertex (a) r 1 terminates at v th us ha ving v as its v ertex, as sho wn in Figure 3.4. (b) Coinciding edge of r 1 extends b ey ond v . In this case r 2 will ha v e v as one of its v ertex, as sho wn in Figure 3.5. 2. Eac h conca v e v ertex is a v ertex of at most 1 rectangle. Pro of b y con tradiction { Assume otherwise. If a conca v e v ertex v is a v ertex of more than one rectangle c1 c2 e1 e2 r' r3 r2 v r1 Figure 3.6: V ertex of 3 rectangles then it has to b e a v ertex of exactly 3 rectangles. Consider Figure 3.6. Out of the 3 rectangles mark ed as r 1, r 2 and r 3 in the gure one of them m ust ha v e nished expanding b efore the other 2 started to expand (as stated in the cub oid gro wing step of Algorithm 1). Let r 1 b e the rst one to b e expanded. Since r 2 w as not PAGE 19 13 nalized already , only w a y r 1 could ha v e stopp ed expanding do wn w ards, at v could ha v e b een: (a) Due to a part of a horizon tal b oundary edge, horizon tally colinear with e 2. { Suc h a colinear edge cannot exist in a non-degenerate region. (b) Due to the presence of an already expanded rectangle r 0 as sho wn in Figure 3.6 { Suc h a rectangle cannot exist b ecause, as p er Lemma 1 the top edge of r 0 w ould b e comp osed of some p ortion of a c hord dra wn from a conca v e v ertex and suc h a c hord w ould b e colinear with edge e 2, whic h is not p ossible in a non-degenerate region. F rom (a) and (b) v is a v ertex of atmost one rectangle. Corollary 1 After the c ompletion of the algorithm ther e is exactly one chor d dr awn fr om e ach c onc ave vertex. Pro of: Assume otherwise. If t w o c hords c 1 and c 2 are dra wn from v then v is a v ertex of 3 rectangles namely r 1, r 2, and r 3. (as sho wn in Figure 3.6). This is con tradictory to the Lemma 2. Lemma 3 In the nal r esult of the algorithm, the chor ds dr awn fr om the c onc ave vertic es form only `T'-interse ctions at their other terminating end. Pro of: The c hords dra wn from the conca v e v ertices form a part or complete edge of one or more rectangles. A c hord dra wn from a conca v e v ertex w ould terminate: 1. When it meets the b oundary of the rectilinear region. This in tersection has to b e a `T' in tersection as p er the denition of non-degenerate rectilinear regions. 2. When an expanding rectangle for whic h this c hord forms an edge meets another nalized rectangle for whic h this c hord do es not form an edge. Since it do es not PAGE 20 14 form an edge of the already expanded rectangle the c hord has to terminate there as it cannot extend in to an already expanded rectangle as p er the algorithm. This in tersection is again a `T'-in tersection as the c hord do es not meet the already expanded rectangle at an y of its v ertices, (otherwise the c hord could ha v e formed one of the edges of the rectangle). Therefore, it meets the rectangle within one of its edges th us forming a `T'-in tersection. Refer to Figure 3.7. Corollary 2 The terminating end of the chor ds originating fr om the c onc ave vertic es, form a vertex of exactly two r e ctangles, in the nal r esult of the algorithm. Pro of: As p er Lemma 3 ab o v e, eac h in tersection p oin t at the terminating end of a c hord forms a `T'-in tersection th us giving t w o adjacen t righ t angles. Since this p oin t v c r2 r1 Edge of an expandedrectangle. Figure 3.7: T-in tersection formed b y a c hord alw a ys lies within the region and the full in terior of the region is co v ered b y disjoin t rectangles in the nal result, there ha v e to b e t w o rectangles r 1 and r 2 b oth ha ving v as the v ertex. This is true for all orien tations of the `T'-junction. Refer to Figure 3.7. Theorem 1 Numb er of r e ctangles obtaine d after the c ompletion of the algorithm is optimal in a non-de gener ate r e ctiline ar r e gion. Pro of: In the nal result of the algorithm: 1. Eac h con v ex v ertex of the region is a v ertex of exactly one rectangle, as it mak es an in terior angle of 90 degrees so it cannot b e shared b y more than one in terior rectangle. PAGE 21 15 2. Eac h conca v e v ertex is a v ertex of exactly one rectangle as p er Lemma 2. 3. Eac h in tersection p oin t of a c hord dra wn from a giv en conca v e v ertex with: (a) a b oundary edge, or (b) a c hord dra wn from some other v ertex, is a v ertex of exactly t w o rectangles as p er Lemma 3. 4. These are the only p oin ts that mak e up the v ertices of all the in terior rectangles, as eac h rectangle is comp osed only of the b oundary edges and/or the c hords dra wn from conca v e v ertices { as p er Lemma 1. Therefore the total n um b er of v ertices comp osing all the rectangles is n um b er of con v ex v ertices + n um b er of conca v e v ertices +2 n um b er of c hords = n + 2 n um b er of conca v e v ertices, where n is the n um b er of v ertices in the region { as p er Lemma 2. Therefore n um b er of rectangles = ( n + 2 n um b er of conca v e v ertices)/4. This is the optimal n um b er of rectangles in a giv en t w o-dimensional rectilinear region [2]. Theorem 2 F or de gener ate r e ctiline ar r e gions the numb er of r e ctangles obtaine d using A lgorithm 1 c ould exc e e d the optimal r esult by as much as the numb er of indep endent de gener ate chor ds that c an b e dr awn in the r e gion. Pro of: F rom Lemma 1 eac h rectangle is comp osed of b oundary edges and/or c hords. In the w orst case all c hords dra wn w ould b e non-degenerate, and the n um b er of rectangles obtained = ( n + 2 n um b er of conca v e v ertices) = 4 = n= 2 + w k , where n is the n um b er of v ertices, w is the n um b er of windo ws and k is the n um b er of comp onen ts [2]. This is the w orst case b ecause for ev ery degenerate c hord dra wn, the n um b er of rectangles reduces b y 1 [2]. Optimal n um b er of rectangles for degenerate regions = n= 2 + w k d , where d is the maxim um n um b er of indep enden t degenerate c hords [2]. PAGE 22 16 Eg. { consider the degenerate rectilinear region sho wn in Figure 3.8. F or this region, n = 20 ; w = 2 ; k = 1 ; d = 6 : The optimal n um b er of rectangles = 20 = 2 + 2 1 6 = 5 : Algorithm 1 could giv e the result sho wn in Figure 3.8. The n um b er of rectangles 1 2 3 4 56 7 8 9 10 11 12 13 14 1516 1718 1920 r2 w1 r4 w2 r10 r9 r8 r11 r1 r5 r7 r6 r3 Result of Algorithm proposed by Haejae Figure 3.8: Result of Algorithm 1 obtained in Figure 3.8 is giv en b y the relation: n= 2 + w k = 20 = 2 + 2 1 = 11 : This is b ecause no degenerate c hords are dra wn. If only hole-free regions are considered, n um b er of conca v e v ertices = n= 2 2 [4]. d = n um b er of conca v e v ertices/2 (in w orst case), w = 0 ; k = 1. Therefore, ( n= 2 + w k ) = ( n= 2 + w k d ) = ( n= 2 1) = ( n= 2 1 ( n= 2 2) = 2) = 2 4 =n . Therefore the ratio of n um b er of rectangles giv en b y Algorithm 1 to an optimal result could b e close to 2 when n is large in a hole-free rectilinear region. In regions with holes, for the example sho wn for ev ery new windo w in tro duced (in line with the ones already presen t) 2 new degenerate c hords are obtained. Algorithm 1 could giv e an extra region for eac h degenerate c hord. When there are no windo ws the region has 2 degenerate c hords. Optimal n um b er of rectangles in the region with no windo ws is 3. Therefore Algorithm 1 could giv e 3 + 2 = 5 rectangles. F or eac h windo w the optimal solution has one more rectangle in the result. Therefore, for i windo ws, it w ould giv e 3 + i rectangles. Algorithm 1 could therefore giv e, 3 + i + 2 + 2 i = 5 + 3 i rectangles, as it giv es 2 extra rectangles for eac h new windo w. Let the ratio of the result of Algorithm 1 to the optimal result b e k . PAGE 23 17 k = (5 + 3 i ) = (3 + i ) (3.1) k ! 3 as i ! 1 PAGE 24 CHAPTER 4 ANAL YSIS F OR 3-D REGIONS Analysis of Algorithm 1 for partitioning a giv en rectilinear 3-D region in to cub oids. Some of the terminology used is dened here. Denition 11 Surfac e { This r efers to the b oundary surfac es pr esent in the given original r e gion. Denition 12 Convex Edge { A n e dge for which the 2 adjac ent surfac es make an interior angle of 90 de gr e es b etwe en them, as shown in Figur e 2.2. Denition 13 Conc ave Edge { A n e dge for which the 2 adjac ent surfac es make an interior angle of 270 de gr e es b etwe en them, as shown in Figur e 2.2. Denition 14 T otal ly Conc ave V ertex { V ertex at which al l incident e dges ar e c onc ave e dges, as shown in Figur e 2.2. Denition 15 T otal ly Convex V ertex { V ertex at which al l incident e dges ar e c onvex e dges, as shown in Figur e 2.2. Denition 16 Simple r e gions { The r e gions that satisfy the fol lowing two c onditions: 1. No surfac e that has c onc ave e dge(s) may b e extende d over one or mor e of its c onc ave e dges to r e ach another c onc ave e dge. 2. Ther e is no surfac e with two or mor e c onc ave e dges with the pr op erty that two of these c onc ave e dges c an b e joine d by a line se gment in x-y, y-z or z-x plane, that lies whol ly outside the surfac e, exc ept for the two end p oints. 18 PAGE 25 19 Eg1: R efer to Figur e 4.1 for a non-simple r e gion. Say p 3 is a b oundary surfac e of a hole extending into the p ap er. e 13 , e 23 ar e c onc ave e dges in the r e gion as they make an internal angle of 270 de gr e es. It is p ossible to dr aw a line l 1 that do es not lie whol ly in a surfac e. Such r e gions do not fal l into our class of simple r e gions. Eg2: R efer Interior l1 p2 p3 p1 e13 e23 e12 v Line that lies outside any existing plane K = {e23, e13}P = {p1, p2, p3} hole Figure 4.1: Non-Simple region to Figur e 2.2. Assume ther e is a cub oidal hole inside a cub oid. Each e dge of the inner cub oid is c onc ave as it makes an interior angle of 270 de gr e es. It is not p ossible to dr aw a line l b etwe en two c onc ave e dges such that the line lies in x-y, y-z or z-x plane and is not c ontaine d whol ly within a surfac e, as e ach surfac e is r e ctangular. Denition 17 De gener ate Conc ave Edges { Two c onc ave e dges form a de gener ate p air i they ar e not the e dges of the same surfac e and they satisfy the fol lowing c onditions: R efer to Figur e 4.2. 1. They ar e p ar al lel to the same axis. 2. They c an b e joine d by a line se gment p ar al lel to one of the axes, lying whol ly outside any surfac e exc ept at the two end p oints wher e the line se gment joins the two e dges. Denition 18 Slic e { A slic e is an extension of a surfac e adjac ent to a c onc ave e dge in a 3-D r e gion, such that it divides the 3-D r e gion into 2 or mor e sub-r e gions. F or an PAGE 26 20 Degenerate concave edges l c1 c2 Figure 4.2: Degenerate conca v e edges extende d surfac e to qualify as a slic e, al l its ar e a should lie in the interior of the r e gion (surfac e is c onsider e d as interior). A l l the e dges of the slic e lie whol ly on p erp endicular surfac es of the r e gion and/or, on p erp endicular slic es. R efer to Figur es 4.3 and 4.5 for some examples of slic es. Sub-region 2 Slice p2 p1 k adjacent to concave edge Slice obtained by extending k Sub-region 1 p1 Figure 4.3: Slice Denition 19 Slic e Se gment { A slic e se gment is a r e ctiline ar extension of a surfac e adjac ent to a c onc ave e dge in a 3-D r e gion. F or an extende d surfac e to qualify as a slic e se gment, al l its ar e a should lie in the interior of the r e gion (surfac e is c onsider e d as interior).R efer to Figur es 4.4, 4.5, 4.6 and 4.13 for some examples of slic e se gments. As is evident, al l slic es ar e slic e se gments also, but the c onverse is not true. Denition 20 Planes { Ap art fr om the usual me aning of the wor d, it is use d to c olle ctively r efer to the slic e se gments and the surfac es in a 3-D r e gion at any p articular time. PAGE 27 21 p2 p1 k p1 Slice segment Slice segment obtained by extendingadjacent to concave edge k Figure 4.4: Slice segmen t Slice s1 r1 r2 r3 Example of a slice dividing region into 3 subregions p1 Figure 4.5: Horizon tal slice s4 s3 s2 s1 Slice segment Slice segment Slice segment Slice segment Figure 4.6: A partitioning obtained b y slice segmen ts PAGE 28 22 Denition 21 Slic e Se gment Partitioning (SSP) { A p artitioning of a r e ctiline ar 3-D r e gion into cub oids, in which slic e se gments ar e forme d for c onc ave e dges by extending a surfac e adjac ent to the c onc ave e dges such that it cuts the 270 de gr e e angle of a c onc ave e dge into a 90 de gr e e angle and a 180 de gr e e angle. The slic e se gments in the p artitione d r e gion satisfy the fol lowing c onditions: 1. Each slic e se gment is b ounde d by a surfac e or some other slic e se gment along al l its e dges. 2. No two slic e se gments cut thr ough e ach other. 3. Ther e is exactly one slic e se gment p er c onc ave e dge, unless the c onc ave e dge is cut p erp endicularly by some other slic e se gment. 4. If a c onc ave e dge is cut p erp endicularly by a slic e se gment, then the two sub-c onc ave e dges obtaine d c an b e tr e ate d as indep endent c onc ave e dges and fol low the same rule as describ e d in the c ondition 3. A n e dge of a slic e se gment pr esent in an SSP c ould b e: 1. A new e dge { A n e dge such that no p art of the e dge existe d in the original r e gion. 2. Extension of an existing e dge { A n e dge for which some p art of the e dge alr e ady existe d in the r e gion, and r est of it did not. 3. A n alr e ady existing e dge { The whole e dge existe d in the r e gion. R efer to Figur e 4.8 for the dier ent typ es of e dges of a slic e se gment. Denition 22 Slicing A lgorithm { It is an algorithm that gives, an SSP as its r esult. As p er this A lgorithm, slic es ar e dr awn for e ach c onc ave e dge in the r e gion, in some se quenc e, til l ther e ar e no c onc ave e dges left in the r e gion. PAGE 29 23 The slicing Algorithm, is not equiv alen t to Algorithm 1. This can b e pro v ed b y a coun ter example. Refer to Figure 4.7. This gure depicts a partitioning that could b e obtained as a result of Algorithm 1. Ho w ev er, suc h a partitioning can nev er b e obtained b y a slicing algorithm, b ecause in a slicing algorithm the slices need to b e dra wn in some sequence. Therefore, out of the 4 slices, the rst one to b e dra wn should ha v e had all its edges on the b oundary surfaces, ho w ev er, there is no extension of a surface in Figure 4.7 that meets this requiremen t. 2 1 3 4 5 Slice segment Slice segment Slice segment Slice segment s2 s3 s1 are formed by Algorithm 1 1 to 5 indicates the order in which cuboids s4 Figure 4.7: P artitioning obtained b y Algorithm 1 Lemma 4 A lgorithm 1 yields an SSP as describ e d in Denition 21. Pro of: It can b e pro v ed b y induction that the faces of eac h cub oid in the nal result of Algorithm 1, are comp osed of b oundary surfaces of the original region or some extensions of the b oundary surfaces. Therefore, in the nal result, all the cub oid b oundaries are, original surfaces and/or extension of some of the surfaces. The extension of a surface, w ould b e b ounded b y p erp endicular b oundary surfaces or extension of some other surface, along all its edges. Therefore, an y extended surface can b e considered as a slice segmen t, and eac h slice segmen t satises all the conditions required for the partitioning to b e called SSP . PAGE 30 24 Corollary 3 Ther e exists an SSP for al l 3-D r e ctiline ar r e gions. Pro of: This follo ws from Lemma 4 as Algorithm 1 giv es an SSP and it partitions all rectilinear 3-D regions in to cub oids. F rom here to Theorem 4 an y men tion of \region" refers to \simple regions" unless stated otherwise.Lemma 5 In an SSP every vertex that was original ly pr esent in the r e gion would now b e a vertex of exactly one cub oid. Pro of: The originally presen t v ertices could b e: 1. T otally con v ex { This is when all the three edges meeting at the v ertex are con v ex. Suc h a v ertex can only b e a v ertex of one cub oid regardless of whic h surfaces are c hosen to form slice segmen ts, as it mak es only an in ternal angle of 90 degrees. 2. Not totally con v ex { When at least one of the edges meeting at the v ertex is conca v e. As p er Denition 21, in the slice segmen t partitioning a slice segmen t is dra wn through ev ery conca v e edge. As a result of dra wing a slice segmen t through an edge, the edge will remain as an edge only on one side of the slice segmen t. On the other side, the surface that had the edge as one of its edges, is extended through the edge and th us the edge no longer exists. Therefore, the v ertex in question that is at one of the ends of this edge, also exists only on the former side of the slice segmen t. This w a y , since for all the conca v e edges meeting at the v ertex a slice segmen t is formed, the v ertex remains as a v ertex only in one sub-region in an SSP . Since it is a v ertex only in one region it can b e a v ertex of only one cub oid. Refer to Figures 4.8 and 4.9. PAGE 31 25 p1 p2 r2 r1 v remains as a vertex only in v r2 Concave edge New edge e1 e2 e3 e4 e5 Extension of Extension of e1 e4 s1 Already existing edge of s1 Slice segment Figure 4.8: v is a v ertex of cub oid r 2 r3 r2 v remains as a vertex only in v r3 e1 e2 e3 New edge for e2 New edge corresponding to e1 New edge for e3 r1 Slice segment 1 Slice segment 2 Figure 4.9: v is a v ertex of cub oid r 3 Lemma 6 Every new vertex obtaine d in a slic e se gment p artitioning of a r e gion, is a vertex of exactly two cub oids. Pro of: A new v ertex v is obtained when a slice segmen t meets a surface of the region or another slice segmen t, p erp endicularly . In a simple region there w ould b e no conca v e edge meeting at v . So the v ertex v mak es an in terior angle of 90 degrees on either side of the slice segmen t. Since, the partitioned region is comp osed of disjoin t cub oids, v ertex v w ould b e a v ertex of exactly t w o cub oids, that are formed on either side of the slice segmen t, con taining the area closest to v . Refer to Figure 4.10. Lemma 7 In an SSP, every c onc ave e dge pr esent in the original simple r e gion c orr esp onds to exactly one unique new e dge. Pro of: As p er the denition of SSP , when a slice segmen t is formed for a conca v e edge along one of the t w o p ossible planes, it meets the b oundary of the original region or PAGE 32 26 v having v as a vertex Regions closest to v 90 90 90 No other plane can share p1 ps v as a vertex Slice Segment Figure 4.10: New v ertex v another slice segmen t, along all edges. F or a conca v e edge lying on a slice segmen t, a new edge (as describ ed in Denition 21) is obtained somewhere in the middle of a surface, or in the middle of a slice segmen t, opp osite to the conca v e edge. Refer to Figure 4.8. Since the region is simple, no other conca v e edge parallel to this new edge can lie on the slice segmen t. Also no conca v e edge can b e cut p erp endicularly . Therefore, this new edge corresp onds to exactly one unique conca v e edge, as there is only one slice segmen t p er conca v e edge (as describ ed in Denition 21). Lemma 8 Out of al l the surfac es that have a c onc ave e dge incident on a given vertex v , in the original simple-r e gion, only one has v as a vertex in an SSP. Pro of: Let all the conca v e edges meeting at suc h a v ertex v form a set K . ( j K j 3). Let all the surfaces that ha v e one of their edges in K form a set P . Refer to Figures 4.1 and 4.11 for examples depicting K and P . In the original region, eac h edge in K had one of its v ertices as v , so eac h surface in P also had one of its v ertices as v . W e need to pro v e that exactly one of the surfaces from P has v as a v ertex in an SSP . First it is pro v ed that at least one of the surfaces in P has v as a v ertex. Then it is pro v ed that at most one surface has v as a v ertex. 1. Assuming all the surfaces in P w ere extended to form slice segmen ts. A t least one surface w ould nev er b e extended to form a slice segmen t for an edge in K . This is b ecause, all the surfaces adjacen t to it that b elong to P ha v e extended to form slice PAGE 33 27 segmen ts. Th us, eac h of the edges around it that b elongs to K has a slice segmen t dra wn for it. Therefore, this surface is not extended to form a slice segmen t for an edge in K . This is b ecause according to Denition 21 ev ery conca v e edge has exactly one slice segmen t dra wn for it in the SSP . This surface, w ould therefore ha v e v as a v ertex in the partitioned region. 2. There cannot b e more than one surface in set P that is not extended to form a slice segmen t con taining the p oin t v , in it's in terior (not on its v ertex). Assume there w ere t w o suc h surfaces, sa y p 1 and p 2. Since b oth p 1 and p 2 meet at v , there w ould b e an edge e 12 b et w een the t w o ha ving v as one of its v ertex. If e 12 is a conca v e edge then one of p 1 or p 2 w ould b e extended to form a slice segmen t for e 12 and hence co v ering v , as p er the SSP . If e 12 is con v ex, then the other edge of eac h of the surfaces p 1 and p 2 sa y e 13 and e 23, inciden t at v w ould b e conca v e, b ecause b oth p 1 and p 2 b elong to P . Also, b oth these edges will b e edges of the third surface sa y p 3 inciden t at v , as there can b e only 3 edges inciden t at a v ertex. This w ould allo w a line segmen t to b e dra wn b et w een conca v e edges e 23 and e 13 of surface p 3. The line segmen t is parallel to x-y , y-z or z-x plane and a part of it do es not lie in a surface. This is not allo w ed for simple regions. Refer to Figure 4.1. Therefore it is not p ossible to ha v e t w o suc h surfaces as p 1 and p 2. Also, it is imp ossible to ha v e more than 2 surfaces in P that are not extended to con tain v in the in terior. This is b ecause, at most 3 surfaces meet at a v ertex and if all of them b elong to P , then at least one needs to b e extended, as p er the SSP dened in Denition 21. Refer to Figure 4.11. Therefore, exactly one of the surfaces from P has v as a v ertex in an SSP . Some notations are dened here, and are used later. PAGE 34 28 p3 v e12 e13 P = {p1, p2, p3} Interior p1 p2 K = {e12, e23, e13} e23 Figure 4.11: Example of K and P Denition 23 V ( p i ) { The numb er of vertic es of a surfac e p i , or that of a slic e se gment obtaine d by p i , in c ase p i is extende d to form a slic e se gment of the slic e se gment p artitioning. Denition 24 S V P { This denotes the sum of the vertic es c ontribute d by e ach surfac e. Ther efor e it is same as V ( p i ) . R efer to Figur e 4.13 for an example of S V P . Denition 25 S P i { F or e ach vertex v i in an SSP, numb er of planes (surfac es and slic e se gments) that shar e v i as a vertex, is denote d by S P i . F or example, for vertex v in Figur e 4.12 S P = 3, and for vertex v 7 in Figur e 4.13 S P 7 = 2, as it is a vertex of p 2 and p 8 in the SSP. Denition 26 T N V { T otal numb er of distinct vertic es in the p artitione d r e gion. T o get the value of T N V e ach vertex in an SSP, has to b e c ounte d exactly onc e. Ther efor e, it satises the fol lowing e quation. T N V = S V P ( S P i 1) (4.1) Lemma 9 V ( p i ) is same for a surfac e as it is for a slic e se gment obtaine d by extending that surfac e in an SSP. Pro of: The dieren t t yp es of surfaces in the region could: PAGE 35 29 (a) Ha v e all their edges as con v ex edges. Suc h a surface is nev er extended to form a slice segmen t. (b) Ha v e one or more conca v e edges. Corresp onding to ev ery conca v e edge, there is exactly one unique new edge obtained in slice segmen t partitioning as p er Lemma 7. No w consider a surface with one or more conca v e edges. F or eac h conca v e edge either this surface is extended o v er the edge or the other surface adjacen t to the conca v e edge is extended. In either case, eac h suc h edge will remain as an edge in this surface or will giv e rise to a unique new edge, for a slice segmen t (formed b y extending this surface). Therefore, the surface or the slice segmen t (if the surface w as extended) will ha v e the same n um b er of edges and hence same n um b er of v ertices. F rom (a) and (b) it is clear that eac h surface will ha v e same n um b er of v ertices in an SSP (whether or not it is extended to form a slice segmen t) as it did in the original region. Lemma 10 V alue of S V P r emains the same in a simple r e gion r e gar d less of which surfac es ar e extende d to form slic e se gments. Pro of: In a slice segmen t partitioning, the slice segmen ts obtained are the extension of some of the surfaces. Therefore, there are same n um b er of slice segmen ts and surfaces put together in the SSP regardless of whic h surfaces are extended to form slice segmen ts. F rom Lemma 9, V ( p i ) is same for a surface as for the slice segmen t obtained b y extending this surface. Therefore, V ( p i ) is same in the slice segmen t partitioning regardless of whic h surfaces are extended to form slice segmen ts. Lemma 11 ( S P i 1) is same in an SSP, r e gar d less of which surfac es ar e extende d to form slic e se gments. Pro of: Dieren t t yp es of v ertices in an SSP are: PAGE 36 30 (a) New v ertex v n { Suc h a v ertex is a v ertex of only the slice segmen t that created it as p er Lemma 6. Therefore, for a new v ertex v n , S P n = 1 and S P n 1 = 0. Refer to Figure 4.10. (b) Original v ertex v { In an SSP v is shared b y the follo wing surfaces/slice segmen ts. (i) The surfaces (or slice segmen ts formed b y suc h surfaces) that had no conca v e edge ending at v but only con v ex edges ending at v . This is b ecause suc h a surface cannot b e extended to form a slice segmen t that has v in the in terior. Refer to Figure 4.12 for an example. One more example can b e seen in Figure 4.13 ( e 3 and e 2, ending at v 1 are b oth con v ex for surface p 7). p1 p2 p3 90 90 90 v Figure 4.12: T otally con v ex v ertex (ii) Exactly one surface out of those that had a conca v e edge ending at v (if an y) as p er Lemma 8. F rom (a) and (b) ( S P i 1) for all the v ertices v i , in the nal result, is indep enden t of whic h surfaces are extended to form a slice segmen t. Lemma 12 T N V is same r e gar d less of which surfac es ar e extende d to form slic e se gments in an SSP. Pro of: F rom Lemmas 10 and 11, and Equation 4.1 it can b e seen that the v alue of T N V remains the same regardless of whic h surfaces w ere extended to form slice segmen ts. PAGE 37 31 v1 p2 e2 e3p1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11 v12 e1 p3 p4 p5 p6 p7 p8 (v5, v4, v11, v10) (v2, v3, v8, v9) (v4, v3, v9, v10) (v5, v6, v1, v2, v3, v4) (v7, v8, v9, v10, v11, v12) (v5, v6, v12, v11) v13v14 = (4+4+4+4+4+4+6+6) = 36 SVP = V(p1)+V(p2)+V(p3)+V(p4)+V(p5)+V(p6)+ V(p7)+V(p8) Slice segment s1(v6, v13, v14, v12) Figure 4.13: SSP of a simple region F or an example refer to Figure 4.13. In this Figure: S V P = 36 (4.2) There are 12 original v ertices. So N or ig = 12 (4.3) All original v ertices ( v 1 through v 12) except v 1 and v 7 ha v e 3 con v ex edges inciden t on them. So S P 2 through S P 6 and S P 8 through S P 12 all ha v e a v alue of 3. F or v ertex v 1, out of the surfaces p 1 and p 2 only one can ha v e it as a v ertex in the SSP as p er Lemma 8. In this example, surface p 2 has v 1 as a v ertex. Similarly , for v ertex v 7, out of surfaces p 1 and p 2, only surface p 2 has it as a v ertex in the SSP . v 1 is also a v ertex of surface p 7 in the SSP as the edges e 2 and e 3 of surface p 7 inciden t on v 1 are con v ex. Similarly , v 7 is a v ertex of surface p 8 in the SSP . ) ( S P i 1) = ( S P 1 1) + ( S P 2 1) + ::: + ( S P 6 1) + ( S P 7 1) + ( S P 8 1) + ::: + ( S P 12 1) ) ( S P i 1) = (2 1) + (3 1) 5 + (2 1) + (3 1) 5 ) ( S P i 1) = 22 (4.4) PAGE 38 32 Using Equations 4.2 and 4.4 in Equation 4.1. T N V = 36 22 = 14 (4.5) Therefore v alue of T N V is indep enden t of whic h surfaces are extended and dep ends only on the original simple-region. Theorem 3 The numb er of cub oids obtaine d in an SSP is same r e gar d less of which surfac es ar e extende d. Pro of: F rom Lemma 12 the total n um b er of v ertices ( T N V ) obtained in an SSP is the same irresp ectiv e of whic h surfaces are extended. Also from Lemma 5 eac h of the original v ertices is a v ertex of exactly one cub oid. In a slice segmen t partitioning the original v ertices w ould still b e v ertices regardless of whic h surfaces are used to form slice segmen ts. Therefore, the n um b er of new v ertices obtained = N new = total n um b er of v ertices ( T N V ) n um b er of original v ertices ( N or ig ), w ould also b e same regardless of whic h surfaces are extended to form slice segmen ts. F rom Lemma 6 ev ery new v ertex is a v ertex of exactly 2 cub oids. Therefore, n um b er of eectiv e v ertices: N ef f = N or ig + N new 2 is same regardless of whic h surfaces are extended. Therefore, n um b er of cub oids = N ef f = 8 is also the same regardless of whic h surfaces are extended to form slice segmen ts. Con tin uing the example presen ted after Lemma 12. F rom Equation 4.3 w e can infer N new = T N V N or ig = 14 12 = 2 (4.6) Therefore N ef f = 12 + 2 2 = 16. So total n um b er of cub oids = 16 = 8 = 2. Theorem 4 A lgorithm 1 gives optimal numb er of cub oids in simple 3-D r e gions. PAGE 39 33 Pro of: Algorithm 1 giv es an SSP , as p er Lemma 4. Also, from Theorem 3, SSP giv es same n um b er of cub oids regardless of whic h surfaces are extended in a simple 3-D rectilinear region to form slice segmen ts. Therefore, Algorithm 1 giv es same n um b er of cub oids as an optimal SSP w ould giv e in a simple rectilinear 3-D region. Theorem 5 The A lgorithm 1 c an b e at le ast as b ad for a 3-D r e gion as it is for a 2-D r e gion, suggeste d in The or em 2. Mor e the p airs of de gener ate e dges exist, farther away the r esult c an b e fr om optimal solution. Pro of: Example is presen ted to depict at least ho w far the result of the algorithm can b e from an optimal solution. It is easy to see that the result can b e at least as bad as for the 2-D region, if the 2-D region is just extended in the dimension p erp endicular to the plane in whic h it lies. It can b e seen that more the pair of degenerate conca v e edges more is the opp ortunit y to sa v e n um b er of v ertices in an SSP . Since, the heuristic do es not fa v or an y particular slice segmen t o v er another, it can end up in not utilizing an y pair of degenerate edges. In Figure 4.14 all 4 p ossible degenerate slice segmen ts (ones co v ering degenerate edges) are dra wn, while in Figure 4.15 no degenerate slice segmen t is dra wn. As can b e seen the n um b er of cub oids obtained in Figure 4.14 is 7 while in Figure 4.15, 19 cub oids are obtained. Referring to the Figures 4.14 and 4.15, it can b e observ ed that for ev ery new cub oidal hole in tro duced in line with the ones already there, 4 extra cub oids are in tro duced in the non-optimal v ersion as compared to the optimal solution. When there is no cub oidal hole, the optimal solution w ould ha v e 5 cub oids, while the w orst case of Algorithm 1 w ould giv e 5 + 4 cub oids. F or ev ery new hole, optimal solution giv es one more cub oid in the result. Therefore, if there are i holes, optimal solution w ould giv e 5 + i cub oids. Algorithm 1 w ould giv e 4 extra cub oids for ev ery hole plus 4 extra cub oids when there w ere no holes. So Algorithm 1 w ould giv e 5 + i + 4 + 4 i cub oids = 9 + 5 i cub oids in the w orst case. Let k b e the w orst case ratio for the result of Algorithm 1 to PAGE 40 34 optimal solution. k = (9 + 5 i ) = (5 + i ) (4.7) k ! 5 as i ! 1 : Therefore, the result of Algorithm 1 can b e atleast k times the optimal result. v1 v2 v3 v4 v5 v7 v8 v9 v10v11 v12 v13 v16 v6 v15 s1 = {v1, v2, v3, v4}s2 = {v5, v6, v7, v8}s3 = {v9, v10, v11, v12}s4 = {v13, v14, v15, v16} v14 r1 r2 r3 r4 r5 r6 r7 h1 and h2 are holes h1 h2 Figure 4.14: Optimal partitioning of a 3-D region with holes r1 r2 r3 r4 r5 r6 r7 r8 r9 r12 r13 r14 r15 r16 r17 r18 r19 r10 r11 This has 14 slices. 19 regions are obtained. Figure 4.15: P ossible partitioning obtained b y Algorithm 1 PAGE 41 CHAPTER 5 NEW HEURISTIC In this c hapter w e prop ose a new heuristic, that impro v es up on the slicing heuristic. The new heuristic is exp erimen tally found to giv e b etter results as compared to Algorithm 1 also, as sho wn in the next c hapter. Algorithm 1 dra ws slice segmen ts without an y preference to w ards an y particular slice segmen t. W e see from Theorem 5 that the n um b er of cub oids obtained in the nal result can b e reduced if the slice segmen ts and slices are dra wn to co v er some degenerate pairs of conca v e edges. As a matter of fact, it is alw a ys p ossible to dra w slice segmen ts in suc h a manner that w e get a minim um n um b er of cub oids in an y rectilinear 3-D region. This is true b ecause, a necessary requiremen t to partition an y 3-D rectilinear region in to cub oids, is to sub-divide all the in terior angles of 270 degrees formed b y conca v e edges in the region. The slice segmen t partitioning only requires this necessary condition to b e fullled. Therefore, if the correct c hoice of slice segmen ts is made for partitioning, the region can b e partitioned in to a minim um n um b er of cub oids. Ho w ev er, if instead of slice segmen ts only slices are dra wn in some sequen tial order, it ma y not b e p ossible to get an optimal solution. This can b e seen b y an example. Figure 5.1 sho ws a rectilinear 3-D region. Figure 5.2 depicts an optimal partitioning of the region in Figure 5.1. None of the slice segmen ts that are dra wn in the optimal partitioning, ha v e all their edges on the p erp endicular surfaces. Also, it can b e seen, (though no pro of is presen ted) that there is no p ossible sequence in whic h slices (as dened in Denition 18) can b e dra wn in this region to obtain an optimal partitioning. Here w e prop ose a simple heuristic that attempts to dra w slices that con tain some degenerate pairs of conca v e edges. The o v erview of the heuristic is presen ted b elo w. 35 PAGE 42 36 Figure 5.1: Region to b e partitioned s4 s1 s2 s3 Figure 5.2: Optimal SSP PAGE 43 37 Algorithm 2 This c onsists of fol lowing steps. 1 F r om the given phantom of voxels of dier ent densities cho ose one p articular density and tr e at al l the voxels of that density as interior of a 3-D r e gion and tr e at everything else as exterior to the r e gion. 2 In the 3-D r e gion as dene d in step 1, p erform e dge dete ction to get a list of al l the c onc ave e dges, say LC, in the r e gion. 3 F or an e dge in LC, out of the two p ossible slic e se gments dr aw the slic e se gment that c overs mor e de gener ate c onc ave e dges. This c an b e achieve d by the fol lowing steps. (a) Dr aw a temp or ary slic e se gment, in one of the two p ossible planes for the c onc ave e dge. This c an b e achieve d by the fol lowing steps. i Give a unique lab el to a voxel on the c onc ave e dge and add it in a queue. ii R emove a voxel fr om queue. If no voxel c an b e p opp e d, i.e. if the queue is empty, the slic e se gment is c omplete. Otherwise, give the same lab el to neighb ors of the voxel p opp e d, that ar e in the plane of the slic e se gment and lie inside the r e gion, and have not yet b e en lab ele d. A dd al l the new ly lab ele d neighb ors in the queue. iii If any of the neighb or voxel in step ii is a voxel of some other c onc ave e dge that lies in the plane of the slic e se gment, add the c onc ave e dge to a list of de gener ate c onc ave e dges. If it is a voxel of a c onc ave e dge p erp endicular to the slic e se gment, add it to a list of c onc ave e dges to b e cut. iv R ep e at steps ii and iii til l the queue is empty. (b) Dr aw a temp or ary slic e se gment in the other p ossible plane using the same scheme as describ e d ab ove. PAGE 44 38 (c) Out of the two temp or ary slic e se gments, make the one that has mor e de gener ate c onc ave e dges in its list, as p ermanent. This is done by lab eling al l the voxels in that slic e se gment by a lab el that identies a slic e se gment and is tr e ate d as a b oundary of the r e gion. (d) Delete al l those c onc ave e dges fr om LC, that ar e in the list of de gener ate e dges, for the slic e se gment that is made p ermanent. R eplac e the c onc ave e dges, in LC that ar e b eing cut p erp endicularly by the p ermanent slic e se gment, with two new c onc ave e dges. 4 R ep e at step 3 til l ther e ar e no mor e c onc ave e dges left in LC. 5 R ep e at steps 1 thr ough 4 for al l the dier ent densities, in the given phantom. PAGE 45 CHAPTER 6 EXPERIMENT AL RESUL TS Algorithm 2 w as implemen ted in C++. The program w as ev aluated on a 3-D phan tom data obtained from a real Computer T omograph y (CT) scan. The phan tom data had 81*81*80 v o xels. This phan tom data w as thresholded with 3 distinct thresholding v alues. The result obtained after thresholding w as used as the input for comparison b et w een Algorithm 1 and Algorithm 2. F or this input, Algorithm 1 obtained 10087 homogeneous cub oids. Algorithm 2 w as applied to the input suc h that, it partitions the regions formed b y eac h of the distinct densities in to cub oids. This pro duced a total of 3387 homogeneous cub oids. Th us, Algorithm 2 leads to a reduction in the n um b er of cub oids b y ab out 65 p ercen t, for this phan tom data. The t w o algorithms w ere ev aluated on randomly generated phan toms as w ell. On these phan toms also, Algorithm 2 p erformed m uc h b etter in comparison to Algorithm 1 in terms of the n um b er of cub oids obtained. These phan toms are generated in the follo wing w a y . First, the whole cub oidal phan tom is p opulated with uniform densit y v o xels, sa y densit y v alue 1.0. Then, randomly a certain p ercen tage of the v o xels in the phan tom are lab eled with a dieren t densit y , sa y 2.0. The phan tom so created is giv en as an input to b oth, Algorithm 2 and Algorithm 1. Algorithm 2 is run suc h that it partitions the regions formed b y b oth the densit y v alues. V arious random samples are generated and used for the comparison. The results are tabulated in T able 6.1. 39 PAGE 46 40 T able 6.1: Exp erimen tal Results Phan tom size P ercen tage of v o xels Num b er of cub oids Num b er of cub oids with densit y 2.0 b y Algorithm 1 b y Algorithm 2 30*30*30 60 11546 2850 30*30*30 60 11479 2832 30*30*30 60 11439 2889 30*30*30 60 11518 2821 30*30*30 60 11518 2854 30*30*30 70 10624 2891 30*30*30 70 10544 2845 30*30*30 80 8934 2689 40*40*40 30 25132 6713 40*40*40 40 27216 6469 40*40*40 50 27778 6377 50*50*50 30 48998 12869 50*50*50 40 53140 12282 PAGE 47 CHAPTER 7 CONCLUSION F rom the exp erimen tal results, w e conclude that Algorithm 2 p erforms b etter than Algorithm 1 almost consisten tly , in terms of the n um b er of cub oids obtained. F rom the Analysis in Chapter 4, it is eviden t that to get a b etter partitioning of a rectilinear 3-D region, slice segmen ts need to b e dra wn that co v er maxim um p ossible degenerate conca v e edges. Algorithm 2 is an attempt to w ards this idea. Ho w ev er, Algorithm 2 can b e further impro v ed. This can b e done b y pro cessing on the list of conca v e edges to form pairs of degenerate conca v e edges, and then joining them b y slice segmen ts. This will greatly impro v e the time complexit y of Algorithm 2. Curren tly , b ecause Algorithm 2 actually dra ws the temp orary slices, it is m uc h slo w er in comparison to Algorithm 1. Also, the problem of nding maximal pairs of degenerate conca v e edges needs to b e in v estigated in detail. Joining suc h pairs with slice segmen ts could giv e a m uc h b etter result than Algorithm 2, in terms of n um b er of cub oids. It ma y not b e p ossible to nd the maximal set of pairs in p olynomial time, since the problem of partitioning the region is NP-complete. Ho w ev er, this remains to b e pro v ed and an Algorithm needs to b e suggested that can giv e some degenerate pairs. Suc h an Algorithm can giv e b etter and faster results than Algorithm 2. 41 PAGE 48 REFERENCES [1] Zuofeng Li and Jerey F. Williamson. V olume-based geometric mo deling for radiation transp ort calculations. Me dic al Physics , 19(3):667{677, Ma y/June 1992. [2] T atsuo Oh tsuki. Minim um dissection of rectilinear regions. In International Symp osium on Cir cuits and Systems , 1982. P ages 1210-1213. [3] Surendra Nahar and Sarta j Sahni. F ast algorithm for p olygon decomp osition. IEEE T r ansactions on Computer-A ide d-Design , 7(4):473{483, April 1988. [4] San-yuan and Sarta j Sahni. Co v ering rectilinear p olygons b y rectangles. IEEE T r ansactions on Computer-A ide d-Design , 9(4):377{388, April 1990. [5] Victor J. Dielissen and Anne Kaldew aij. Rectangular partition is p olynomial in t w o dimensions but np-complete in three. Information Pr o c essing L etters , 38(1):1{6, April 1991. [6] H. Imai and T. Asano. Ecien t algorithms for geometric graph searc h problems. SIAM J. Computing , 15(2):478{494, Ma y 1986. [7] Haejae Jung. Algorithms for external b eam dose computation. PhD dissertation, Univ ersit y of Florida, 2000. Chapter 4. 42 PAGE 49 BIOGRAPHICAL SKETCH An uj Jain w as b orn in Jo dhpur, India on Jan uary 2, 1976. He is the son of most lo ving paren ts, Suresh Jain and Shashi Jain. He obtained his Bac helor of Engineering degree from Delhi Institute of T ec hnology , India, in the y ear 1998. He w ork ed as a Soft w are Engineer for Adob e Systems, India, b efore joining the Univ ersit y of Florida in August 2000. Throughout the course of his master's researc h he w ork ed as a Researc h Assistan t to Dr. Sarta j Sahni, c hair of the Computer and Information Science and Engineering Departmen t at UF. He will b e graduating with the master's degree in August 2002. The time he sp en t in Univ ersit y of Florida under the able guidance of Dr. Sahni w as academically the most enric hing p erio d of his life. He is in terested in the eld of algorithms and data structures. He hop es to mak e some useful con tribution to the eld of computer science during his lifetime. He will b e joining Citrix Systems, lo cated in F ort Lauderdale, in June 2002 as a Soft w are Dev elop er. 43 |