Algebraic Point Projection for Immersed Boundary Analysis on Low Degree NURBS Curves and Surfaces

Point projection is an important geometric need when boundaries described by parametric curves and surfaces are immersed in domains. In problems where an immersed parametric boundary evolves with time as in solidification or fracture analysis, the projection from a point in the domain to the boundary is necessary to determine the interaction of the moving boundary with the underlying domain approximation. Furthermore, during analysis, since the driving force behind interface evolution depends on locally computed curvatures and normals, it is ideal if the parametric entity is not approximated as piecewise-linear. To address this challenge, we present in this paper an algebraic procedure to project a point on to Non-uniform rational B-spline (NURBS) curves and surfaces. The developed technique utilizes the resultant theory to construct implicit forms of parametric Bézier patches, level sets of which are termed algebraic level sets (ALS). Boolean compositions of the algebraic level sets are carried out using the theory of R-functions. The algebraic level sets and their gradients at a given point on the domain are then used to project the point onto the immersed boundary. Beginning with a first-order algorithm, sequentially refined procedures culminating in a second-order projection algorithm are described for NURBS curves and surfaces. Examples are presented to illustrate the efficiency and robustness of the developed method. More importantly, the method is shown to be robust and able to generate valid solutions even for curves and surfaces with high local curvature or G0 continuity—problems where the Newton–Raphson method fails due to discontinuity in the projected points or because the numerical iterations fail to converge to a solution, respectively.


Introduction
Given a test point and a parametric entity (curve or surface), the generalized point projection problem is to find the closest point (footpoint) on the entity as well as the corresponding parameter value. Since the footpoint is the closest point on the curve or surface, the line connecting the test point to the footpoint is normal to the curve or the surface [1]: Given a parametric curve or surface entity C(u) ∈ R n (u is treated as a vector when the entity is a surface), the Euclidean distance function d E (x) is defined as the shortest distance from physical test point x to C(u) given by: where C(u) is a physical point on the curve or surface of interest. The distance function d E (x) is continuous for all x ∈ R n and differentiable almost everywhere. The "footpoint" of projection in parametric space u f is defined as: where [a, b] is the parameter range. In general, u f (x) may be non-unique, discontinuous, or non-existent, as illustrated in Figure 1. The footpoint of a test point near the curve or surface segment with high local curvature can be non-unique, leading to discontinuity of point projection process as illustrated in Figure 1a. The non-existence is illustrated in Figure 1b, and occurs around points where C(u) has only G 0 continuity. This problem is of importance in geometric modeling. For instance, while fitting a curve or surface to sampled data, one may need to compute corresponding parameter values and errors at data points since the error is the distance between the data point and the fitting curve or surface [2].
Point projection also plays an important role in computer aided engineering (CAE), especially when boundaries are immersed into the domain and evolved. Such immersed boundary analysis [3] uses a non-conforming mesh to significantly reduce computational cost required for mesh generation as the boundaries evolve. Often, the immersed boundaries are represented as parametric splines, and, more recently, in isogeometric analysis, the underlying domain is also approximated by parametric splines. Isogeometric analysis (IGA) [4,5] is aimed at building behavioral approximations isoparametrically on a spline geometry, most commonly on NURBS curves and surfaces. The goal is to eliminate the need to mesh the geometry for analysis and to ensure the exactness of geometry to the CAD model during analysis. Tambat and Subbarayan [6] developed an Enriched Isogeometric Analysis (EIGA) for immersed boundary problems in which both the domain as well as the enrichments are described by NURBS entities, which are then blended to describe the enriched approximation.
In any immersed boundary problem solution, capturing the interaction of the field approximation defined on the immersed (explicitly defined) boundary with the approximations on the enriched domain requires one to determine the nearest point on the boundary from any given point in the underlying domain. This projection from the spatial point to the boundary is necessary to compute the influence of the domain approximation on those approximations defined on the boundary (see Figure 2). For example, in solutions to mechanical contact problems [7,8], point projection is needed to define the normal gap and tangential slip between two bodies. In fluid-structure interaction (FSI) problems, point projection is required to transfer kinematic and traction data between non-matching fluid-structure interface [9]. In the enriched isogeometric analysis mentioned above, point projection is used to enrich the base approximations with those on lower-dimensional geometrical features such as crack surfaces and phase boundaries, enabling simulations of fracture propagation [6,10] and solidification [11]. A fast and robust point projection method is critical to efficiently solving these problems. The rest of the paper is organized as follows. In Section 2, a review of the literature pertaining to the point projection problem is carried out. In Section 3, the algebraic estimation of distance from a low-degree NURBS curve or surface is reviewed. In Section 4.1, a detailed algorithm for two-dimensional algebraic point projection is presented followed in Section 4.2 by its extension to three-dimensional NURBS surfaces. Several examples are provided in Section 5 to validate the developed algorithm. The paper is concluded with remarks in Section 6.

Literature Review
The use of Newton-Raphson (NR) iterations for solving Equation (1) is well established at this time. These iterative methods mainly consist of two steps: 1. Seek an initial point or segment. 2. Iterate by Newton-Raphson scheme until convergence.
The robustness and the efficiency of Newton-Raphson scheme depends significantly on the initial guess. Therefore, to assure convergence of the second step, careful selection of initial guess is needed. In addition, if the NURBS entity has only G 0 continuity at some local point, the derivative based Newton-Raphson scheme would fail to converge to such a point.
To assure robustness of the iterations, a significant focus of the existing literature is on eliminating portions of the curve or surface where the solution cannot lie. Piegl and Tiller [2] developed a non-iterative, heuristic algorithm where a NURBS surface was decomposed into quadrilaterals and test points were projected onto the closest quadrilateral. Ma and Hewitt [12] described a search for the initial guess of the footpoint by recursively sub-dividing the Bézier segment associated with a valid control polygon. However, using the control polygon to eliminate segments of the curve may exclude the correct solution [13]. Selimovic [14] improved Ma and Hewitt's method using selective sub-division of the NURBS curve (surface) based on distance to the end (corner) point of the entity. Chen et al. [15] pointed out the need for all control points to lie on different sides of a hyperplane in Selimovic's algorithm and proposed a circular clipping method with a sufficiency condition for a curve to lie outside an elimination circle. Other iterative methods in the physical space have also been proposed for point projection including the geometric first-order iterative [16][17][18] and geometric second-order iterative [19][20][21] methods.
In this paper, a robust and efficient point projection technique for low degree two-dimensional (2D) NURBS curves and three-dimensional (3D) NURBS surfaces is developed. The proposed technique preserves and operates directly on the parametric description of the NURBS curve or surface. Therefore, the technique gives a projected point directly on the curve or surface when query points lie on the parametric curve or surface. In addition, the technique is robust for curves and surfaces with high local curvature or G 0 continuity compared to techniques that rely on derivatives. A detailed comparison of existing methods in the literature relative to the proposed method is listed in Table 1.

Background on Algebraic Level Sets
In addition to point projection, blending behaviors on immersed boundaries with domain also requires distance estimates from the boundary to a point in the domain. This is because the behavioral influence of the immersed boundaries decays monotonically with distance. While traditionally distances are estimated using Newton-Raphson iterations, recently, Upreti et al. [23,24] developed algebraic procedures for efficient computation of distance estimates from curves and surfaces. The method developed by Upreti et al. relies on converting the parametric NURBS geometry to its implicit form using the Dixon resultant, and constructing level sets on the implicit form of the geometry. Upreti et al. termed these level sets as algebraic level sets. The construction of the algebraic level sets requires one to decompose the NURBS entity into constituent Bézier patches and later to blend the level sets constructed on Bézier patches using R-functions. The algebraic level sets provide monotonic measures of distance that are accurate to exact distance near the boundary. While the algebraic level sets are approximate measures of distance, they are sufficient to capture the interaction of domain approximations with those on the immersed boundary during analysis. The algebraic level sets have the following properties: 1. Accurate measure of distance locally near the curve/surface 2. Monotonic function of Euclidean (exact) distance 3. Sufficiently smooth for engineering applications 4. Efficiently obtained without numerical iterations for points close to the curve/surface For the sake of completeness, we briefly review the computation of algebraic level sets and illustrate the procedure through simple examples.

Implicitization of a Parametric Curve
Given a rational parametric curve C(X(u), Y(u), W(u)) of degree p with x = X(u) W(u) , y = Y(u) W(u) , one can construct two auxiliary polynomials: The above polynomial equations can be rearranged in descending power of u as follows: From the above, the following resultant system may be obtained through algebraic manipulations [25]: is Bezout matrix and is a function of x and y having the following important property: where M B x , M B y , and M B w depend on control point coordinates and weights. Therefore, these matrices can be pre-computed for a given rational parametric curve and re-used given any new physical point x. The determinant, det(M B (x)), is defined as the Bezout resultant. Since all the allowable parameter values u for curve C(X(u), Y(u), W(u)) are roots of Equation (6), det(M B (x)) = 0 gives the equation of the implicitized curve. Thus, the algebraic level sets corresponding to a rational parametric curve (e.g., Bézier curve) are given by: An example of algebraic level sets is shown in Figure 3.

Boolean Operations by R-functions
As observed in Figure 3, the direct implicitization extends the parametric curve beyond its end points, and yields an invalid distance measure in the extended region. Therefore, it is desirable to trim the curve C(X(u), Y(u), W(u)) within its parameter range u ∈ [a, b]. In related prior work, Biswas and Shapiro [26] constructed an approximate distance from a line segment as: with Γ being the distance in the normal direction from a piecewise linear approximation of the curve, and φ being distance to the region formed by a circle circumscribing the line that is positive inside and negative outside. This form yields a smooth distance function across the boundary φ = 0. Upreti et al. [23] extended the above idea by carrying out Boolean operations on fields obtained on (individual curve segments of) an arbitrarily shaped parametric curve and an enclosing convex region using R-functions ( Figure 4). The R-functions [27,28] enable a smooth and purely algebraic Boolean operation, and result in a continuous distance measure. Two specific R-functions used in this study are: 1. R-conjunction, equivalent to Boolean intersection: 2. R-disjunction, equivalent to Boolean union: A well known property of Bézier and NURBS geometry is the convex hull property, which assures that the curve/surface is contained within its convex hull constructed using the control points. Upreti et al. [23] used the convex hull property of Bézier and NURBS curves to provide a natural convex region bounded by control points for curve trimming. Assume that the ith hyper-plane of the convex hull is expressed as: . The function φ can be obtained by applying R-conjunction operation of Equation (10) to all h i (x), i = 1, 2, ..., n. An example of a cubic Bézier curve is shown in Figure 5.

Normalization and Composition of Algebraic Level Sets
The aforementioned procedure generates a monotonic and continuous distance measure for a basic parametric curve such as a Bézier curve. Piecewise polynomial curves such as NURBS curves, on the other hand, require decomposition to Bézier segments and composition of algebraic level sets of the obtained segments. Further, normalization for individual level sets is desired to yield a monotonically varying composed field. Considering a physical footpoint x f , one can approximate Γ(x f ) to a first order using Taylor expansion: Since the resultant has exact zero set on a parametric curve, i.e., Γ(x f ) = 0, one can derive a distance in the normal direction as follows: After obtaining normalized algebraic level sets for each decomposed Bézier segment, one can compose them using R-conjunction operation (Equation (10)) and thereby generate the desired algebraic level sets. As demonstrated in [23], the R-conjunction operation preserves the normalization of individual Bézier segments. However, an implicitized curve obtained from a Bézier curve of degree p may have as many as 1 2 (p − 1)(p − 2) self-intersections or double points [29]. Any double points inside the convex hull will affect the algebraic level sets construction, and therefore need to be moved out by sub-divisions of the Bézier curve. The algorithm to carryout this process is discussed in Reference [23]. Thus, for practical reasons of avoiding more than one double point while enabling sufficient generality in modeling complex geometries, the methodology is restricted to low degree NURBS curves (p ≤ 3). Figure 6 shows an example of algebraic level sets of an open curve containing two points with G 0 continuity.

Extension to NURBS Surface
The algebraic level sets construction can be extended to three-dimensional NURBS surfaces in a straightforward manner by implicitizing the rational parametric surface with the Dixon resultant [25]. Given a rational parametric surface S( , three auxiliary polynomials can be formed as follows: As before, using algebraic elimination theory, one can derive the corresponding resultant system for surface S: where the vector is indexed lexicographically. M D is the Dixon matrix, which also possesses a property analogous to Equation 7 of linearity with respect to x, y, and z: where, as before, M D x , M D y , M D z , and M D w depend on control point coordinates and weights. The determinant of the Dixon matrix is the Dixon resultant: An example of the algebraic level sets from a free surface is illustrated in Figure 7. The pseudo-code in Algorithms 1 shows the generic steps in algebraic level sets computation for NURBS curves and surfaces. Both NURBS curves and surfaces are denoted by C(u) here for notational convenience, with the implicit understanding that u = (u) for curves and u = (u, v) for surfaces. B(C) ← Split NURBS entity C into a Bézier set with segments B i , i = 1, 2, · · · , n 3: Loops are independent and parallelizable 4: h i ← Create convex hull for B i ∈ B(C)

5:
Γ i ← Compute the Bezout or Dixon resultant using Equation (8) Normalization of the resultant using Equation (14) 7: d i ← Carryout Boolean union of distance fields of h i obtained using Equation (9) with Γ i 8: end for 9: d ← Carryout Boolean intersection of individual level sets d i , i = 1, 2, · · · , n using Equation (10) 10: end function

Time Complexity of the Algebraic Level Sets Algorithm
The algorithmic complexity of Algorithm 1 is given in [23] and reproduced here. Consider a NURBS curve of degree p. Further, assume that the NURBS curve decomposes into n Bézier curves. This decomposition process can be carried out in O(n) time. For each step in constructing the algebraic level sets of the Bézier curve, the time complexity is a function of its degree p and is given in Table 2. Since each Bézier curve comprises of p + 1 control points, the construction of its convex hull requires O(p log p) time. Since the convex hull contains at most p + 1 edges, computing the normalized distance field for the hull requires O(p) time. Finding the Bezout/Dixon resultant involves evaluating the determinant of the Bezout matrix of size p × p and costs O(p 3 ) time. Normalization of this resultant requires the gradient of the resultant, which in turn requires solving a linear system (see Equation 21) and costs O(p 3 ) time. The trimming operation only evaluates Equation 9 and can be carried out in O(1) time. Thus, constructing algebraic level sets for a Bézier curve segment requires O(p 3 ) time. These level sets constructed on Bézier curve segments can then be combined to construct level sets for the NURBS curve in O(np 3 ) time. The computational time complexity for a NURBS surface of degree p × q may be obtained analogously. For a Bézier segment of such a NURBS surface, the convex hull contains at most (p + 1)(q + 1) points and edges, and the Dixon matrix used for the resultant is of size 2pq × 2pq. From the step-by-step time complexities listed in Table 2, construction of algebraic level sets for a Bézier surface segment requires O(p 3 q 3 ) time, while that of the NURBS surface requires O(np 3 q 3 ) time. Step

Time Complexity Curve Surface
Convex hull construction O(p log(p)) O(pq log(pq)) Distance field of convex hull

Methodology of Algebraic Point Projection
In this section, we describe the developed procedure for algebraic point projection. The development of the algorithmic procedure is initially motivated using one-parameter NURBS curves and later extended to two-parameter NURBS surfaces.

Algebraic Point Projection for a NURBS Curve
As illustrated using Figure 1, iterative numerical solution for point projection may lead to a discontinuity in the projected point or may miss the correct solution. Hence, we develop in this section a purely algebraic point projection algorithm with the following properties: 1. Exact at any point on the curve or surface, i.e., exact point inversion 2. Controllable accuracy when projected from points near the curve or surface 3. Efficient, non-iterative, and non-recursive solution procedure 4. Footpoints are continuous even near curve segments with high curvature 5. Valid solutions even when projected onto curves with only G 0 continuity The present method consists of two steps: estimation of the footpoint in physical space and parametric inversion using the resultant matrix.

First Order Algebraic Point Projection in Physical Space
From Equation (14), the gradient of the normalized approximate distance function to a Bézier segment is derived as: where I is the identity matrix and H is the Hessian of function Γ(x). Using the above gradient, the physical footpoint x f can now be approximately located as: To calculate d and ∇d using Equations (14) and (19), it would appear at first glance as though Γ, ∇Γ, and H need to be evaluated for every test point. However, the following derivation as well as procedural detail show that d and ∇d can be computed efficiently without explicitly calculating Γ, ∇Γ or H. One can express ∇Γ and H in terms of Bezout matrix M B and its components M B x and M B y (the superscript B is dropped in the following for ease of reading): whereg andH are the vector/matrix multiplying |M| in the above equations, respectively. Substituting Equations (21) and 22 back into Equations (14) and (19), one obtains: The efficiency of algebraic point projection in two-dimensional physical space is summarized as follows: 1. Component matrices M x , M y , and M w are constant for a given rational parametric curve. Therefore, they can be pre-computed and repeatedly used at a point x. 2. Only matrix M needs to be factorized, and the procedure extensively reuses the products M −1 M x and M −1 M y when computingH andg. 3. For a Bezout matrix M of size p × p, where p is the degree of the rational parametric curve, the typical computational cost is low since p is usually small in engineering applications.

Second Order Algebraic Point Projection in Physical Space
For test points near the curve, the first-order algebraic point projection method described in Section 4.1.1 performs well; however, as shown through the example in Figure 8, when points are farther away, the projection is not accurate. The example is of a quadratic Bézier curve with test points on a horizontal line. The failure of first-order algebraic point projection is because the distance function derived in Equation (14) is essentially a first order approximation using Taylor expansion. To improve accuracy and make algebraic point projection possible for points farther from the curve, we present next a second-order algebraic point projection algorithm in the following. While the second-order algorithm is also approximate, in practice, it is sufficient for enriched immersed boundary analysis since only quadrature points near the immersed boundary needs to be projected on to the surface. The second-order approximation of resultant Γ(x f ) at footpoint x f can be written as: Since the resultant at footpoint is zero, i.e. Γ(x f ) = 0, Equation (25) can be rearranged as: where d quad is the distance estimate between the test point and footpoint based on the second-order approximation. ∇Γ and H are the gradient and Hessian of algebraic level sets, which are calculated as described in Section 4.1.1. For test points near the curve, a good approximation of normal vector n could be n = ∇Γ ∇Γ or n = ∇d ∇d . Algebraic point projection in two-dimensional physical space is validated in Figure 9, where the second-order point projection result is compared against first-order point projection as well as Newton-Raphson iterations for various test distances. Both algebraic point projection methods yield the reference solution obtained using the Newton-Raphson method in the limit when the query point is on the curve/surface, and when test distance is small (d = 0.1). The second-order point projection, however, converges to the solution when distances are larger (d = 0.3), where the first-order point projection fails.

Improvement to First Order Algebraic Point Projection
As illustrated in Figures 8 and 9, when the test point is far from the curve, first-order algebraic point projection is inaccurate. In immersed boundary analysis, point projection is only required at quadrature points near the boundary since the physical influence of the boundary on the underlying domain is local. For quadrature points that are far from the boundary, a recursive first-order algebraic point projection must be adopted for accuracy. The main idea is to treat the footpoint estimate of the previous step of first-order algebraic point projection as the starting point for the next step, and to recursively proceed until convergence. If a point is far from the boundary, we combine the distance to the curve d in Equation (14) and distance to convex hull of Bézier segment φ to get the composed distanced and its gradient ∇d as follows: The composed distance together with its gradient is then used for estimating the footpoint in Equation (20). The result after recursive execution is illustrated in Figure 10. Comparing against original first-order algebraic point projection in Figure 9b, one can observe that the improved first order procedure is better.

Improvement to Second Order Algebraic Point Projection
While second-order algebraic point projection is more accurate, as should be expected, relative to first-order algebraic point projection, it could be further improved, as discussed below. Since the n computed locally at a point in the domain is relatively inaccurate for approximating the direction of the vector x − x f at greater distances, Equation (26) will fail to provide the correct solution as distance from the curve increases. As illustrated in Figure 11a, at test points along the line where n does not intersect with the Bézier curve, no valid solution is obtained. This is because the normal vector n generated using algebraic level sets usually does not coincide with normal vector n f at footpoint, especially when test point is far away. One solution to this issue is to construct a new vector n corr , which is guaranteed to have positive discriminant in Equation (26). A trial n corr that points to the centroid of control polygon achieves the desired result. This choice of the normal direction at points far away from the curve is simple and effective as shown in Figure 11b. While this correction is not general, it is likely to provide sufficient accuracy in practice for quadrature points where the behavior of the immersed boundary is blended with that of the underlying domain.
(a) Before correction (b) After correction Figure 11. Second-order algebraic point projection with test points at a far distance: (a) using non-corrected normal vector; and (b) using corrected normal vector.

Inversion to Parametric Space
Given a footpoint x f in physical space, finding a corresponding parameter u f such that C(u f ) = x f is the point inversion problem. The direct approach to carrying out point inversion is by solving a system of polynomial equations, which may not be easy to do since there is no analytical solution for high-order polynomials of deg > 4, and since x f may not lie exactly on curve C(u) [22]. This drawback can be overcome by using the Bezout matrix [25], as shown in the following.
Then, Equation (6) can be rewritten as the following over-constrained linear system: Matrix A is full ranked if Equation (5) has only one common root, i.e., if x f is not a double point [30]. Thus, u f can be obtained by solving a linear least square problem resulting from Equation (30), which requires bounded computational cost unlike numerical iterations using the Newton-Raphson method. In addition, if a physical test point x is initially on the curve, then x f = x, and the point inversion can be directly applied, without needing to find the footpoint. Alternative to solving the over-constrained system, one can discard any one row of A in Equation (30), which will make it full rank and the point inversion solution can be obtained by solving linear system of equations.
To compute u f on a NURBS curve, which is piece-wise polynomial, projection onto the appropriate Bézier segment is required. For this purpose, one can identify the closest Bézier segment using individual algebraic level sets, and apply algebraic point projection on the closest Bézier segment. Denoting the computed parameter on the closest Bézier curve as u B f , the corresponding parameter on the original NURBS curve u N f can be obtained by purely linear scaling and offset. Unlike iterative or recursive schemes, the algebraic method guarantees the existence of a definite footpoint without needing to manipulate user-controlled parameters such as stop criterion or recursion limit in an effort to coax a solution. If a test point is close to the connection node of two adjacent Bézier segments, a result of u B f < 0 or u B f > 1 may be obtained. In this case, higher projection precision can be achieved when a second point projection to the adjacent Bézier segment is attempted (see Figure 12).

Extension to NURBS Surfaces
Analogous to the algebraic level sets in three-dimensions, the algebraic point projection can be naturally extended to three-dimensional Bézier and NURBS surfaces by replacing Bezout matrix M B with Dixon matrix M D . Since the Dixon matrix also has the linearity property, as given in Equation (17), the basic procedure for point projection remains the same, as outlined in Section 4.1.

Projection in Physical Space
Utilizing the linearity property (Equation (17)), one can rewrite ∇Γ and H in Equation (19) as follows (as before, superscript D is dropped for ease of reading): Next, as before, Equations (20), (23) and (24) can be exploited to obtain the physical footpoint x f in three-dimensional space. Earlier statements on efficiency of the algebraic point projection for rational parametric curves also apply to rational parametric surfaces except that the size of the Dixon matrix M D is 2pq × 2pq, where p and q are the degrees of the rational parametric surface in each dimension. Algebraic point projection in three-dimensional physical space is demonstrated in Figure 13, where test points are projected onto a target Bézier surface using the proposed second-order algebraic point projection method and the Newton-Raphson iterations. Again, one can observe that the proposed method leads to accurate solutions for test points closer to the surface.

Inversion to Parametric Space
The point inversion for rational parametric surfaces can be carried out using Dixon matrix as well. Substituting the physical coordinates of the footpoint x f = (x f , y f , z f ) in M D , we get: Thus, as before, the homogeneous system in Equation (16) can be converted into an over-constrained non-homogeneous system as follows: Generally, the parameters (u f , v f ) of the footpoint x f can be computed by solving a least square problem or discarding any one row and then solving a linear system of equations as mentioned earlier.
As before, the computation of parameters (u N f , v N f ) on a NURBS surface requires sub-division of the surface into a set of Bézier segments. One can apply algebraic point projection to the Bézier segment with smallest algebraic level set measure, and acquire (u N f , v N f ) from the Bézier parameters (u B f , v B f ) by simple linear scaling and offset. As illustrated in Figure 14

Time Complexity of the Algebraic Point Projection Algorithm
The generic pseudo-code of algebraic point projection for both NURBS curves and surfaces is listed in Algorithm 2. As can be seen in Algorithms 1 and 2, algebraic level sets (ALS) and algebraic point projection (APP) are closely connected. Algebraic level sets provide the closest Bézier segment for the first point projection, but also restrict the target curve or surface to be low degree (p, q ≤ 3) so as to avoid double points. B(C) ← Split NURBS entity C into a Bézier set with segments B i , i = 1, 2, · · · , n 3: for i ← 1, n do Loops are independent, parallelization is possible 4:

end for
6: if u B f is out of span then 9: u B f ← Carryout the second projection based on Figure 12 or Figure 14 10: if Second projection is infeasible or u B f is still out of span then 11: u B f ← Compute corresponding parameter value on B j boundary 12: end if 13: end if 14: u N f ← Scale and offset u B f based on knot span of C 15: end function The time complexity for Algorithm 2 is now presented for both curves and surfaces. Consider a NURBS curve of degree p or a NURBS surface of degree p × q, decomposing into n Bézier segments. For each step in finding the point projection, the time complexity is a function of the degree and is given in Table 3. As shown in Section 3.5, computing the algebraic level set at a point costs O(np 3 ) time for a curve and O(np 3 q 3 ) time for a surface. Choosing the closest Bézier segment requires finding the minimum of the level sets of n Bézier segments and costs O(n) time. Projection in the physical space to the closest Bézier segment involves finding the gradient and Hessian of the Bezout/Dixon matrix, which requires the solution to a linear system (see Equations (21) and (22)). This costs O(p 3 ) time for curves and O(p 3 q 3 ) time for surfaces. Point inversion to parametric coordinates requires solving a resultant system (Equations (30) and (34)), which also requires O(p 3 ) time for curves and O(p 3 q 3 ) time for surfaces. Finally, the parametric coordinates of the Bézier segment are scaled and offset to obtain the parametric coordinates of the NURBS curve/surface. This can be done in O(1) time. Thus, the total time complexity of algebraic point projection is the same as that of computing the algebraic level sets, i.e., O(np 3 ) for NURBS curves and O(np 3 q 3 ) for NURBS surfaces. Table 3. Time complexity of each step in Algorithm 2 for algebraic point projection. Time complexities are listed for NURBS curves of degree p and NURBS surfaces of degree p × q. Step

Time Complexity Curve Surface
Computing algebraic level set

Results and Discussion
Four numerical examples are presented to demonstrate the algebraic point projection methodology of

Curve Tests
The first curve example is illustrated in Figure 16, where physical points in the underlying domain are projected onto a given NURBS curve using both Newton-Raphson iterations as well as the algebraic point projection. Contour levels indicate the value of parameter u N f of the predicted footpoint. As can be observed in Figure 16, both first-and second-order algebraic point projection provide exact on-curve solutions and good approximate solutions to the parameter values from points near the curve. In addition, one may observe that there are two regions, at the bottom-left and upper-right of Figure 16a, respectively, where due to high curvature of nearby curve segments, a jump in parameter value occurs when Newton-Raphson iterations are used. Such discontinuities disappear when algebraic point projection is used. The relationship between distance from the curve and relative error is obtained for both first-and second-order algebraic point projection methods using the Newton-Raphson method as a reference ( Figure 17). The test points are picked along an arbitrary vertical trace line in Figure 16. The parameter range of the NURBS curve is [0, 1] in the example. As the test point moves closer to the target curve, the projection error decreases quadratically (first-order point projection) and cubically (second-order point projection).
The second curve example shown in Figure 18 demonstrates the robustness of the algebraic point projection when the footpoint is either discontinuous or non-existent. One can observe in Figure 18b that, although Points A and B are continuous in terms of the parametric value on the tracing curve, the Newton-Raphson method results in a large jump in parametric solution A N f and B N f , whereas the algebraic method yields a continuous parameter value. In general, the algebraic projected solution is smoother and matches the Newton-Raphson solution well, and second-order point projection is more accurate than first-order point projection.

Surface Tests
The first and second surface examples demonstrate the robustness of the second-order algebraic point projection for NURBS surfaces involving discontinuous and non-existent footpoints, respectively. In the first example (Figure 19), the discontinuous projection occurs again when the Newton-Raphson method is applied on a surface segment with high mean curvature. In the second example (Figure 20), the Newton-Raphson method failed in regions where the mathematical footpoints do not exist. Not only does the algebraic point projection overcome those problems, but it also produces an accurate and efficient solution. As listed in Table 4, the computational cost per point of the proposed method is only 26% and 14% of that of the Newton-Raphson method in the first and second surface examples, respectively.

Conclusions
In this paper, novel first-and second order-algebraic point projection methods for low degree two-dimensional NURBS curves and three-dimensional NURBS surfaces are proposed. The procedure utilizes the recently developed algebraic level sets. As a first step, the differential property of the resultant matrix is used to obtain the footpoint in the physical space. Next, the parameter value of the footpoint is computed by solving the over-constrained resultant system. Algebraic point projection eliminates inefficient iterative computations and the need for a good initial guess by providing an exact on-curve solution and good approximate solution for points near the curve. Through numerical examples, the algebraic method, especially the second-order point projection is demonstrated to be faster and more smooth than Newton-Raphson iterations.
The proposed algebraic point projection technique possesses two limitations. As illustrated in Section 4, the proposed method is inaccurate or will fail when query points are far away from the curve/surface due to the inaccuracy of the algebraic distance measure. Algebraic point projection will also fail at points where the gradient of the algebraic level-sets is not defined. Such a point occurs, for example, at the center of a circle or sphere. At these locations, a correction to the gradient or a perturbed point is needed. Although algebraic point projection is an approximation, particularly for test points far away from the curve/surface, it has utility for isogeometric analysis, where small inaccuracy in point inversion solution may be acceptable as a trade-off against smooth, robust, and efficient projection. Such a projection is critical given the large number of quadrature points at which point projection is necessary during analysis.