Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Geometric Modeling.

Computer Graphics in Education GraphiCon 2018

Techniques for modeling a high-quality B-spline curves by S-polygons in


a float format
Rushan Ziatdinov1, Valerijan Muftejev2, Rifkat Nabiyev2, Albert Mardanov2, Rustam Akhmetshin2
[email protected]|[email protected]|[email protected]|[email protected]|[email protected]
1
Department of Industrial and Management Engineering, Keimyung University, Daegu, Republic of Korea;
2
Department of the Fundamentals of Mechanisms and Machines Design, Ufa State Aviation Technical University, Ufa,
Russian Federation

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.

Keywords: S-polygon, NURBS, fair curve, typical curve, transition curve.

"The Golden Age will include people who will learn to unite."
Konstantin Tsiolkovsky

1. Introduction of the B-polygons of the end segments of the curve, which allows
precise positioning of the end points and directions of the tangent
Mineur et al. [1] and Farin [2] proposed a method for vectors at these points. However, using an S-polygon in a closed
constructing Bézier curves with a monotone change in curvature, format causes instability in the curve modeling at the end
based on the construction of the Bézier polygon (also known as portions of the curve.
B-polygon) with a monotonic change in the control polygon legs
at fixed angles between the legs. The error in this method was 2. Techniques for modeling B-spline curves
recently demonstrated [18], although this fact was known a
decade ago to one of our Japanese The Cox-de Boor algorithm [4, 5] using the format of the
colleagues, Norimasa Yoshida1. representation of the B-spline curve with an S-polygon in a float
In this paper, the aforementioned method adapts to the format is numerically stable, since it uses a sequence of
construction of B-spline curves with monotone curvature and the operations dividing the segment into a given ratio. In addition,
application of the S-polygon with the Mineur-Farin the operations of calculating points and differential
configuration. A technique for modeling a curve with an S- characteristics of the curve are uniform on any segment.
polygon in a float format is proposed, which allows for the Obviously, for the best approximation of the circular arc, the
precise positioning of the end points of the curve and the segment of the B-spline curve of the vertex of the S-polygon in a
direction of the tangents. More detailed equivalence parameters float format must be uniformly chosen on the circle. We
for the two curves, such as the similarity of the m-level curvature construct an S-polygon in a float format of a segment of a B-
and the similarity of the m-level curvature of torsion, are spline of the ninth degree along the vertices of a regular
introduced. In addition, a method for approximating analytic dodecagon inscribed in a circle with a radius of R = 10. The point
curves with the equivalence of curvature and curvature of torsion of the largest deviation of the evolute of the curve from the center
to the mth level is proposed. (0, 0) of the circle is the point with the coordinates
Modern CAD systems use a method of modeling class A (0.000000015321, 0.000000057206).
curves using S-polygons of high-degree NURBS curves. To Transformations of the control polygon formats of B-spline
model closed curves, the S-polygon is used in a float format, and curves and Bézier splines are performed using BS and SB
the closed format of the S-polygon is used for non-closed curves. algorithms [6-8]. In [9] NBS and NSB algorithms of
Based on the configuration of the S-polygon in a float format, the transformations for rational splines are proposed. SB (NSB)
quality of the modeled curve is easily judged. The harmonious, algorithms for the transition from the format of the S-polygon B-
regular form of the S-polygon in a float format of the B-spline spline to the format of the generalized B-polygon of the Bézier
curve allows us to ensure high quality in the generated curve spline are stable, since they contain only operations of dividing
(hereinafter in this article we will clarify the concept of harmony the segments into a given ratio. BS (NBS) algorithms are less
of the S-polygon shape). Using a closed S-polygon is dictated by stable, so they contain extrapolation operations of a segment in a
the need for precise positioning of the end points of the curve and given ratio. The algorithms for converting S-polygon formats of
the directions of the tangent vectors at the end points. The end multi-segment splines partially contain the operations of BS
portions of the closed S-polygon coincide with the initial portions (NBS) and SB (NSB) algorithms.

1 Private communication.

324 September 24–27, 2018, Tomsk, Russia


The publication of the conference proceedings was supported by the RFBR, grant No. 18-07-20045\18
GraphiCon 2018 Геометрическое моделирование. Компьютерная графика в образовании

Fig. 1 shows the segment of the B-spline curve of the ninth 1295.780), (-8.274, -26.046), (-9.832, 5.520), and so on. The
degree associated with the S-polygon in a float format and the error of circular arc approximation increases from 5.92221×10-8
closed S-polygon coinciding with the B-polygon of the Bézier to a value of 3.06354×10-1.
curve of the ninth degree. 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
Fig. 1. An S-polygon in a float format and a closed S- directions when formatting the closed S-polygon.
polygon of a segment of a B-spline curve of ninth degree. 3. Define the position difference vector (the vector
determined by the difference of the actual end point
The vertices of the closed S-polygon (i.e., the B-polygon) do versus the desired end point) and the difference angle
not lie on the circle. The legs of the S-polygon do not have the of the direction (the angle between the actual tangent
same length (the lengths of the legs are 0.518838, 0.519949, direction and the required one).
0.520746, 0.521227, 0.521387, ...). The angles between the legs 4. Switch the current formatting to that of S-polygon in a
are also not equal: in radians they are 0.0653566, 0.0654361, float format.
0.0654898, 0.0655169, ...). At the same time, it is this 5. Eliminate misalignment in the position of the end
configuration that provides a high-precision approximation of the points, requiring translation of the m terminal vertices
circular arc with an accuracy of 5.92221×10-8. of the S-polygon by the magnitude of the difference
In modern CAD systems for modeling class A curves, B- vector in the direction of decreasing the error value.
splines with S-polygons in closed format are used. It is 6. Eliminate the difference in the direction of the tangent
impossible to draw a closed S-polygon with the same vectors, requiring rotation of m end vertices of the S-
configuration as in Fig. 2 to approximate a circular arc with the polygon by the amount of the difference angle in the
same level of accuracy. The difficulty of ensuring proper quality direction of decreasing the difference value.
at the end portions is emphasized in the guidelines for modeling 7. Edit the changed configuration of the S-polygon in a
class A curves in CAD systems. float format until it reaches a harmonious, regular
shape. Repeat the position control on the closed S-
3. Technique of geometrically stable modeling of polygon and edit the S-polygon in a float format until
high-degree B-spline curves using an S-polygon a harmonious, regular form of the S-polygon in a float
in a float format format and the accuracy of the closed S-polygon
position are obtained.
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 4. Typical curves
curve [10].
Differential characteristics of the spline are determined by In the works of Mineur et al. [1] and Farin [2] algorithms for
the divided differences of the S-polygon in a float format [5, 11]. generation of the control points for the formation of typical
A harmonious, regular form of an S-polygon in a float format of Bézier curves with a monotone change in curvature were
a B-spline curve of degree m must satisfy the second order developed. In these algorithms, a B-polygon of the Bézier curve
isogeometry and regularity of an S-polygon of order m-1 [9]. is generated as the control polygon. The essence of the
Such a configuration of an S-polygon can be achieved by algorithms lies in the construction of a B-polygon with a
providing the required law of variation of the discrete monotonous change in the length of the leg, while maintaining a
approximation of the tangent vectors and curvature [9], as constant value of the angle between the legs and the angle of
computed from the central divided differences of the S-polygon torsion. Such a configuration of a B-polygon is called the
of the first and second order. More stringent requirements to the Mineur-Farin configuration.
harmonicity of the polyline configuration can be introduced if The principle of constructing a control polygon by a Mineur-
one takes into account the condition that portions of a modeled Farin configuration is correct in itself, however, as will be shown
or approximated curve with a monotone change in curvature are below, it is more appropriate to apply it to an S-polygon in a float
determined by segments of a polygonal line with a monotonous format of the B-spline curve, and not to the B-polygon of the
variation of the discrete curvature, as, for example, segments of Bézier curve.
a polygonal line with a Mineur-Farin configuration. We will perform a comparative testing of these two different
Modeling and editing of the high-degree B-spline curve at the approaches for the limiting case, namely, modeling the curve of
end portions of the curve by means of a closed S-polygon is constant curvature. Obviously, the elongation coefficient of the
extremely unstable. Even simple rounding of the coordinates of leg in the Mineur-Farin configuration must be equal to 1 for
a closed S-polygon’s vertices can cause distortion of the shape. generating the curve of constant curvature. It is also obvious that
For example, let the arc of a B-spline curve of the ninth degree the Bézier curve and polynomial splines do not accurately
be given by a convex S-polygon in a float format (see Figure 1), approximate the geometry of the circular arc. However, a
built on the vertices of a dodecagon inscribed in a circle of radius comparison of the approximation accuracy can demonstrate the
R = 10. Rounding the coordinates of the second vertex of the advantage of using one method over another.
closed S-polygon (see Fig. 1) from the value (- To generate the vertices of an S-polygon with a B-spline
1.807034341228000, 8.748581800695999) to the value (-1.807, curve, we use an equilateral polygon inscribed in a circle of
8.748) causes a significant change in the shape of the curve and radius R = 10. For a degree of n = 3, a hexagon is used, and for
an unpredictable change in the shape of the S-polygon in a float degrees of n = {5, 7, 9} a dodecagon is used.
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,

24–27 сентября 2018, Томск, Россия 325


Работа опубликована при финансовой поддержке РФФИ, грант 18-07-20045\18
Geometric Modeling. Computer Graphics in Education GraphiCon 2018

The construction of the vertices of a B-polygon is performed To approximate the form, we propose to use additional,
as follows: The terminal vertices of the B-polygon which highly detailed characteristics of the internal geometry of the
coincide with the terminal vertices of the B-spline curve segment. curve, proposed in [12]:
The tangent vectors at the endpoints are orthogonal to the radius
vectors from the center (0, 0). The intermediate vertices of the B- ● Curvature of the first level is the curvature function itself
polygon are defined in such a way as to obtain a configuration 𝜅(𝑠).
with a constant leg length and a fixed angle between the legs. ● The torsion of the first level is the torsion function itself
Below is a table with the distance values of the evolute points 𝜏(𝑠).
farthest from the zero center (0, 0), of the Bézier curve and the ● The second level curvature is a function of curvature of the
B-spline curve. curvature function 𝜅 (2) (𝑠) = (𝜅 ∘ 𝜅)(𝑠)
 The second level curvature of the torsion is a function of
Table 1. Comparison of approximation accuracy curvature of the torsion: 𝜅𝜏 (2) (𝑠) = (𝜅 ∘ 𝜏)(𝑠).
Degree (n) Bézier curve B-spline curve
We define of the curvature of the nth level from the curvature
3 8.17283×10-1 8.33333×10-1 of a curve as follows
5 8.06272×10-2 1.11371×10-3 𝜅 (𝑛) (𝑠) = (𝜅 (𝑛−1) ∘ 𝜅)(𝑠),
7 4.65855×10-2 7.85284×10-6 and the curvature of the nth level from the torsion of the curve is
9 3.19524×10-2 5.92221×10-8 (𝑛) (𝑛−1)
𝜅𝜏 (𝑠) = (𝜅𝜏 (𝑠) ∘ 𝜏) (𝑠).
As can be seen from Table 1, an increase in the degree results Under shape preserving approximation of n-level of
in an extremely slow increase in the approximation accuracy of equivalence we mean the equivalence of curvatures to the n-th
a circular arc by Bézier curve. Even for a degree of n = 9, the level and of the curvatures of torsion to the n-th level for the
Bézier curve does not provide acceptable accuracy (in modern original curve and the approximating curve. Equivalence of the
CAD systems, the NURBS degree does not exceed a tenth shape of the curves means that the number and order of inflection
degree). Concurrently, for n = 9, the B-spline curve achieves and extrema points in the curves are the same. Thus, for high-
accuracy acceptable for engineering calculations in CAD quality shape approximation, the curvature of the curvature and
systems. This test result shows the advantage of using the the curvature of the torsion of the original and approximating
Mineur-Farin method for constructing a curve of constant curve should be equivalent in shape, at least until the second
curvature by means of an S-polygon in a float format. This level. These arguments lead us to the following technique of
statement is also true in the case of modeling curves with a isogeometric shape approximation of an analytic curve by B-
monotone change in curvature. Consider the configuration of a spline curve of high-degree n, where n>5. The vertices of an S-
polygon of five points with a monotonous change in the length polygon in a float format of a B-spline curve are generated
of the leg with a scaling factor of two units and a fixed angle directly on the analytic curve. With a proper distribution of points
between the legs equal to 90°. Let us define the Bézier curve of and the distribution density on the analytic curve, it is possible to
the fifth degree on this configuration and on the same ensure the equivalence of the shape of the analytic curve segment
configuration, as on the S-polygon in the float format, we define and the B-spline curve not lower than the second level.
the segment of the B-spline curve. Analysis of the evolute graphs As an example, a shape approximation of a conical spiral by
shows that the curvature of the Bézier curve is not monotonic, a B-spline curve of the eighth degree is given (Fig. 3). The
and the B-spline curve is defined with a monotone change in the conical spiral is determined by the parametric equation
𝑥(𝑠) = 2 + 𝑠 sin 𝑠
curvature (Fig. 2).
𝑦(𝑠) = 2 + 𝑠 cos 𝑠
𝑧(𝑠) = 𝑠
The vertices of the S-polygon are computed on an analytic curve
with the initial value of the parameter s = 0 and with a step h = 1
in the number of twenty points.

Fig. 2. Bézier curve (left) and B-spline curve (right) segments,


defined on the same control polygon.

5. Construction of a high-quality approximating


B-spline curve

Welters and Farin [3] proposed an approximation method


taking advantage of the geometric proximity of two curves (the
original curve and the approximating curve). In Welters and Fig. 3. Approximation of the shape of a conical spiral.
Farin’s method, geometric proximity is estimated by examining
the relative equivalence of two curves with respect to the The curvature graph as well as the graph of curvature of
parameters of curvature and torsion. Moreover, the authors torsion of the B-spline curve up to the second level are equivalent
introduced the term shape approximation, and noted that in shape to the second level curvatures of the conical spiral.
successful approximation guarantees the accuracy of the shape in This technique will also be useful for approximating the log-
the sense that the geometry of the original curve is approximated aesthetic curves [13, 14] and Ziatdinov’s superspirals [15]. In
neatly [3]. accordance with the multi-criteria approach to the evaluation of

326 September 24–27, 2018, Tomsk, Russia


The publication of the conference proceedings was supported by the RFBR, grant No. 18-07-20045\18
GraphiCon 2018 Геометрическое моделирование. Компьютерная графика в образовании

log-aesthetic curves [16], when importing log-aesthetic curves to [8] Prautzsch, H., Boehm, W., Paluszny, M. Bézier and B-
CAD systems in the form of NURBS templates, it is important to spline techniques. Springer, 2002, 190 p.
preserve the characteristics of the internal geometry using [9] Muftejev, V.G., Romanyuk, A.N., Mardanov, A.R.,
smoothness criteria. Farkhutdinov, I.M. Geometrically stable modeling of
NURBS curves and surfaces of arbitrary degrees.
6. Composite curves Applied Geometry, 11, pp. 19-77.
[10] Muftejev, V.G., Mardanov, A.R., Romanyuk, A.N.,
Existing methods of modern CAD systems provide an order Turta, V.G., Farkhutdinov, I.M. Program of
of smoothness of no more than G4. With the float format of the isogeometric modeling of high-quality curves. Web-
S-polygon, it is easy to construct composite log-aesthetic curves application for CAD systems. Proceedings of the
by segments of B-spline curves of the same degree of n international scientific and technical internet-
approximating log-aesthetic curves not lower than the second conference on computer graphics and image
level of shape isogeometry. The S-polygons of the B-spline recognition. Vinnytsa, Ukraine. 2012. pp. 127-139.
curves are positioned and matched by additional vertices so that [11] Golovanov, N.N. Geometric modeling. Moscow,
the composite S-polygon has a harmonious, regular shape. Fizmatlit, 2002 (in Russian).
Hence, a composite B-spline curve will have an order of [12] Ziatdinov, R., Muftejev, V.G. On a class of plane
smoothness of n-1. curves with equal curvatures of the n-th level. In
Systems of design, technological preparation of
production and management of the life cycle of an
7. Conclusion industrial product (CAD/CAM/PDM - 2017). Institute
of Control Problems, Russian Academy of Sciences.
This article demonstrates the techniques of applying S- p.133.
polygons in a float format for modeling a high-quality B-spline [13] Yoshida, N., Saito, T. Interactive aesthetic curve
curve using smoothness criteria. In particular, the technique of segments. The Visual Computer, 22 (9-11), 2006, pp.
modeling the non-closed B-spline curve is proposed with the 896-905.
provision of accurate positioning of the end points of the curve [14] Miura, K.T. A general equation of log-aesthetic curves
and the directions of the tangent vectors at the end points. In and its self-affinity. Journal of the Japan Society for
addition, a technique for modeling a B-spline curve with a Precision Engineering, 72 (7), 2006, pp. 857-861.
monotonic curvature through an S-polygon with a Mineur-Farin [15] Ziatdinov, R. Family of superspirals with completely
configuration is proposed, as well as a technique for monotonic curvature given in terms of Gauss
approximating analytic curves with the equivalence of curvature hypergeometric function. Computer Aided Geometric
and curvature of torsion to a level m. A technique has been Design, 29 (7), 2012, pp. 510-518.
developed for constructing smooth connections of B-spline [16] Muftejev, V.G., Ziatdinov, R. Functionality and
curves with a high order of smoothness of the composite curve. aesthetics of curves in industrial design: a multi-
The proposed techniques are implemented in the program criteria approach to assessing the quality of shapes in
FairCurveModeler [17]. CAD systems of the future. Vestnik
Mashinostroyeniya, Issue 7, 2018, pp. 23-27 (in
Acknowledgements Russian).
[17] FairCurveModeler app for AutoCAD v. 2019
This manuscript was copy-edited by volunteers Mr. Duncan https://apps.autodesk.com/ACD/en/Detail/Index?id=4
Griffiths (Canada), Mr. Anthony Dowds (UK) and Mr. Marty 526969846340104233&appLang=en&os=Win32_64
Smith (USA). Additionally, we thank Ms. Kimberley Hoffman &mode=preview&autostart=True&loginRequired=Tr
(USA), Ms. Linda Sherwood (USA) and Mr. Seth I. Rich (USA) ue
for useful remarks and suggestions. Without their kind [18] Wang, A., Zhao, G. Counter examples of “Class A
assistance, this publication would not be possible. Bézier curves”. Computer Aided Geometric Design,
61, 2018, pp. 6-8.
References

[1] Mineur, Y., Lichah, T., Castelain, J.M., Giaume, H. A


shape controlled fitting method for Bézier curves.
Computer Aided Geometric Design 15 (9), 1998, pp.
879-891.
[2] Farin, G. Class A Bézier curves. Computer Aided
Geometric Design, 23, 2006, pp. 573-581.
[3] Welters, H.J, Farin, G. Geometric curve
approximation. Computer Aided Geometric Design,
14, 1997, pp. 499-513.
[4] Cox M. G. The numerical evaluation of B-splines,
Journal of the Institute of Mathematics and its
Applications, 10, 1972, pp. 134-149.
[5] De Boor, C., et al. A practical guide to splines. Vol. 27.
New York: Springer-Verlag, 1978.
[6] Boehm, W. Cubic B-spline curves and surfaces in
computer-aided geometric design. Computing, 19,
1977, pp. 29-34.
[7] Sabloniere, P. Spline and Bézier polygons associated
with a polynomial spline curve. Computer-Aided
Design, 10 (4), 1978, pp. 257-261.

24–27 сентября 2018, Томск, Россия 327


Работа опубликована при финансовой поддержке РФФИ, грант 18-07-20045\18

You might also like