Surface–Surface-Intersection Computation Using a Bounding Volume Hierarchy with Osculating Toroidal Patches in the Leaf Nodes
Graphical abstract
Introduction
The problem of intersecting two freeform curves and surfaces in a reliable way is one of the main technical challenges in geometric and solid modeling [1], [2], [3], [4]. Unfortunately, in the last decade, there have been only a few publications in this fundamental research [5], [6]. On the other hand, the problem of intersecting two surfaces appears in many different forms as the solution of non-linear geometric constraints [7], [8], [9], where the constraints are often represented or automatically generated as rational freeform curves, surfaces, and multivariate volumes. Consequently, it is still extremely important to develop new techniques that can handle the surface–surface-intersection (SSI) problem in an efficient and reliable way.
Now, a natural question arises: what makes the revisiting of this problem worthwhile for some meaningful technical advancements? To answer this question in a positive perspective, we would like to mention the recent developments of spatial data structures (such as bounding volume hierarchy) for freeform curves and surfaces, which have made possible the acceleration of many important geometric algorithms, including collision detection, the minimum and Hausdorff distance computations, offset curve trimming, Minkowski sum computation, medial axis and Voronoi diagram construction, convex hull computation, etc [10], [11], [12], [13].
Planar freeform curves can be approximated by a hierarchy of -biarcs with cubic convergence, which can be used for the construction of arc trees (i.e., BVH structures where the internal nodes are fat arcs [14]). The arc trees are a very powerful tool for the acceleration of algorithms for planar freeform curves. A natural dimension–extension of arc trees seems to be torus trees. Nevertheless, different from the planar case, it is extremely difficult to approximate freeform surfaces with -continuous toroidal patches. As a compromise, we consider a union of osculating toroidal patches that tightly fits the given freeform surface. (We use the second order osculating torus patch of Liu et al. [15].) Thanks to the higher approximation order than triangular and bilinear approximations, the osculating toroidal patches provide good approximate solutions to the SSI problem even though they are not connected even with -continuity.
In this work, we consider the acceleration of the SSI problem using a BVH for freeform surfaces. There are certainly some costs we have to pay for the memory space and the preprocessing time for the BVH construction. Nevertheless, the majority of recent acceleration algorithms are based on spatial data structures (often precomputed) at some additional costs. For example, an alternative approach (to the SSI problem) using triangulated meshes of the freeform surfaces would also require the construction of BVH trees in a preprocessing stage, often taking considerably more time and space than our approach. As the memory cost becomes cheaper, we may even assume the pre-constructed BVH structure as a part of the surface representation by encoding the structure compactly as a 2D array, much like an image, which is the approach we take in the current work.
For the sake of simplicity in the presentation, we consider the intersection of two bicubic Bézier surfaces, though the basic approach can easily be extended to higher degree trimmed B-spline surfaces or even to triangular Bézier surfaces. Taking uniform samples along each parameter direction, , where , the BVH structure for a bicubic Bézier surface , (), can be represented in about the same way as that for the quadtree (of height ) for regular quad meshes (Fig. 1). The main difference is in the internal nodes which contain bounding volumes slightly thicker than those for a regular quad mesh. The extra thickness is needed for bounding the difference between a surface and the quad mesh approximation (interpreted as a rectangular array of bilinear surface patches or pairs of triangles).
The surface approximation error can be bounded using a simple formula developed by Filip et al. [16]. (Krishnamurthy et al. [13], [17] also use this formula for the construction of various BVH trees for freeform surfaces.) Using a 2D array of size , where the coordinates of are stored in each element, we can encode the BVH structure of the surface in a compact way, where the thickness of the internal nodes at a level can be estimated by the formula of Filip et al. [16]. (This is because the higher level approximates the surface using a coarser quad mesh with vertices taken at , where .
The BVH-based intersection algorithm for freeform surfaces is about the same as other conventional algorithms for meshes. The main difference is in the intersection of two primitives stored in the leaf nodes. Instead of intersecting two triangles, we intersect two osculating toroidal patches, which may produce intersection curve segments of more complex shapes such as those with multiple branches and even X-junctions. The first row of Fig. 2 shows two examples of the tangential intersection, each with an X-junction. As we move the blue patch up and down along the normal direction, the X-junction disappears and the intersection curve splits to two branches as shown in the second and third rows of the figure.
When two surfaces intersect tangentially at a point, they share the same normal line (i.e., their binormal line) at the point. The location of an X-junction or a near X-junction can be detected by computing the binormal lines to the two surfaces and checking the signed distance between the corresponding binormal-surface intersection points. Depending on the sign, we can decide which type of (almost) tangential intersection curve the two surfaces have. For example, in Fig. 2, when measured along the normal direction of the blue torus, the binormal-surface intersection point of the red torus is located at a signed distance of zero, negative, and positive, respectively, in each of the three rows. Osculating toroidal patches greatly simplify this test by converting the distance computation to a much simpler problem of solving a polynomial equation of degree 8 [18], [19]. The polynomial equation can be solved considerably faster than the general case of computing binormal lines for two bivariate surfaces, where we need to deal with a system of four equations in four variables.
For toroidal patches, their Gauss maps are easy to compute. When there is no overlap in the Gauss maps of the toroidal patches, the intersection curve may have at most one connected branch, which can be traced very efficiently using numerical techniques. Otherwise, we take further steps (such as subdivision or resampling of osculating tori) for detecting the correct topology of SSI curves. Though this is quite a complex task in general due to tangential surface intersections, the binormal construction algorithm for toroidal patches greatly simplifies this process. We subdivide the surfaces at the binormal-surface intersection points, which can remove an X-junction or reduce the number of branches in the intersection curve. In other words, we can make (almost) X-junctions appear only at (or around) the corner points of surface patches, after the subdivision.
The numerical curve tracing can be carried out either on the original surfaces or on the osculating toroidal patches. According to the experimental results reported in Section 5, the difference is insignificant as we cover the entire surface using a union of tightly fitting osculating toroidal patches within a small Hausdorff distance bound, such as .
The main contributions of this work can be summarized as follows:
- •
We propose a new BVH-based algorithm for computing the SSI curves for freeform surfaces, which outperforms other conventional algorithms in computing speed and robustness by computing the BVH structure in a preprocessing time.
- •
The improvement is based on the high approximation order of osculating toroidal patches to the freeform surfaces and the geometric simplicity of toroidal patches in supporting primitive operations (needed for the SSI computation) such as the Gauss map computation, the overlap test between two Gauss maps, the binormal line construction, the projection of points onto a surface, etc.
- •
The BVH of freeform surfaces can be represented in a compact way using a rectangular array of uniform sampling points and other simple spatial data structures which resemble the mipmap structure for texture mapping [20].
- •
The main advantage of our SSI algorithm is in handling the degenerate case of (almost) tangential surface intersections, where the conventional subdivision methods have difficulty pruning a large number of potentially overlapping pairs of small surface patches.
- •
The osculating toroidal patches in the leaf nodes not only bound the small surface patches corresponding to the leaf nodes, but they also bound their surface normals. This will be discussed in Section 3.3.
- •
Further trimming the toroidal patches into a shape similar to the surface patches (using a surface matching technique to be discussed briefly at the end of Section 3.3), we can bound their Hausdorff distance within a small tolerance (by repeating the local subdivisions recursively if necessary).
- •
The 1–1 matching between each local surface patch and the corresponding trimmed toroidal patch (within a Hausdorff distance ) makes the SSI curve constructed in the -parameter space of one surface also 1–1 matched with its counterpart SSI curve in the -space of the other surface . (The Hausdorff distance between the two matching SSI curves is then bounded by , where is a small constant.) More details will be discussed in Section 4
Section snippets
Related work
A comprehensive introduction to the problem of intersecting freeform curves and surfaces can be found in the Chapter 12 of Hoschek and Lasser [2], where early methods are explained in great detail, including algebraic, subdivision, embedding, discretization, and tracing methods. In a survey article (published in 1993), Patrikalakis [21] reviews the SSI algorithms developed in the period of 1988–1992, which are then classified into four main categories: analytic, lattice evaluation, marching,
BVH construction
In this section, we show how to construct a BVH for a bicubic Bézier surface , . The surface is first approximated by a rectangular array of bilinear surfaces , , for , where and . Each bilinear surface is then approximated by a planar quadrangle . The approximation error between and the subpatch , on the subdomain , is bounded by . Expanding the
SSI algorithm
The BVH-based SSI algorithm proceeds by traversing the BVHs for the two freeform surfaces and detecting all pairs of leaf nodes whose bounding volumes overlap. For each pair of overlapping leaf nodes, we first intersect their osculating toroidal patches. When the two toroidal patches have no overlap in their Gauss maps, their SSI curve may have at most one branch with no bifurcation. Otherwise, the two surfaces may have tangential intersections, and we need further steps to determine the
Experimental results
We have implemented the proposed SSI construction algorithm in C++, on an Intel Core i9-9900KF 3.6 GHz Windows PC with a 64GB main memory. To demonstrate the effectiveness of the BVH-based approach, we have tested the SSI algorithm on a large set of examples, including those of intersecting two almost identical surfaces.
The BVH construction on a bicubic Bézier surface typically takes less than one second in the preprocessing step, when the resolution of 64 × 64 is used for sampling the
Conclusions
In this paper, we have presented a new approach to the well-known SSI problem for freeform surfaces, which is based on a pre-built RSS tree with osculating toroidal patches stored in the leaf nodes. The high approximation order of osculating torus was shown to be an effective geometric tool for handling non-trivial cases of two freeform surfaces tangentially intersecting almost everywhere. In future work, we plan to develop a new technique that can bound the tangential intersection areas more
Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Acknowledgments
We would like to thank our anonymous reviewers for their comments. This work was funded in part by the National Research Foundation of Korea (No. NRF-2019R1A2C1003490, NRF-2019K1A3A1A78112596), and in part by the Israel Science Foundation (grant No. 597/18).
References (44)
- et al.
An improved test for closed loops in surface intersections
Comput Aided Des
(1989) Circles in torus-torus intersections
J Comput Appl Math
(2012)- et al.
Topologically guaranteed univariate solutions of underconstrained polynomial systems via no-loop and single-component tests
Comput Aided Des
(2011) - et al.
Subdivision termination criteria in subdivision multivariate solvers
Comput Aided Des
(2007) - et al.
Computing the Hausdorff distance between NURBS surfaces using numerical iteration on the GPU
Graph Models
(2012) - et al.
Efficient Hausdorff distance computation for freeform geometric models in close proximity
Comput Aided Des
(2013) - et al.
GPU-accelerated Hausdorff distance computation between dynamically deformable NURBS surfaces
Comput Aided Des
(2011) - et al.
Fat arcs: A bounding region with cubic convergence
Comput Aided Geom Design
(1989) - et al.
A torus patch approximation approach for point projection on surfaces
Comput Aided Geom Design
(2009) - et al.
Surface approximations using bounds on derivatives
Comput Aided Geom Design
(1986)
The intersection of two ringed surfaces and some related problems
Graph Models
Intersecting a freeform surface with a general swept surface
Comput Aided Des
Approximation of surface-to-surface intersection curves within a prescribed error bound satisfying continuity
Comput Aided Des
Classification and resolution of critical cases in Grandine and Klein’s topology determination using a perturbation method
Comput Aided Geom Design
Loop detection in surface patch intersections
Comput Aided Geom Design
Differential geometry of intersection curves of two surfaces
Comput Aided Geom Design
Efficient offset trimming for planar rational curves using biarc trees
Comput Aided Geom Design
Efficient offset trimming for deformable planar curves using a dynamic hierarchy of bounding circular arcs
Comput Aided Des
Efficient Voronoi diagram construction for planar freeform spiral curves
Comput Aided Geom Design
Tracing surface intersections
Comput Aided Geom Design
Approximating smooth planar curves by arc splines
J Comput Appl Math
Spiral arc spline approximation to a planar spiral
J Comput Appl Math
Cited by (11)
A new spatial data structure for triangular mesh with toroidal patches
2024, Journal of King Saud University - Computer and Information SciencesTopological Classification and Determination of Non-Degenerate Intersections of Two Dupin Cyclides
2022, CAD Computer Aided DesignCitation Excerpt :It is worth mentioning that this paper is targeted at the classification and the fast determination of the topology of the intersection curve of the two Dupin cyclides. This helps to quickly decide the intersection topology of two Dupin cyclides before computing their real intersection locus such as in [6], since general intersection algorithms can sometimes miss the true topology due to numerical problems, for example, there can be branch jump or branch loops, and small loops can be missed. Using our method, one can decide the topology in a more accurate way, since we mainly use symbolic computations in the process, and only apply the numerical computations at the end.
Precise Hausdorff distance computation for freeform surfaces based on computations with osculating toroidal patches
2021, Computer Aided Geometric DesignCitation Excerpt :The acceleration technique is based on osculating toroidal patches to the freeform surfaces under consideration. The osculating torus has been shown to be quite effective in accelerating geometric problems related to the minimum distance of freeform surfaces (Liu et al., 2009; Park et al., 2020; Son et al., 2020). This paper demonstrates the effectiveness even in the maximum distance computation.
Self-intersection computation for freeform surfaces based on a regional representation scheme for miter points
2021, Computer Aided Geometric DesignCitation Excerpt :The GPU-based SSI algorithm of Krishnamurthy et al. (2009) used the AABB (Axis-Aligned Bounding Box) tree, which is the most suitable for GPU implementations. Based on the surface approximation techniques of Filip et al. (1986) and Liu et al. (2009), Park et al. (2020) developed a hybrid BVH using rectangle swept spheres (RSS) for internal nodes and osculating toroidal patches for leaf nodes. In the current work, we follow the basic guideline of Park et al. (2020) and make some changes to the BVH structure.
GPU Parallel Inverse Evaluation of NURBS Surfaces Based on Matrix Representation
2023, Jisuanji Fuzhu Sheji Yu Tuxingxue Xuebao/Journal of Computer-Aided Design and Computer Graphics