Techniques for modeling a high-quality B-spline curves by S-polygons in a float format
Rushan Ziatdinov, Valerijan Muftejev, Rifkat Nabiyev, Albert Mardanov, Rustam Akhmetshin. (2018). Techniques for modeling a high-quality B-spline curves by S-polygons in a float format, Proceedings of International Conference on Computer Graphics and Vision “GraphiCon”, ISSN 2618-8317, Issue 1, 324-327 [PDF].
This article proposes a technique for the geometrically stable modeling of high-degree B-spline curves based on S-polygon in a float format, which will allow the accurate positioning of the end points of curves and the direction of the tangent vectors. The method of shape approximation is described with the purpose of providing geometrical proximity between the original and approximating curve. The content of the notion of a "harmonious, regular form" of B-spline curve’s S-polygon in a float format is revealed as a factor in achieving a high-quality of fit for the generated curve. The expediency of the shape modeling method based on S-polygon in a float format at the end portions of the curve for quality control of curve modeling and editing is substantiated. The results of a comparative test are presented, demonstrating the superlative efficacy of using the Mineur-Farin configuration for constructing constant and monotone curvature curves based on an S-polygon in a float format. The findings presented in this article confirm that it is preferable to employ the principle of "constructing a control polygon of a harmonious form (or the Mineur-Farin configuration) of a parametric polynomial" to a B-spline curve’s S-polygon in a float format, and not to a B-polygon of the Bézier curve. Recommendations are given for prospective studies in the field of applying the technique of constructing a high-quality B-spline curves to the approximation of log-aesthetic curves, Ziatdinov’s superspirals, etc. The authors of the article developed a technique for constructing smooth connections of B-spline curves with ensuring a high order of smoothness of the composite curve. The proposed techniques are implemented in the FairCurveModeler program as a plug-in to engineering CAD systems.
Mineur et al.  and Farin  proposed a method for constructing Bézier curves with a monotone change in curvature, based on the construction of the Bézier polygon (also known as B-polygon) with a monotonic change in the control polygon legs at fixed angles between the legs. The error in this method was recently demonstrated , although this fact was known a decade ago to one of our Japanese colleagues, Norimasa Yoshida.
In this paper, the aforementioned method adapts to the construction of B-spline curves with monotone curvature and the application of the S-polygon with the Mineur-Farin configuration. A technique for modeling a curve with an S-polygon in a float format is proposed, which allows for the precise positioning of the end points of the curve and the direction of the tangents. More detailed equivalence parameters for the two curves, such as the similarity of the m-level curvature and the similarity of the m-level curvature of torsion, are introduced. In addition, a method for approximating analytic curves with the equivalence of curvature and curvature of torsion to the mth level is proposed.
Modern CAD systems use a method of modeling class A curves using S-polygons of high-degree NURBS curves. To model closed curves, the S-polygon is used in a float format, and the closed format of the S-polygon is used for non-closed curves. Based on the configuration of the S-polygon in a float format, the quality of the modeled curve is easily judged. The harmonious, regular form of the S-polygon in a float format of the B-spline curve allows us to ensure high quality in the generated curve (hereinafter in this article we will clarify the concept of harmony of the S-polygon shape). Using a closed S-polygon is dictated by the need for precise positioning of the end points of the curve and the directions of the tangent vectors at the end points. The end portions of the closed S-polygon coincide with the initial portions of the B-polygons of the end segments of the curve, which allows precise positioning of the end points and directions of the tangent vectors at these points. However, using an S-polygon in a closed format causes instability in the curve modeling at the end portions of the curve.
Techniques for modeling B-spline curves
The Cox-de Boor algorithm [4, 5] using the format of the representation of the B-spline curve with an S-polygon in a float format is numerically stable, since it uses a sequence of operations dividing the segment into a given ratio. In addition, the operations of calculating points and differential characteristics of the curve are uniform on any segment. Obviously, for the best approximation of the circular arc, the segment of the B-spline curve of the vertex of the S-polygon in a float format must be uniformly chosen on the circle. We construct an S-polygon in a float format of a segment of a B-spline of the ninth degree along the vertices of a regular dodecagon inscribed in a circle with a radius of R = 10. The point of the largest deviation of the evolute of the curve from the center (0, 0) of the circle is the point with the coordinates (0.000000015321, 0.000000057206).
Transformations of the control polygon formats of B-spline curves and Bézier splines are performed using BS and SB algorithms [6-8]. In  NBS and NSB algorithms of transformations for rational splines are proposed. SB (NSB) algorithms for the transition from the format of the S-polygon B-spline to the format of the generalized B-polygon of the Bézier spline are stable, since they contain only operations of dividing the segments into a given ratio. BS (NBS) algorithms are less stable, so they contain extrapolation operations of a segment in a given ratio. The algorithms for converting S-polygon formats of multi-segment splines partially contain the operations of BS (NBS) and SB (NSB) algorithms.
Fig. 1 shows the segment of the B-spline curve of the ninth degree associated with the S-polygon in a float format and the closed S-polygon coinciding with the B-polygon of the Bézier curve of the ninth degree.
The vertices of the closed S-polygon (i.e., the B-polygon) do not lie on the circle. The legs of the S-polygon do not have the same length (the lengths of the legs are 0.518838, 0.519949, 0.520746, 0.521227, 0.521387, ...). The angles between the legs are also not equal: in radians they are 0.0653566, 0.0654361, 0.0654898, 0.0655169, ...). At the same time, it is this configuration that provides a high-precision approximation of the circular arc with an accuracy of 5.92221×10-8.
In modern CAD systems for modeling class A curves, B-splines with S-polygons in closed format are used. It is impossible to draw a closed S-polygon with the same configuration as in Fig. 2 to approximate a circular arc with the same level of accuracy. The difficulty of ensuring proper quality at the end portions is emphasized in the guidelines for modeling class A curves in CAD systems.
Technique of geometrically stable modeling of high-degree B-spline curves using an S-polygon in a float format
An S-polygon in a float format of a B-spline curve of degree m can be used for quality control of modeling and for editing a curve .
Differential characteristics of the spline are determined by the divided differences of the S-polygon in a float format [5, 11]. A harmonious, regular form of an S-polygon in a float format of a B-spline curve of degree m must satisfy the second order isogeometry and regularity of an S-polygon of order m-1 . Such a configuration of an S-polygon can be achieved by providing the required law of variation of the discrete approximation of the tangent vectors and curvature , as computed from the central divided differences of the S-polygon of the first and second order. More stringent requirements to the harmonicity of the polyline configuration can be introduced if one takes into account the condition that portions of a modeled or approximated curve with a monotone change in curvature are determined by segments of a polygonal line with a monotonous variation of the discrete curvature, as, for example, segments of a polygonal line with a Mineur-Farin configuration.
Modeling and editing of the high-degree B-spline curve at the end portions of the curve by means of a closed S-polygon is extremely unstable. Even simple rounding of the coordinates of a closed S-polygon’s vertices can cause distortion of the shape. For example, let the arc of a B-spline curve of the ninth degree be given by a convex S-polygon in a float format (see Figure 1), built on the vertices of a dodecagon inscribed in a circle of radius R = 10. Rounding the coordinates of the second vertex of the closed S-polygon (see Fig. 1) from the value (-1.807034341228000, 8.748581800695999) to the value (-1.807, 8.748) causes a significant change in the shape of the curve and an unpredictable change in the shape of the S-polygon in a float format. The vertices of the original S-polygon (-7.071, -7.071), (-9.659, -2.588), (-9.659, 2.588), etc. have changed to (-83.972, 1295.780), (-8.274, -26.046), (-9.832, 5.520), and so on. The error of circular arc approximation increases from 5.92221×10-8 to a value of 3.06354×10-1.
It is the stability of shaping with an S-polygon in a float format at the end portions of the curve that makes this method preferable.
The uncertainty of positioning the end points of the curve and the values of the tangent vectors is eliminated by employing a technique which consists of the following steps:
1. Construct the S-polygon of a curve in a float format of the proper shape.
2. Control the positions of the end points and the tangent directions when formatting the closed S-polygon.
3. Define the position difference vector (the vector determined by the difference of the actual end point versus the desired end point) and the difference angle of the direction (the angle between the actual tangent direction and the required one).
4. Switch the current formatting to that of S-polygon in a float format.
5. Eliminate misalignment in the position of the end points, requiring translation of the m terminal vertices of the S-polygon by the magnitude of the difference vector in the direction of decreasing the error value.
6. Eliminate the difference in the direction of the tangent vectors, requiring rotation of m end vertices of the S-polygon by the amount of the difference angle in the direction of decreasing the difference value.
7. Edit the changed configuration of the S-polygon in a float format until it reaches a harmonious, regular shape. Repeat the position control on the closed S-polygon and edit the S-polygon in a float format until a harmonious, regular form of the S-polygon in a float format and the accuracy of the closed S-polygon position are obtained.