Computationally efficient transfinite patches with fullness control
CComputationally efficient transfinite patcheswith fullness control
P´eter Salvi, Istv´an Kov´acs and Tam´as V´aradyBudapest University of Technology and EconomicsFebruary 27, 2020
Abstract
Transfinite patches provide a simple and elegant solution to the prob-lem of representing non-four-sided continuous surfaces, which are useful ina variety of applications, such as curve network based design. Real-timeresponsiveness is essential in this context, and thus reducing the compu-tation cost is an important concern. The Midpoint Coons (MC) patchpresented in this paper is a fusion of two previous transfinite schemes,combining the speed of one with the superior control mechanism of theother. This is achieved using a new constrained parameterization basedon generalized barycentric coordinates and transfinite blending functions.
The representation of multi-sided surfaces is a difficult problem, with differentsolutions suited to different applications. Most CAD systems provide trimmedtensor product surfaces to reproduce patches of arbitrary sides in a mechan-ical model, while in computer graphics subdivision surfaces are the de factostandard. Splitting multi-sided regions into quadrilateral patches—preservingcontinuity along splitting curves—is also a well-researched approach.Transfinite interpolation has many advantages over the above methods: (i) itretains the continuity of its edge curves on the whole domain, while exactly in-terpolates G boundary conditions; (ii) it depends only on the boundary data,without the need of additional control points or polyhedra; (iii) smooth connec-tions to adjacent surfaces are easily ensured.There are also some limitations: (i) as the whole patch is being defined asa blend of its boundaries, there is little control over the center of the sur-face; (ii) computation costs are somewhat higher compared to conventionaltechniques; (iii) the computation of derivatives is complex (normally discreteapproximations are used).One of these concerns, central control, has been alleviated recently by theaddition of an extra degree of freedom (adjusting surface fullness) to the Gre-gory patch [3], the most popular choice of multi-sided transfinite patch [6]. As1 a r X i v : . [ c s . G R ] F e b igure 1: Side- and corner-based transfinite surface interpolation. Side inter-polants (top) are parameterized by a side- and a distance parameter, whilecorner interpolants (bottom) use only side parameters. A point in the polyg-onal domain (left) is mapped to the four-sided domain of each of its ribbons(middle), which are evaluated in 3D space (right) and then blended together,giving a point of the transfinite patch.for computational complexity, a practically equivalent, but much more efficientformulation has been given for the same surface [7, 5]. These two modifica-tions of the Gregory patch are, however, not compatible. The problem lies inthe parameterization of the domain, which is enhanced in this paper in sucha way as to accommodate for both adjustments, and thus create an efficientrepresentation capable of fullness control.The rest of the paper is organized as follows. In Section 2 we give a shortreview of related research. In Section 3 the necessary details of the above twotransfinite surfaces are presented. The new Midpoint Coons (MC) patch isintroduced in Section 4, and test results are shown in Section 5. There has not been much work done on the interior control of transfinite in-terpolation surfaces, maybe because these were regarded as the means of fillingmulti-sided holes, not as a design tool. One exception is an earlier work of theauthors [8], where the patch center can be adjusted via auxiliary surfaces. The2ormulation is a modification of Kato’s patch [4].As briefly outlined above, this paper mainly draws on two previous represen-tations: the Generalized Coons (GC) and Midpoint (MP) surfaces [7, 6]. Theformer is a multi-sided generalization of the Coons patch, which is shown tobe virtually the same as the Gregory patch [5], while the latter introduces acentral control point for fullness control. Both of these are presented in detailin Section 3.Our primary contribution, the constrained parameterization in Section 4.1,is based on generalized barycentric coordinates (see e.g. Floater [1]) and theblending function of Kato’s patch [4].
In this section we will first look at the various constituents of transfinite patches,then review some concrete constructions: the Gregory patch, and its two en-hancements, the Generalized Coons (GC) and Midpoint (MP) patches.Given a loop of 3D curves and cross-derivatives, we want to generate a sur-face that interpolates these boundary conditions (in a G sense, i.e., only tangentplanes are reproduced). Cross-derivatives can be defined automatically using aframe sweep (e.g. with a rotation-minimizing frame [9]), or semi-automaticallyby first fixing normal vectors at arbitrary points. We assume that the cross-derivative functions are twist-compatible; otherwise rational twists can be ap-plied [2].Transfinite surfaces come in two flavors: side-based and corner-based schemes,see Figure 1. Side-based schemes blend together side-interpolants (four-sidedsurfaces that interpolate one side), while corner-based schemes use corner-interpolants (four-sided surfaces that interpolate two adjacent sides). In prac-tice it is much easier to construct side-interpolants, so we will define corner-interpolants based on these, as well.A side-interpolant, or ribbon , for side i is defined as R i ( s i , d i ) = P i ( s i ) + γ ( d i ) T i ( s i ) , (1)where P i ( s i ) is the i -th boundary curve parameterized in [0 , T i is the cor-responding cross-derivative, and γ is a scaling function. (A recommended γ function is γ ( d ) = d/ (2 d + 1), its derivation can be found in Salvi et al. [7]) Thearguments s i and d i are the side- and distance-parameters, with s i ∈ [0 , , d i ≥ . (2)The n -sided patch itself is defined over a convex polygonal domain, e.g. aregular n -sided polygon in the ( u, v ) plane. A crucial component of a transfinitescheme is the parameter mapping from ( u, v ) to ( s i , d i ), i.e., from the n -sidedpolygon to each ribbon’s own parameterization. A basic constraint is that fora point on side i of the domain polygon, s i − = 1 , s i +1 = 0 , d i = 0 . (3)3lso, the side parameter s i changes linearly from 0 to 1, and the distance pa-rameter d i grows monotonically as we go inside the domain.Finally, we will need suitable blending functions that interpolate the ribbonsat the boundaries, but blend them together inside the patch. The classic Gregory patch is a corner-based scheme, so our first step is thecreation of corner interpolants. These can be constructed as the Boolean sumof two adjacent ribbons, with the common part subtracted: I i,i − ( u, v ) = R i − ( s i − , s i ) + R i ( s i , − s i − ) − Q i,i − ( s i , s i − ) , (4)where the Q i,i − correction patch is defined as Q i,i − ( s i , s i − ) = P i (0) + γ (1 − s i − ) T i (0) + γ ( s i ) T i − (1)+ γ ( s i ) γ (1 − s i − ) W i,i − . (5)Here W i,i − is the (common) twist for the corner ( i, i − S CB ( u, v ) = n (cid:88) i =1 I i,i − ( u, v ) B i,i − ( u, v ) , (6)where B i,i − is the blending function B i,i − ( u, v ) = D i,i − (cid:80) nj =1 D j,j − = 1 / ( d i d i − ) (cid:80) nj =1 / ( d j d j − ) (7)with D i,i − = (cid:81) k / ∈{ i,i − } d k .For parameterization, radial side parameters and perpendicular distance pa-rameters are used. As these are not relevant to the enhancements at hand, thereader is referred to the original paper [3]. This is a side-based formulation, similar in logic to the original four-sided Coonspatch: S GC ( u, v ) = n (cid:88) i =1 R i ( s i , d i ) B i ( u, v ) − n (cid:88) i =1 Q i,i − ( s i , s i − ) B i,i − ( u, v ) . (8) Because of this, it is also called “CB patch” [7]. B i ( u, v ) = B i,i − ( u, v ) + B i +1 ,i ( u, v ) is a blending function assigned to the i -th side; everything else is as before.There are, however, more constraints on the parameters. For a point on the i -th side: d i − = s i , d i +1 = 1 − s i , (9) d (cid:48) i − = s (cid:48) i , d (cid:48) i +1 = − s (cid:48) i , (10)where the prime symbol means all directional derivatives. These are satisfiedby a blended construction—details can be found in the original paper [7].Because of this constrained parameterization, there are less ribbon evalua-tions, and thus the computational cost of this surface is about 25% less thanthat of the Gregory patch, while there is no noticeable change in the surface [5]. Here a new degree of freedom was added to the Gregory patch, in form of acentral control point P : S MP ( u, v ) = n (cid:88) i =1 I i,i − ( u, v ) B ∗ i,i − ( u, v ) + P B ∗ ( u, v ) . (11)The modified blending functions are defined as B ∗ i,i − ( u, v ) = d i H (1 − s i − ) H ( d i − ) + d i − H ( s i ) H ( d i ) d i + d i − ,B ∗ ( u, v ) = 1 − n (cid:88) i =1 B ∗ i,i − ( u, v ) , (12)where H ( x ) is a Hermite blend H ( x ) = (1 − x ) + 3(1 − x ) x. (13)Note that by definition (cid:80) ni =1 B ∗ i,i − ( u, v ) + B ∗ ( u, v ) = 1.The control point P has the default location P = 1 n n (cid:88) i =1 I i,i − (0 . , . , (14)but it can be used to move the center of the surface.In this scheme we also have a new constraint on the parameterization. Forpoints on side i , it should satisfy d j = 1 . j / ∈ { i − , i, i + 1 } (15)This can be achieved using generalized barycentric coordinates. Let us look atthis in detail, as this will be the base of our new parameterization in Section 4.1.5 .4 Barycentric parameterization Given a convex polygon with vertices V i , the Wachspress coordinates { λ i } of apoint ( u, v ) have the following properties: n (cid:88) i =1 λ i ( u, v ) = 1 , λ i ( V j ) = δ ij , (16)and λ i decreases linearly on the adjacent domain edges. Now we can define sideand distance parameters as s i = λ i / ( λ i − + λ i ) , d i = 1 − λ i − − λ i . (17)It is easy to see that this construction satisfies all requirements. An example isshown in Figure 2a. We would like to combine the GC and MP patches, so that we have a computa-tionally efficient transfinite patch with fullness control. The idea is simple: usethe modified blending functions B ∗ i,i − in the GC scheme: S MC ( u, v ) = n (cid:88) i =1 R i ( s i , d i ) (cid:2) B ∗ i,i − ( u, v ) + B ∗ i +1 ,i ( u, v ) (cid:3) − n (cid:88) i =1 Q i,i − ( s i , s i − ) B ∗ i,i − ( u, v ) . (18)Unfortunately this is not enough. The problem is in the parameterization:it has to satisfy both Eqs. (9)–(10) and (15), which none of the original formu-lations were capable of. The barycentric parameters described in Section 3.4 already satisfy every con-straint except
Eq. (10). This is evident in Figure 2a, as the blue and red constantparameter lines do not have the same tangent as the green ones near the bottom.Looking at this figure, we can see that what we need is a new distanceparameter ˆ d i that “behaves” as s i − when s i = 0, and as s i +1 when s i = 1; butwe want to retain the original d i for d i = 0 and d i = 1 (i.e., at the base side andat non-adjacent sides).Note that this is a very similar problem to transfinite surfaces—we havefour one-dimensional boundary constraints to be interpolated, while for pointsinside the domain blended values are needed. Indeed, it can be solved using theblending functions of Kato’s patch [4]. 6 a) Barycentric parameterization (b) Constrained barycentric parameterization Figure 2: Constant parameter lines in a 6-sided domain. Side parameters of thebottom side (green), and distance parameters of the left and right sides (blueand red) are shown.Let the values at the boundaries be x = d i , x = s i +1 , x = d, x = 1 − s i − , (19)and the parameters in the corresponding square domain be t = d i , t = 1 − s i , t = 1 − d i , t = s i . (20)Then the new distance parameter is defined asˆ d i = (cid:88) j =1 x j ˆ B j ( u, v ) , (21)where ˆ B j ( u, v ) = (cid:81) l (cid:54) = j t l (cid:80) k =1 (cid:81) l (cid:54) = k t l = 1 /t j (cid:80) k =1 /t k . (22)Note that this function is singular when t i = t j = 0, i (cid:54) = j . This does notpresent a problem, as the parameterization is well-defined in these points.This ˆ d i , combined with the original side parameter s i , gives a parameteri-zation that satisfies all constraints. Figure 2b shows the parameterization in a6-sided domain. As expected, the new MC patch shows an average of 30% speedup compared tothe MP patch, see Table 1. 7 = 3 n = 4 n = 5 n = 6 n = 7 n = 8CB 429ms 316ms 652ms 760ms 887ms 968msGC 321ms 276ms 466ms 536ms 616ms 673msMP 419ms 341ms 638ms 752ms 868ms 953msMC 299ms 277ms 441ms 518ms 578ms 636msSpeedup 28.6% 18.8% 30.9% 31.1% 33.4% 33.3%Table 1: Evaluation speed of different surface representations on a 2.8GHz ma-chine, with a resolution of ca. 10000 triangles, showing the speedup betweenMP and MC patches.Figure 3 shows the deviation between an MP and an MC patch. The maxi-mum deviation is ≈ .
4% of the bounding box axis, with an average deviationof ≈ . G interpolation properties, as can beseen from the contourings. Conclusion
We have successfully combined two transfinite surface representations into anew one that takes the best of both worlds: fast evaluation and the ability tocontrol the surface interior. Future work includes optimization with the GPUand the development of efficient derivative computation.Figure 3: Deviations between 5-sided MP and MC patches. Full red color means0 .
5% of the bounding box axis. The green region has deviation less than 0 . a) Mean curvature map(b) Contouring Figure 4: Fullness change. The central control point is shown by a small cube.
References [1] Michael S. Floater. Generalized barycentric coordinates and applications.
Acta Numerica , 24:161–214, 2015.[2] John A. Gregory. Smooth interpolation without twist constraints. In R. E.Barnhill and R. F. Riesenfeld, editors,
Computer Aided Geometric Design ,pages 71–88. Academic Press, Inc., 1974.[3] John A. Gregory. n -sided surface patches. In Mathematics of Surfaces I ,pages 217–232. Oxford University Press, 1986.[4] Kiyokata Kato. Generation of n -sided surface patches with holes. Computer-Aided Design , 23(10):676–683, 1991.[5] P´eter Salvi and Tam´as V´arady. Comparison of two n -patch representationsin curve network-based design. In Proceedings of the 10th Conference of theHungarian Association for Image Processing and Pattern Recognition , pages612–624, 2015.[6] P´eter Salvi and Tam´as V´arady. Multi-sided surfaces with fullness control.In
Proceedings of the Eighth Hungarian Conference on Computer Graphicsand Geometry , pages 61–69, 2016.[7] P´eter Salvi, Tam´as V´arady, and Alyn Rockwood. Ribbon-based transfinitesurfaces.
Computer Aided Geometric Design , 31(9):613–630, 2014.[8] Tam´as V´arady, P´eter Salvi, and Alyn Rockwood. Transfinite surface inter-polation with interior control.
Graphical Models , 74(6):311–320, 2012.[9] Wenping Wang, Bert J¨uttler, Dayue Zheng, and Yang Liu. Computation ofrotation minimizing frames.