CClosed-form Quadrangulation of n -Sided Patches Marco TariniUniversit`a degli Studi di Milano [email protected]
Abstract
We analyze the problem of quadrangulating a n -sidedpatch, each side at its boundary subdivided into a givennumber of edges, using a single irregular vertex (or none,when n = 4 ) that breaks the otherwise fully regular lat-tice. We derive, in an analytical closed-form, (1) the nec-essary and sufficient conditions that a patch must meet toadmit this quadrangulation, and (2) a full description ofthe resulting tessellation(s). Consider a polygonal-shaped, planar region patch P , de-limited by n > sides, each subdivided in a number ofedges. Let e i ∈ N be the number of edges found on side i , i ∈ [0 ..n − .We are interested in determining whether or not P canbe quad-tessellated using only one irregular vertex, of va-lency n , somewhere in the interior (even this vertex is reg-ular when n = 4 ).This tessellation, when it exists, can also be describedas the one obtained by applying one step of Catmull-Clark(CC) subdivision [3] to the polygon P , which creates n quadrilateral regions, followed by a conforming, fullyregular tessellation of each of these regions, each at someappropriate grid resolution. For this reason, we refer tothis property of P as it being “CC-able”.For example, the construction in Fig. 1 shows that apentagonal-shaped patch delimited by e i = (6 , , , , edges happens to be CC-able. We show a closed-formformulation to determine the existence (and the unique-ness) of this quadrangulation, for an arbitrary P , and toconstruct it, when it exists. Figure 1: An example: a pentagonal patch with e .. =(6 , , , , is CC-able, as graphically shown here. An intensively studied recent problem in Geometry Pro-cessing is
Coarse layout decomposition (see [2] for asurvey), where a given surface must be partitioned into alayout of patches homologous to a disk. This is a precon-dition for numerous tasks (such as surface parametriza-tion, shape segmentation, shape matching, applicationof machine learning on 3D shapes), each coming withits own set of useful final applications (ranging fromtexture mapping, digital fabrication, shape recognition,shape modelling, etc). Clearly, each such scenario dic-tates different requirements on the layout. Among oth-ers, one central application is surface semi-regular quad-remeshing (see [1] for a survey, and specifically Section3.2 there). For other potential contexts, see the Conclu-sions.The layout is typically required to be comprised of rect-angular regions, as they admit a “natural” tessellation con-sisting of a fully-regular lattice – but only if opposite sidesof the region are subdivided in an equal number of edges.The present work can be understood as a way to extendthe concept of a “natural tessellation” to non-rectangular a r X i v : . [ c s . G R ] F e b atches . The literature addresses a problem similar to ours, butwhere multiple internal irregular vertices are allowed. Inthis case, solutions are now known to always exists [10](as long as the “parity” condition holds, see below); notethat layouts presenting more internal irregular vertices aretypically considered less desirable in many contexts.This version of the problem was solved in [10] for n (cid:54) , and an algorithm is offered that always constructs onevalid solution. The problem was previously tackled for n = 3 or , with similar results [9]. These algorithms arecombinatorial in nature; this is in contrast with our closed-form characterization of the instances admitting a solutionwith a single-irregular vertex (in addition to solving alsofor n > ).The algorithm in [10] returns the one solution con-sidered the “best” among valid alternatives, according tosome definition of desirability (although not all possibili-ties are always considered). In a similar spirit, Machine-Learning [6] and Data-Driven [5] heuristics have beenleveraged to pick one “best” solution among the ones ad-mitted by a given instance (again, according to some tar-geted criteria). In older proposals, users, such as digitalmodellers, are allowed to interactively navigate inside thespace of admissible solutions, in search of the “preferred”one for a given mesh [8]. In most cases (although not nec-essarily all), the “best” or “preferred” solution is exactlythe one featuring a single irregular vertex inside the patch,when such a solution exists; to our knowledge, our is thefirst criterion to determine a priori whether that is the caseor not. One well-known precondition for P to be tasselable withonly quads is that (cid:32)(cid:88) i e i (cid:33) mod . (1)We refer to this as the parity condition , and we assume italways holds. We are looking for a tessellation with a single, internalirregular vertex. In the only possible construction for asolution is depicted in Figure 2, where each side around P is split into two sub-sides. Due to the constraint onregularity, a pair of sub-sides at the left and the right ofanother edge i must share the same number of edges s i .Thus, we have that ∀ i < n, e i = s i − + s i +1 (2)(all indices, in the above and in all following equations,are considered modulo n ).Because each side of the polygon must be split in twosub-sides, we also need to assume e i > .For P to be CC-able, equations 2 must be fulfilled forsome choice of unknown positive integer values s i . Thisgeneral property translates into different sets of conditionsfor each value of n , as we analyze in the following sec-tions. n = 2 ) For n = 2 , the problem is trivial. Equation (2) becomessimply e = 2 s , e = 2 s (3)(as i − and i + 1 denote the same index modulo 2).Note that it is not necessarily the case that valency-2vertices (sometimes called doublets , [4]) are consideredvalid configurations, but they can be [11]. See also Fig. 3.In conclusion, a two-sided patch is CC-able (in onlyone way) iff both e and e are even numbers (a strongercondition than the Parity condition). n = 3 ) For n = 3 , we rewrite Equation (2) in matrix form: s s s = e e e (4)which implies (by matrix inversion): − − − e e e = s s s (5)2igure 2: Schema for parameters e i and unknowns s i for patches with n = 2, 3, 4, 5 and 6 sides. The same schemageneralises to larger n .Figure 3: A CC-able 2-sided patch, shown with its thecorresponding internal quadrangulation.In other terms, ∀ i, s i = 12 (cid:16) e i − − e i + e i +1 (cid:17) . (6)For s i to be integer, the expression in parenthesis mustbe even, which is already guaranteed by Eq. (1).For s i to be positive, we also need the above expressionto be positive, therefore: ∀ i, e i − + e i +1 > e i . (7)In conclusion, a triangular patch is CC-able iff eachside has fewer edges than the other two sides combined. This condition is a discrete version of the familiar triangleinequality. n = 4 ) For a quadrilateral shape, to be CC-able amounts to beregularly griddable. The conditions for this to be the caseare well-known and obvious, and are re-derived here (con-sistently with the other cases) only for completeness. With n = 4 , Eq. (2) can be written as s s s s = e e e e (8)The matrix is non-singular, as the first two rows matchthe second two; therefore, the system has either multiplesolutions for s i , when e = e and e = e , or no so-lution otherwise. This condition also implies the paritycondition, as (cid:80) e i = 2( e + e ) .Because n = 4 , the internal “irregular” vertex is, actu-ally, regular like the others, and every valid choice of s i produces the same tessellation.In conclusion, a quadrilateral patch is CC-able (in onlyone way) when the opposite sides have a matching num-ber of edges. n = 5 ) For n = 5 , we rewrite Eq. (2) as s s s s s = e e e e e (9)which implies (by matrix inversion) +1 +1 − − − − − − − − − − e e e e e = s s s s s (10)3n other terms, ∀ i, s i = 12 (cid:16) ( e i − + e i + e i +1 ) − ( e i − + e i +2 ) (cid:17) . (11)For s i to be integer, the expressions above must be evenbefore halving, which is already guaranteed by Eq. (1).The sign constraint ( s i > ) produces ∀ i, e i − + e i + e i +1 > e i − + e i +2 (12)In conclusion, a pentagonal patch is CC-able (in onlyone way) iff the total number of edges in any three con-secutive edges is larger than the number of edges in theother two. n = 6 ) For n = 6 , we rewrite Eq. (2) as s s s s s s = e e e e e e (13)which implies (by matrix inversion) − − − − − − e e e e e e = s s s s s s (14)In other terms, ∀ i, s i = 12 (cid:16) e i − + e i +1 − e i +3 (cid:17) . (15)The integrity constraint ( s i ∈ Z ) translates in the re-quirement for the sum of e , , , and the sum of e , , , tobe even numbers.The sign constraint ( s i > ) gives, by j = ( i + 3) modulo 6: ∀ j, e j − + e j +2 > e j . (16)In conclusion, a hexagonal patch is CC-able (in onlyone way) iff (1) each even side has fewer edges than the other two even sides combined (and likewise, for oddsides), and (2), both the even sides, and the odd sides,have an even total number of edges. n = 7 ) For n = 7 , we rewrite Eq. (2) as s s s s s s s = e e e e e e e (17)which implies (by matrix inversion) − − − − − − − − − − − − − − − − − − − − − e e e e e e e = s s s s s s s (18) In other terms, ∀ i, s i = 12 (cid:16) e i − + e i − + e i +1 + e i +2 − ( e i + e i +3 + e i − ) (cid:17) . (19)For s i to be integer, the expression in parenthesis mustbe even, which is already guaranteed by Eq. (1).The sign constraint ( s i > ) becomes ∀ i, e i − + e i − + e i +1 + e i +2 > e i + e i +3 + e i − . (20)In conclusion, a heptagonal patch is CC-able (in onlyone way) iff each side plus its two opposite sides havefewer edges than the remaining four sides combined. n = 8 ) For n = 8 , we can rewrite Eq. (2) as two separate linearsystems:4 s s s s = e e e e s s s s = e e e e (21)Neither matrix is invertible, being deficient by onerank: specifically, their two even rows and two odd rowssum up to the same row-vector. Therefore, the system canhave solutions only when e + e = e + e ,e + e = e + e . (22)In the following, we show that this condition is also suffi-cient.The parity condition is already implied by Eq. (22), be-cause (cid:80) e i = 2( e + e + e + e ) .The only remaining condition is that s i > . Let k , k be the choices for s , s (consented by the rank deficits).Using Eq. (2), we get the values of all other s i : s = k , s = k ,s = e − s s = e − s = e − k , = e − k ,s = e − s s = e − s (23) = e − e + k , = e − e + k ,s = e − s s = e − s = e − e + e − k = e − e + e − k = e − k , = e − k . (the bottom line uses Eq. (22)). Therefore, to have s i > ,the choices k and k must be, each, subject to two upper-bounds and two lower-bounds: < k < e , < k < e , (24) e − e < k < e , e − e < k < e . The above set of constraints is always feasible. The exis-tence of a valid integer solution for k (and likewise, for k ) is guaranteed because each of the two lower bounds issmaller, by at least two units, than each of the two upperbounds. Proof: it is immediate to verify this for < e , and e − e < e (as e , , > ); finally, it also holds for e − e < e because e < e + e = e + e (and e > ;the last equality is Eq. 22). (cid:3) In conclusion, an octagonal patch is CC-able (in gen-eral, in multiple ways) iff one pair of even opposite sideshave the same combined number of edges as the otherpair of even opposite sides, and same for odd sides. n > Our CC-ability analysis for each n (cid:54) covers (we think)the cases used by most practical scenarios.The case for any other n > can be constructed simi-larly, presenting only more instances of the situations en-countered for n (cid:54) . We only briefly surmise a general-ization here.For odd values of n , Eq. (2) can always be expressedwith an invertible linear system, which can be inverted toextract the values of s i as a linear expression of the form s i = 12 (cid:88) j ± e j > (25)(as exemplified for n = 3 , , ). Because (cid:80) ± e j has al-ways the same parity as (cid:80) e j , the condition that s i ∈ Z isalready guaranteed by the Parity condition, Eq. (1). Thecondition for CC-ability is thus entirely determined by thesigns of s i , which translates into a set of n linear inequali-ties, each involving all e i . For a given patch, there is eitherone or no solution.For n = 2 h ( h ∈ N ), Eq. (2) can be expressed as twoseparate linear systems, partitioning the patch sides in twoalternating subsets of h elements each. When h is odd(i.e., n is not a multiple of 4), both systems are invertible,and CC-ability is then determined by a total of n inequal-ities, each involving h sides, plus the condition that thetotal number of edges on each subset must be even; thesolution is always unique, if it exists. When h is even (i.e., n is a multiple of 4) neither system is invertible, each be-ing deficient by one rank; the CC-ability is determined bythe equality conditions on e i required by either system toadmit solutions. Solutions can be multiple (but equivalentwhen n = 4 , as noted), and their space is spanned by twodegrees of freedom.5igure 4: Examples of (strict or non-strict) CC-ability be-ing met or not met for triangular (left) and pentagonal(right) patches. The solitary singular vertex is the red dot;the inequalities (respectively, equations 7,12) which arenot met, or met in a non-strict sense, are annotated in red.See Section 4. The definition of CC-ability can be relaxed by accept-ing that the one singularity is found on the boundary ofthe patch, rather than in its interior (see Figure 4 for ex-amples). We term the relaxed definition “non-strict CC-ability”.For a patch to be non-strictly CC-able, we need s i tobe just non-negative, rather than strictly positive, thus al-lowing for all the inequalities in the conditions for CC-ability to be fulfilled in the non-strict sense, in Equations(7,12,16,20,24) for the cases n = e i > can also be dropped, allowingfor e i = 1 in the input patch.When one inequality is fulfilled as equality, the irreg-ular vertex will be on the boundary, i.e. as a boundaryvertex with edge-valency (cid:54) = 3 . When two inequalities arefulfilled as equalities, the irregular vertex will be found ona corner, i.e. as a corner vertex with edge-valency (cid:54) = 2 (asshown in bottom-right of Figure 4). It is never possiblefor more than two inequalities to be fulfilled as equalities(without infringing at least another inequality). In addition to stating the conditions that must be met for apatch to be CC-able (either strictly or non-strictly), ourconstruction also provides a closed-form description ofthe resulting quadrangulation.The set of values s i can be understood as a compactand complete way to describe the internal tessellation ofthe patch. Specifically, they describe the grid-sizes of theregular rectangular areas constructed on the corners of theoriginal patch; or, equivalently, the number of edges ofthe sub-sides splitting each side, and, thus, the topologicalposition of the singularity inside P (see Figure 2).The Equations (3,6,11,15,19,23) define the values of s i as a closed function of e i for the cases of n =2 , , , , , respectively. In the last case, the equationsuse two arbitrary values k i , which must be chosen insidethe intervals defined in closed-form by Eq. (24), spanningall and only the possible solutions.6igure 5: An octagonal patch (top) fulfills the conditionsin Eq. (22) and is therefore CC-able. After Eq. (24), wehave two choices k , k , ranging in the intervals < k < and < k < ; all resulting quadrangulations areshown. In this work, we identified a problem statement for a self-contained simple task, useful in the context of GeometryProcessing, and derived a complete answer. Specifically,we expressed in closed form the conditions for CC-ability,the description of the resulting quadrangulation, and theset of available choices (if multiple solutions are possible)
About the uniqueness of the solution
As we haveshown, the sought single-irregular-vertex quadrangulationcan be non-unique for n = 8 . This contradicts the com-monly held notion that, in a quadrangulation, no irregularvertex can be “moved alone” (e.g. [8]), meaning that itstopological position inside a region cannot be modifiedwithout also affecting either the tessellation of the regionboundary or the topological position of another irregularvertex in the same region. As it turns out, valency-8 ver-tices are exceptional in that they can be “moved alone”,as exemplified in Figure 5. As we have shown, this is thelowest valency for which this happens (but it also occursfor valencies 12, 16, 20, and so on). Usability
The property of being CC-able can be eas-ily embedded in optimization systems, because it is ex-pressed in closed form as a set of linear inequality, equal-ity, or parity constraints, which can be enforced for exam-ple in convex numerical solvers.
Potential applications
While the main motivation forour analysis stems from Coarse-layout construction (seediscussion in Section 1.1), another potential context isthat of shape modelling, where digital modellers oftendefine 3D shape high-level description, leaving an auto-matic system in the background to deal with the minu-tiae of the surface tessellation (for example [10]), such asin the software suits 3D Coat (PilgWay), Z-Brush (Pixo-logic) and others. Due to the mentioned direct relation-ship with Catmull-Clark subdivision, our formulation canbe a useful tool in the context of “reverse subdivision” (forexample, [7]), where the objective is to seek a subdivisionsurface approximating a given shape.More broadly speaking, the generality of the analyzedproblem statement leads us to believe that our closed-formformulation can find numerous applications.7 eferences [1] B
OMMES , D., L ´
EVY , B., P
IETRONI , N., P
UPPO ,E., S
ILVA , C. T., T
ARINI , M.,
AND Z ORIN , D.Quad-mesh generation and processing: A survey.
Comput. Graph. Forum 32 , 6 (2013), 51–76. 1[2] C
AMPEN , M. Partitioning surfaces into quadrilat-eral patches: A survey.
Comput. Graph. Forum 36 ,8 (2017), 567–588. 1[3] C
ATMULL , E.,
AND C LARK , J. Recursively gen-erated b-spline surfaces on arbitrary topologicalmeshes.
Computer-Aided Design 10 , 6 (1978), 350– 355. 1[4] D
ANIELS , J., S
ILVA , C. T., S
HEPHERD , J.,
AND C OHEN , E. Quadrilateral mesh simplification.
ACMTrans. Graph. 27 , 5 (Dec. 2008). 2[5] M
ARCIAS , G., T
AKAYAMA , K., P
IETRONI , N.,P
ANOZZO , D., S
ORKINE -H ORNUNG , O., P
UPPO ,E.,
AND C IGNONI , P. Data-driven interactive quad-rangulation.
ACM Trans. Graph. 34 , 4 (2015), 65:1–65:10. 2[6] M
ATVEEV , A., A
RTEMOV , A., R
AKHIMOV , R.,B
OBROVSKIKH , G., P
ANOZZO , D., Z
ORIN , D.,
AND B URNAEV , E. Def: Deep estimation of sharpgeometric features in 3d shapes, 2020. 2[7] P
ANOZZO , D., P
UPPO , E., T
ARINI , M., P
IETRONI ,N.,
AND C IGNONI , P. Automatic constructionof quad-based subdivision surfaces using fitmaps.
IEEE Transactions on Visualization and ComputerGraphics 17 , 10 (2011), 1510–1520. 7[8] P
ENG , C.-H., Z
HANG , E., K
OBAYASHI , Y.,
AND W ONKA , P. Connectivity editing for quadrilateralmeshes.
ACM Trans. Graph. 30 , 6 (Dec. 2011),1–12. 2, 7[9] T
AKAYAMA , K., P
ANOZZO , D., S
ORKINE -H ORNUNG , A.,
AND S ORKINE -H ORNUNG , O.Robust and controllable quadrangulation of tri-angular and rectangular regions.
Technical Re-port/ETH Zurich, Department of Computer Science784 (2013). 2 [10] T
AKAYAMA , K., P
ANOZZO , D.,
AND S ORKINE -H ORNUNG , O. Pattern-based quadrangulation for N -sided patches. Comput. Graph. Forum 33 , 5(2014), 177–184. 2, 7[11] T
ARINI , M., P
IETRONI , N., C
IGNONI , P.,P
ANOZZO , D.,
AND P UPPO , E. Practical quad meshsimplification.