Adaptive Approximate Implicitization of Planar Parametric Curves via Weak Gradient Constraints
Minghao Guo, Yan Gao, Zheng Pan

TL;DR
This paper introduces a novel regularization constraint called the weak gradient constraint for implicitizing planar parametric curves, enabling shape preservation and adaptive degree selection, improving the quality of implicitization.
Contribution
It proposes a new weak gradient constraint and adaptive algorithms for approximate implicitization, addressing feature preservation and implicit degree selection.
Findings
Effective shape preservation demonstrated
Adaptive algorithms find optimal implicit degrees
High-quality implicitization results achieved
Abstract
Converting a parametric curve into the implicit form, which is called implicitization, has always been a popular but challenging problem in geometric modeling and related applications. However, the existing methods mostly suffer from the problems of maintaining geometric features and choosing a reasonable implicit degree. The present paper has two contributions. We first introduce a new regularization constraint(called the weak gradient constraint) for both polynomial and non-polynomial curves, which efficiently possesses shape preserving. We then propose two adaptive algorithms of approximate implicitization for polynomial and non-polynomial curves respectively, which find the ``optimal'' implicit degree based on the behavior of the weak gradient constraint. More precisely, the idea is gradually increasing the implicit degree, until there is no obvious improvement in the weak gradient…
| Input | AD Error | WG Error | WGM | DM | Method in [17] |
|---|---|---|---|---|---|
| Time | Time | Time | |||
| Input | AD Error | WG Error | WGM | DM | Method in [17] |
|---|---|---|---|---|---|
| Time | Time | Time | |||
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Numerical Analysis Techniques · 3D Shape Modeling and Analysis · Robotic Mechanisms and Dynamics
Adaptive Approximate Implicitization of Planar Parametric Curves via Weak Gradient Constraints
Minghao Guo
School of Mathematics and Statistics
Changchun University of Technology
Changchun
&Yan Gao
School of Artificial Intelligence
Jilin University
Changchun
\ANDZheng Pan
Chang Guang Satellite Technology Company Ltd.
Changchun
Abstract
Converting a parametric curve into the implicit form, which is called implicitization, has always been a popular but challenging problem in geometric modeling and related applications. However, the existing methods mostly suffer from the problems of maintaining geometric features and choosing a reasonable implicit degree. The present paper has two contributions. We first introduce a new regularization constraint (called the weak gradient constraint) for both polynomial and non-polynomial curves, which efficiently possesses shape preserving. We then propose two adaptive algorithms of approximate implicitization for polynomial and non-polynomial curves respectively, which find the “optimal” implicit degree based on the behavior of the weak gradient constraint. More precisely, the idea is gradually increasing the implicit degree, until there is no obvious improvement in the weak gradient loss of the outputs. Experimental results have shown the effectiveness and high quality of our proposed methods.
K****eywords Approximate implicitization Parametric curves Curve fitting Weak gradient constraint
1 Introduction
In geometric modeling and computer aided design, the implicit and the parametric form are two main representations of curves and surfaces. The parametric representations provide a simple way of generating points for displaying curves and surfaces. However, it has to introduce a parametrization of the geometry, which is always a challenging problem. Without requiring any parametrization, the implicit representations offer a number of advantages, such as the closeness under certain geometric operations (like union, intersection, and blending), the representation ability for describing an object with complicated geometry, and so on. Thus in this paper, we discuss the problem of converting the parametric form of curves into the implicit form, which is called implicitization.
Implicitization has been receiving increased attention in the past few years. Traditional implicitization approaches are based on the elimination theory (such as -basis[1], Gröbner bases[2][3], resultants[4] and moving curves and surfaces[5][6]), in which the implicitization problem is solved by elimination of the parametric variables. However, high polynomial degrees of their outputs not only make this form computationally expensive and numerical unstable, but also cause self-intersections and unwanted branches in most cases.
To alleviate this problem, a number of approximate implicitization techniques have been proposed, and we follow this line of work. Most of these methods fix the degree of the objective implicit form, and thus the implicitization problem converts to find a solution in a finite vector space. We group these methods into two categories:
Methods in the first category minimize the algebraic distance from the input parametric curve/surface to the output implicit curve/surface, with a chosen implicit degree. One of the first methods that use this idea is [7], in which the main approximation tool is the singular value decomposition. Later, [8] discussed theoretical and practical aspects of the Dokken’s method in [7] under different polynomial basis functions, and proposed a new method for a least squares approach to approximate implicitization using orthogonal polynomials, see Section 2.2 for details. Furthermore, piecewise approximate implicitization with prescribed interpolating conditions using tensor-product B-splines was studied by [9]. Recently, [10] proposed a method to determine primitive shapes of geometric models by combining clustering analysis with the Dokken’s method. In that paper, the implicit degree of curve/surface patches was determined by checking whether the smallest singular value is less than a certain threshold, where the threshold was inferred using a straightforward statistical approach.
The second category is the fitting-based methods, which is also called discrete approximate implicitization. These methods minimize the squared algebraic distances of a set of points sampled from the given parametric curves and surfaces. [11] proposed an approach, that is to approximate the set of sampling points with MQ quasi-interpolation in order to possess shape preserving and then to approximate the error function by using RBF networks. [12] developed an autoencoder-based fitting method, which is to put sampling points into an encoder to obtain polynomial coefficients and then put them into a decoder to output the predicted function value. [13] described an algorithm for approximating sampling points and associated normal vectors simultaneously, in the context of fitting with implicit defined algebraic spline curves. In that paper, the coefficients of the output function are obtained as the minimum of
[TABLE]
where are sampled point data, are unit normals at these points, and is the regulator gain. The first term represents the (algebraic) distance of the point data from the implicit curve . The second term, which is called the strong gradient constraint by us in this paper, controls the influence of the normal vectors to the resulting curve. However, the strong gradient constraint is too strict to find output curves of low degrees, since it requires that the gradient vector and the normal vector have same direction and magnitude simultaneously in any point . The third term “tension” is added in order to pull the approximating curve towards a simpler shape. Afterwards, the idea of [13] has been generalized to the algebraic spline surface case in [14], the rotational surface case in [15], and the space curve case in [16].
A related approach has been proposed by [17], where an alternative gradient constraint
[TABLE]
is defined to make the normalized gradient vector close to the unit normal vector in any point . More precisely, this gradient constraint requires that the mean of angles of and equals to zero. This constraint is used subsequently in their algorithm to find the “optimal” degree of the implicit polynomial needed for the representation of the data set. However, the normalization of both gradient and normal vectors leads to multimodal functional dependencies of the solution from data, and computationally expensive metaheuristic algorithms have to be used in order to realize a better exploration of the search space.
In this paper, we attempt to recover the approximate implicitization of the planar parametric curve adaptively. The contributions of our work are summarized as follows:
- •
To tackle challenges such as unwanted branches and computational complexity, we introduce the so-called weak gradient constraint, which bends the direction of the implicit curve closer to that of the parametric curve. Moreover, compared to the strong gradient constraint in [13], our new regularization constraint largens the solution space.
- •
We perform our objective function of approximate implicitization into the quadratic form, so that the eigenvalue/eigenvector method can be used to find the minimum rapidly.
- •
We develop an adaptive implicitization algorithm, which is to find an implicit polynomial that produces a compact and smooth representation of the input curve with the lowest degree as possible, and at the same time minimizes the implicitization error.
The remainder of the paper is organized as follows. We state the problem and present a synopsis of the Dokken’s method for approximate implicitization in Section 2. Section 3 introduces our implicitization method (WGM) for polynomial curves and shows our numerical results. In Section 4, the WGM is extended to non-polynomial curves. Section 5 finalizes the paper with a conclusion and some possible directions for future work.
2 Background
2.1 Problem formulation
A parametric polynomial curve of degree in is given by
[TABLE]
where and are polynomials in . An implicit (algebraic) curve of degree in , is defined by the zero contour of a bivariate polynomial
[TABLE]
where generates a basis for bivariate polynomials of total degree , denotes the number of basis functions, is the coefficient vector of .
An exact implicitization of is a non-zero , such that the squared algebraic distance (AD for short) from to the implicit curve equals to zero, i.e.
[TABLE]
However, as stated in the introduction, in practice one may prefer to work with lower degrees. Thus in this paper, we consider the approximate implicitization problem, which is to seek the “optimal” with a lower degree , that minimizes the squared AD constraint under some additional criterion to be specified.
2.2 Dokken’s (weak) method
In this subsection, we give a brief description of the Dokken’s (weak) method. Notice that the expression is a univariate polynomial of degree in , Dokken finds that can be factorized as
[TABLE]
where
- •
is the unknown coefficient vector of ,
- •
is the basis of the space of univariate polynomials of degree , and
- •
is the collocation matrix whose columns are the coefficients of expressed in the -basis.
Lemma 1**.**
[8]** Let
[TABLE]
denote the Gram matrix of the basis . Then the squared AD of from can be written as
[TABLE]
where
[TABLE]
is a positive semidefinite matrix.
Lemma 1 shows that is a homogeneous quadratic form of . In order to avoid the null vector , Dokken introduce the normalization . Denote by the unit eigenvector corresponding to the smallest eigenvalue of , then is the solution of the Dokken’s method for minimizing subject to .
3 Methodology for Polynomial Curves
In this section, we provide the approximate implicitization methodology for polynomial curves. First, we propose the weak gradient constraint to keep the gradient vector of and the tangent vector of being perpendicular. Then, we represent the objective function into the matrix form. Finally, we propose the adaptive implicitization algorithm to compute the “optimal” implicitization and do some experiments to show the validity of the algorithm.
3.1 Distance constraint
We use the squared AD constraint in Equation (2):
[TABLE]
3.2 Weak gradient constraint
To obtain a non-trivial solution, the implicitization problem must be regularized by restricting to some specified class of functions. One reasonable approach is to require that this be the class of “shape-preserving” functions. We present the so-called weak gradient (WG for short) constraint:
[TABLE]
where
- •
is the gradient vector of the implicit curve at the point ,
- •
is the tangent vector of the parametric curve at the point , and
- •
the inner product
[TABLE]
where denotes the angle of and at the point .
Compared to the strong gradient constraint in [13], Our WG constraint only requires that the gradient vector of the implicit curve and the normal vector of the parametric curve have same direction in any point. Intuitively speaking, the WG constraint bend the direction of the implicit curve closer to the parametric curve’s. If the inner product equals [math], then the tangents of the implicit and parametric curve are exactly parallel. The smaller the inner product is, the more similar are the appearance of them.
Theorem 1**.**
*The WG constraint in Equation (4) can be written in a homogeneous quadratic form of using the basis . *
Proof.
We can perform the WG constraint as follows. Since the expressions and are polynomial vectors of degree and in respectively, their inner product is a polynomial of degree in . Thus it also can be written as a linear combination of , which is the basis for univariate polynomials of degree . Every coefficient of this linear combination is a linear expression of . As a result, the inner product can be factored into
[TABLE]
where is the collocation matrix whose rows are the coefficients of “’s linear expressions” expressed in . Finally, the WG constraint can be written as
[TABLE]
where
[TABLE]
is a positive semidefinite matrix and is the Gram matrix of the basis in Equation (1). ∎
3.3 Putting things together
Summing up, due to the Equation(2) and (5), the approximate implicitization is found by minimizing the positive semidefinite quadratic objective function
[TABLE]
over the coefficients of , while keeping the degree of fixed. The first term in Equation (7) measures the fidelity of the implicit curve to the given parametric curve, and the second term in Equation (7) try to maintain geometric features that the implicit curve must have. The trade-off between these requirements is controlled by , called the regulator gain.
Similar to the Dokken’s Method, denote by the unit eigenvector corresponding to the smallest eigenvalue of
[TABLE]
then is the solution for minimizing Equation (7) subject to .
3.4 Adaptive implicitization algorithm
The adaptive implicitization is to obtain the “optimal” degree for the implicit polynomial , where . We estimate via the behavior of the WG constraint as the implicit degree increases. We have done lots of experiments on examining the change trend of the WG’s loss, and find that the change usually goes through three stages as increases:
- •
First, the WG’s loss drops significantly (i.e. underfitting).
- •
Second, the WG’s loss reaches the minimum, and then changes very slightly (i.e. justfitting).
- •
Third, the WG’s loss increases conversely (i.e. overfitting).
Thus, we introduce two thresholds for the stopping criterion:
- •
: to examine whether the AD’s loss in Equation (2) satisfies our default precision;
- •
: to check the monotonicity of the WG’s loss in Equation (5) to avoid overfitting.
The adaptive implicitization methodology for polynomial curves, called the Weak Gradient Method (WGM for short), is summarized in Algorithm 1. The inputs of Algorithm 1 are the parametric curve , the maximum implicit degree , and thresholds . The line 1 is employed to initialize the implicit degree . In the while loop (line 2 to line 20), the matrix in the objective function is computed first using the collocation matrix , and the Gram matrix ; then for the th (current) cycle, the “optimal” coefficient vector is found, the AD error and the WG error are computed subsequently; if , which means that the coefficient vectors obtained in previous cycles are unacceptable, then is treated as the final result and the algorithm is terminated under this circumstance (line 10 to line 12); if and satisfy the stopping criterions (line 14), then return as the final result and terminate the algorithm; if none of the aforesaid If statement holds, then let increases by one and go to the next cycle.
3.5 Experiments
Additional branches (i.e. the extra zero contour) generated in the implicitization procedure make the resulting curves challenging to be interpreted, and the elimination of additional branches is the main problem in designing the implicitization methods. [18] address this problem by combining two or more eigenvectors (associated with small eigenvalues), which leads to a gradual decline of the accuracy. With the WGM developed in this paper, additional branches can be avoided as much as possible in the implicitization procedure.
We choose the basis to be the univariate Bernstein polynomial basis of degree , i.e.
[TABLE]
and the basis to be the bivariate monomial basis of total degree . We set the maximum implicit degree , the regulator gain , and the thresholds and .
Example 1**.**
Consider the polynomial parametric curve
[TABLE]
where the parameter of takes value in , and is the Bernstein polynomial basis of degree . is shown in Figure 1.
The first row of Figure 2 shows the adaptive implicitization process of by the WGM. Similarly, the second row of Figure 2 shows the implicitization process of by Dokken’s method. We can see that for every iteration, the WGM refrains from additional branches as much as possible, see (c) vs (f) in Figure 2.
Figure 3 shows the statistic of our method on changes of the AD and WG error for , when the implicit degree is increasing.
Example 2**.**
Consider the polynomial parametric curve
[TABLE]
where the parameter of take values in , and is the Bernstein polynomial basis of degree . is shown in Figure 4.
The first row of Figure 5 shows the adaptive implicitization process of by the WGM. Similarly, the second row of Figure 5 shows the implicitization process of by Dokken’s method. We can see that for every iteration, the WGM’s output curve will approach closer than that of Dokken’s method, from the viewpoint of “shape-preserving”. Moreover, the WGM refrains from additional branches as much as possible, see (c) vs (h), (d) vs (i), and (e) vs (j) in Figure 5.
Figure 6 shows the statistic of our method on changes of the AD and WG error for , when the implicit degree is increasing.
Finally, Table 1 shows the comparison of running time performance of WGM, DM and the method in [17].
4 Methodology for Non-Polynomial Curves
To deal with non-polynomial curves, our approach in this section is to sample a number of points with associated oriented tangent vectors, and then to convert them into implicit polynomials by discrete approximate implicitization (i.e. implicit fitting).
4.1 Curve sampling
Here, we employ the uniform sampling, which makes the sample points distribute uniformly in the parametric space. All the sampling points and their associated tangent vectors are respectively denoted by and .
4.2 Discrete approximate implicitization
Discrete approximate implicitization, also called implicit fitting, is to retrieve the implicit polynomial
[TABLE]
from the sampling points by minimizing the sum of the squared algebraic distances:
[TABLE]
We simplify into the matrix form. While
[TABLE]
we have
[TABLE]
where . Then in Equation (8) can be written as
[TABLE]
where
[TABLE]
To avoid the trivial for ’s minimization, we introduce the weak gradient constraint for the discrete case:
[TABLE]
where is the gradient vector of in any point . The role of is to keep ’s tangent vector and the gradient vector of the implicit polynomial being perpendicular.
Theorem 2**.**
The weak gradient constraint can be written in a homogeneous quadratic form of .
Proof.
Notice that each inner product can be represent as a linear combination of , . Then
[TABLE]
where is the collocation matrix whose rows are the coefficients of ’s linear expressions. Afterwards, can be written in the matrix notation as
[TABLE]
where
[TABLE]
∎
Finally, due to the Equation (9) and (10), the discrete approximate implicitization is found by minimizing the positive semidefinite quadratic objective function
[TABLE]
over the coefficients of , while keeping the degree of fixed. Denote by the unit eigenvector corresponding to the smallest eigenvalue of
[TABLE]
then is the solution for minimizing subject to .
4.3 Adaptive implicitization algorithm
The weak gradient method (WGM for short) of adaptive implicitization for non-polynomial curves is summarized in Algorithm 2. Algorithm 2 is almost identical to Algorithm 1, with three changes:
- •
the curve sampling is employed in the first place (line 1);
- •
the AD and WG matrices are constructed without the Gram matrix (line 6);
- •
since the change trend of the WG’s loss for non-polynomial curves is more subtle (see Figure 12 for example), the stopping criterion of is replaced by (line 14), to check whether the WG’s loss satisfies our default precision.
4.4 Experiments
We choose the basis to be the bivariate monomial basis of total degree . We set the maximum implicit degree , the regulator gain , and the thresholds and .
Example 3**.**
Consider the non-polynomial parametric curve
[TABLE]
where the parameter of take values in . is shown in Figure 7.
The first row of Figure 8 shows the adaptive implicitization process of by the WGM. Similarly, the second row of Figure 8 shows the implicitization process of by Dokken’s method. We can see that for every iteration (i.e. implicit degree ), the WGM’s output curve will approach closer than that of DM, from the viewpoint of "shape-preserving".
Figure 9 shows the statistic of our method on changes of the AD and WG error for , when the implicit degree is increasing.
Example 4**.**
Consider the non-polynomial parametric curve
[TABLE]
where the parameters of take values in . is shown in Figure 10.
The first row of Figure 11 shows the adaptive implicitization process of by the WGM. Similarly, the second row of Figure 11 shows the implicitization process of by Dokken’s method. We can see that for every iteration, the WGM refrains from additional branches as much as possible.
Figure 12 shows the statistic of our method on changes of the AD and WG error for , when the implicit degree is increasing.
Finally, Table 2 shows the comparison of running time performance of WGM, DM and the method in [17].
5 Conclusion
In this paper, we proposed a novel approach for adaptive implicitization of parametric curves based on the so-called weak geometric constraint, named WGM. WGM solves the implicitization problem with regularization terms naturally with very little extra computation effort. Thus, it not only avoids additional branches but also reduces the computational cost effectively. Several experiments presented demonstrate that WGM produces high-quality implicitization results. In future work, we plan to generalize the proposed method to the cases of parametric surfaces and space parametirc curves.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] Sonia Perez-Diaz and Li-Yong Shen. Inversion, degree, reparametrization and implicitization of improperly parametrized planar curves using μ 𝜇 \mu -basis. Computer Aided Geometric Design , 84:101957, 2021.
- 2[2] Quoc-Nam Tran. Efficient gröbner walk conversion for implicitization of geometric objects. Computer Aided Geometric Design , 21(9):837–857, 2004.
- 3[3] YR Anwar, H Tasman, and N Hariadi. Determining implicit equation of conic section from quadratic rational bézier curve using gröbner basis. In Journal of Physics: Conference Series , volume 2106, pages 12–17. IOP Publishing, 2021.
- 4[4] Sonia Pérez-Díaz and J Rafael Sendra. A univariate resultant-based implicitization algorithm for surfaces. Journal of symbolic computation , 43(2):118–139, 2008.
- 5[5] Laurent Busé, Clément Laroche, and Fatmanur Yıldırım. Implicitizing rational curves by the method of moving quadrics. Computer-Aided Design , 114:101–111, 2019.
- 6[6] Yisheng Lai, Falai Chen, and Xiaoran Shi. Implicitizing rational surfaces without base points by moving planes and moving quadrics. Computer Aided Geometric Design , 70:1–15, 2019.
- 7[7] Tor Dokken. Approximate implicitization. Mathematical methods for curves and surfaces , pages 81–102, 2001.
- 8[8] Oliver JD Barrowclough and Tor Dokken. Approximate implicitization using linear algebra. Journal of Applied Mathematics , 2012, 2012.
