Support function at inflection points of planar curves

Support function at inflection points of planar curves

Computer Aided Geometric Design 63 (2018) 109–121 Contents lists available at ScienceDirect Computer Aided Geometric Design www.elsevier.com/locate/...

425KB Sizes 1 Downloads 60 Views

Computer Aided Geometric Design 63 (2018) 109–121

Contents lists available at ScienceDirect

Computer Aided Geometric Design www.elsevier.com/locate/cagd

Support function at inflection points of planar curves Eva Blažková, Zbynˇek Šír ∗ Charles University, Faculty of Mathematics and Physics, Prague, Czech Republic

a r t i c l e

i n f o

Article history: Available online 15 May 2018 Keywords: Support function Inflection points Hermite interpolation Rational Puiseux series

a b s t r a c t We study the support function in the neighborhood of inflections of oriented planar curves. Even for a regular curve, the support function is not regular at the inflection and is multivalued on its neighborhood. We describe this function using an implicit algebraic equation and the rational Puiseux series of its branches. Based on these results we are able to approximate the curve at its inflection to any desired degree by curves with a simple support function, which consequently possess rational offsets. We also study the G 1 Hermite interpolation at two points of a planar curve. It is reduced to the functional C 1 interpolation of the support function. For the sake of comparison and better understanding, we show (using standard methods) that its approximation order is 4 for inflection-free curves. In the presence of inflection points this approximation is known to be less efficient. We analyze this phenomenon in detail and prove that by applying a nonuniform subdivision scheme it is possible to receive the best possible approximation order 4, even in the inflection case. © 2018 Elsevier B.V. All rights reserved.

1. Introduction The support function representation describes a curve as the envelope of its tangent lines, where the distance between the line and the origin is specified by a function of the line unit normal vector. This approach is one of the classical tools in convex geometry (Gruber and Wills, 1993). In this representation, offsetting and convolution of curves correspond to simple algebraic operations of the corresponding support functions. In addition, it provides a computationally simple way to extract curvature information (Gravesen, 2007). Applications of this representation to problems from Computer Aided Design were foreseen in the classical paper (Sabin, 1974) and developed in several recent publications, see e.g., Aigner et al. (2009a, 2009b), Bastl et al. (2012), Gravesen et al. (2007, 1993), Láviˇcka et al. (2010), Šír et al. (2010, 2008). One of the main advantages of this representation consists in the possibility of handling efficiently both the shape and its offsets (or more generally its convolutions with some other shapes). Indeed, in this representation the approximation error remains the same for the curve/surface and its offsets; in addition the rational parameterization can be ensured for both simultaneously (Šír et al., 2008). This fact can be applied in the context of CNC manufacturing, where the tool center does not follow the produced object boundary, but rather a convolution with the tool shape. The use of a support function representation allows one to avoid complicated approximation techniques in the offset or convolution description. Another advantage of using the support function is a rather simple solution of the G 1 Hermite interpolation. Geometric interpolations (where not exact tangent vectors but only their directions are interpolated) typically lead to nonlinear

*

Corresponding author. E-mail addresses: [email protected] (E. Blažková), [email protected] (Z. Šír).

https://doi.org/10.1016/j.cagd.2018.05.004 0167-8396/© 2018 Elsevier B.V. All rights reserved.

110

E. Blažková, Z. Šír / Computer Aided Geometric Design 63 (2018) 109–121

equations, see e.g., Meek and Walton (1997). Via the support function representation, however, it is reduced to the usual functional interpolation and a system of linear equations is obtained (Blažková and Šír 2014a, 2014b; Šír et al., 2010). Probably the main difficulty related to this kind of representation is the fact that the support function typically has single values for convex objects or, more generally, for so-called quasi-convex shapes (Šír et al., 2008). In general, it is multivalued. A certain effort was made in an attempt to handle the multivalued nature of the support function, considering its implicit version (Láviˇcka et al., 2010) or trigonometric polynomials with various rational periods (Šír et al., 2010). For the purpose of this paper an inflection is a point where the tangent meets the curve to an order of at least 3. So far, however, inflections have been excluded from the description using the support function. The main reason is that the normal turns back at inflections, and the support function must be considered as multivalued in its neighborhood. It has also been noted (Bastl et al., 2013; Šír et al., 2010) that in the presence of inflections, the G 1 Hermite interpolation is less efficient. The purpose of this paper is to analyze the behavior of the support function in the neighborhood of a curve inflection and use it to design an applicable interpolation scheme. We obtain a description of the support function at inflections using the rational Puiseux series of its branches. Based on these results we are able to approximate the curve at its inflection to any desired degree by curves with a simple support function, which consequently possess rational offsets. We also study the G 1 Hermite interpolation at two points of a planar curve. We prove that its approximation order is 4 for inflection-free curves. In the presence of inflection points this approximation is known to be less efficient. We analyze this phenomenon and, applying a nonuniform subdivision scheme, we receive the best possible approximation order 4, even in the inflection case. The remainder of the paper is organized as follows. In Section 2 we give the basic definitions and properties of the explicit and implicit support function. We also analyze the behavior of the support function at inflections. In Section 3 we revisit the topic of the G 1 Hermite interpolation and show that the approximation order drops from 4 to 3 when an inflection occurs. Then we show that the nonuniform subdivision is sufficient to restore the approximation order 4. In Section 4 we design an approximation algorithm and illustrate the theoretical results on some examples. Finally, we conclude the paper. 2. Support function representation of curves In this section we first recall the basic definitions and properties of the dual support function representation of planar curves. In the second part we analyze the behavior of this function at the inflection points of the primary curve. 2.1. Basic definitions and properties For a parametrically or implicitly given oriented planar curve C we define the support function h as a (possibly multivalued) function defined on (a subset of) the unit circle

h : S1 ⊃ U → R which to a unit normal n = (n1 , n2 ) associates the oriented distance(s) from the origin [0, 0] to the corresponding tangent line(s) of the curve. As shown e.g. in Šír et al. (2008) we can recover the curve C from h(n) as the envelope of the system of the tangent lines {n · x − h(n) = 0 : n ∈ U }. This envelope is locally parameterized via the formula

ch (n) = h(n)n + ∇S1 h(φ) = h(n)n(φ) + h (φ)n (φ),

(1)

where ∇S1 denotes the intrinsic gradient with respect to the unit circle, which is alternatively expressed using the following arc length parameterization of S1

n (φ) = n⊥ (φ) = (− sin(φ), cos(φ)).

n(φ) = (cos(φ), sin(φ)),

(2)

It is also possible to parameterize birationally the unit circle, for example via

 n = [n1 , n2 ] =

1 − s2

2s

1+s

1 + s2

, 2

 (3)

and obtain a kind of affine version of the support function h(s) together with the parameterization of the curve ch (s). Note that the inversion formula for changing the variables is

s=

n2 1 + n1

= arctan (φ/2).

As there are often many tangent lines with the same normal, it is globally not always possible to obtain an explicit expression of h but rather an implicit one, which is closely related to the notion of a dual curve consisting of the tangent lines of C .

E. Blažková, Z. Šír / Computer Aided Geometric Design 63 (2018) 109–121

111

Fig. 1. Support function of the Tschirnhausen cubic: The geometric meaning at a given point P on the left and its graph on interval (0, 2π ) on the right.

For example, in the case of a curve C given as the zero set of a polynomial f (x, y ), the equation of the dual curve D (h, n) = 0 can be computed by eliminating x and y from the following system of equations:

f (x, y ) = 0,

n⊥ · ∇ f = 0,

n · [x, y ] = h.

(4)

The dual equation D (h, n) = 0 together with the algebraic constraint + = 1 is called the implicit definition of the support function h or simply the implicit support function. The implicit support function is obviously a kind of dual representation which takes into account the Euclidean metric. Using the parameterization (3) we get the affine implicit support function D (h, s) = 0. The support function representation has many nice properties and in particular simplifies the offset and convolution computation cf. Sabin (1974), Šír et al. (2008). In particular, if the support function h(s) is rational, the resulting parameterization ch (s) will not only be rational, but will also provide rational offsets. In fact, the offsetting (without trimming) corresponds to adding a constant to the support function. More generally, the convolution of curves is obtained through addition of the support functions. Rotation and translation are obtained by simple modifications of the support. In addition, the curvature of the curve at the corresponding point can be expressed by the simple linear formula n21

κ =−

n22

1

(5)

h + h

and the points where h + h = 0 correspond to cusps. Example 2.1. Consider the Tschirnhausen cubic given implicitly as the zero set of f (x, y ) = x3 − 9x2 + 27 y 2 oriented by its unit normal ∇ f /||∇ f ||. By simultaneously solving f (x, y ) = 0, ∇ f · (n2 , −n1 ) = 0 and n1 x + n2 y = h we get its support function

h(n1 , n2 ) =

2 − 2n1 + 8n1 n22 n22

.

The geometric meaning of the support function is clear from Fig. 1. The point having normal (0, 1) and the value h(0, 1) = 2 is marked there. Using the arc length parametrization (2) of the unit circle, we get

h(φ) =

2 − 2 cos(φ) + 8 cos(φ) sin2 (φ) sin2 (φ)

.

Using the birational parametrization (3) of the unit circle, we get

 h (s) =

3 − s2

2

s2 + 1

.

The dual equation of the Tschirnhausen cubic is

D (h, n) = 2 − 2n1 + 8n1 n22 − hn22 . This equation with the constraint n21 + n22 = 1 defines the support function implicitly. Example 2.2. As the support function is defined on the circle, the trigonometric polynomials appear as the simplest support functions in the variable φ . The curves corresponding to the support h(φ) = cos(kφ), where k is an integer, were studied

112

E. Blažková, Z. Šír / Computer Aided Geometric Design 63 (2018) 109–121

Fig. 2. Support function cos(2φ) on the top-left and cos( 13 φ) on the bottom-left, the corresponding curves on the right.

Fig. 3. A curve with an inflection point (left) and its multivaluated support function on the right.

in Šír et al. (2008). Later, this description was extended in Šír et al. (2010) to the case where k is rational and the support function is considered to be multivalued due to the longer period of cos(kφ). Two examples k = 2 and k = 1/3 are shown in Fig. 2. 2.2. Support function at curve inflections Let us first make clear in which sense we use the word inflection. Definition 2.3. We say that a regular point of a curve (parametrically or implicitly defined) is an inflection if the tangent at this point intersects the curve to an order of at least 3 at this point. We say that this inflection is ordinary if this intersection is precisely of order 3. The behavior of the support function at inflections has never been analyzed before. The problem is that the support function is necessarily multivalued in the neighborhood of an inflection, and we have to use some techniques related to the algebraic functions and Puiseux series. Let us start with a simple example. Example 2.4. Consider the parametric curve

 −5 + 8t − 6t 3 − 6t 4 − 6t 5 5 − 3t − 4t 3 − 4t 4 − 4t 5 , c(t ) = , 

10

5

t ∈ R.

(6)

It has an inflection point at c(0) = [−1/2, 1] as shown in Fig. 3, left. Its implicit support function has the form





D (h, n) = h4 (93750000n1 + 125000000n2 ) + h3 263808000n21 − 46512000n1n2 − 531008000n22 +

  + h2 294438600n31 − 486945600n21n2 − 518860800n1n22 + 871795200n32 + h(141760320n41

E. Blažková, Z. Šír / Computer Aided Geometric Design 63 (2018) 109–121

113

− 466276960n31n2 + 111982080n21n22 + 827304960n1n32 − 649287680n42 ) + 19947071n51 − − 107423460n41n2 + 133465840n31n22 + 133792320n21n32 − 361624320n1n42 + 184521728n52 . This algebraic curve has a cusp at n = (3/5, 4/5), h = 1/2 corresponding to the inflection point on the primary curve. So, near the cusp the support function is multivalued, as shown in Fig. 3, right. This behavior of the support function is general, as shown in the following proposition. We will use the variable s defined by (3), because in this case the implicit support function is algebraic (providing that the primary curve is algebraic). But similar forms of the Puiseux-like series can be obtained for the variable φ . Indeed, s and φ are related by a diffeomorphism with a Taylor series with a nonzero linear term for the changes of the parameter in both directions. Proposition 2.5. Let C be a curve with an ordinary inflection at a point with the normal n(s0 ). Then the support function, which is multi-valued in this case, is the graph of the an analytic curve whose parametrization is

s = s0 ± r 2 ,

h = b0 + b2 r 2 + b3 r 3 + O (r 4 ),

b2 = 0.

(7)

Proof. Let us first consider the case s0 = 0, i.e. the normal at the inflection is n0 = (1, 0). Supposing that the inflection is ordinary (the tangent has triple intersection with the curve), we can locally parametrize the curve by a parameterization with the Taylor series

c(t ) = [x0 + x3 t 3 + x4 t 4 + O (t 5 ), y 0 − t ].

(8)

By an explicit series computation we obtain that the variation of the normal expressed in the parameterization (3) has the expansion

s=

3 2

x3 t 2 + 2x4 t 3 + O (t 4 )

(9)

and the corresponding distance of the tangent to the origin (support function)

h = x0 + 3x3 y 0 t 2 + (−2x3 + 4x4 y 0 )t 3 + O (t 4 ). Composing with the inverse series to (9), we get the Puiseux series for h(s)

 h(s) = x0 + 2 y 0 s −

4

2

3

3|x3 |

s3/2 + O (s2 ).

(10)

Changing to the Puiseux series with integer powers, we get the series in the form of (7). For different values of s0 the series of h will be transformed by a linear rational function of s. As it is a diffeomorphism, it has a regular Taylor series and will not change the form of (7). 2 We will not in this paper analyze and exploit the higher order inflections in detail. However, we will show the form of the corresponding support function. The proof uses the same technique as Proposition 7. Corollary 2.6. Let P ∈ C be a regular point and t the tangent at this point. If t has with C at P an intersection of multiplicity k + 1, then the rational Puiseux series of D (h, s) at the corresponding point has the form

(s, h ) = s0 ± r k ,



bi r i

,

(11)

i =0

where b1 = b2 = . . . bk−1 = 0. Corollary 2.7. Note that similar to the known results for the inflection-free curves (see Šír et al., 2008), the support function determines the primary curve up to its derivative of an order one higher than one might expect from the envelope formula (1). This is due to the special nature of (8), which is essentially parameterization by the projection from the tangent line. See also Example 4.1.

114

E. Blažková, Z. Šír / Computer Aided Geometric Design 63 (2018) 109–121

Fig. 4. An approximated support function on the left and the corresponding approximation of the primary curve on the right.

3. Dual G 1 Hermite interpolation In this section we will show how to approximate a segment of a planar curve via a G 1 Hermite interpolation of its endpoints. We will see that this construction leads to a linear system of equations on the coefficients of a suitably chosen support function. We will also study the approximation order of this construction. In the regular case we follow the standard methods, see e.g. Phillips (2006), and prove that the approximation order is equal to 4. In the inflection case we suggest a new nonuniform subdivision scheme and prove, that even in this case it is possible to achieve the approximation order 4. Let C be a curve segment which has no inflections at the interior points, and its normal travels the set U = {n(φ) : φ ∈ (φ0 , φ1 )}. Note that we allow the inflections at the segment endpoints. Suppose that h(φ) is the precise support function of C . We will approximate C by constructing a new curve C˜ which will interpolate its endpoints and its endpoint tangent vectors in the following way. We will compute a support function g defined on U so that

g (φi ) = h(φi ),

g  (φi ) = h (φi ),

i ∈ 0, 1 .

(12)

Note that the support function h is not generally available in an explicit form, but only the positions of the endpoints P0 , P1 of C are given. We can however obtain the values of h and h in the following way

h(φi ) = n(φi ) · P i ,

h (φi ) = n (φi ) · P i = n(φi +

π 2

) · Pi,

i ∈ 0, 1 .

From the form of (1) it is clear that the endpoints of two segments C and C˜ with support functions h and g are identical. The common tangent at these points is ensured by defining both support functions on the same interval (φ0 , φ1 ). The G 1 interpolation by a smooth segment is thus transformed into the standard problem of the functional Hermite interpolation of the first order at the two values φ0 and φ1 . Fig. 4 shows a support function and its interpolant on the left and the corresponding segments of the primary curve on the right. It is a great advantage of the support function that its approximation error translates to the identical behavior of the Hausdorff distance of the corresponding segments. Proposition 3.1. Let h, g be two support functions defined on the interval U = [φ0 , φ1 ], such that

g (φi ) = h(φi ),

g  (φi ) = h (φi ),

i ∈ 0, 1 .

Suppose that the corresponding curve segments ch , c g are cusp-free on U . Then their Hausdorff distance is equal to the error in the support functions

||ch − c g || H = ||h − g ||∞ = max |h(φ) − g (φ)|. φ∈[φ0 ,φ1 ]

(13)

Proof. Due to boundary conditions and the absence of singular points (cusps), the Hausdorff distance is realized by a common normal line to both curve segments. The distance of the points on this line is equal to the absolute value of the difference of the support functions. For a more formal proof see Šír et al. (2008), Proposition 14. 2 A common way to measure the quality of approximation is the order. It describes how the error depends on the maximal length of the spline segment. In the case of the regular division of the approximated curve, the maximal length (and the approximation order) depends only on the number of parts.

E. Blažková, Z. Šír / Computer Aided Geometric Design 63 (2018) 109–121

115

Definition 3.2. Assume that a curve c is given and for any integer k a spline pk consisting of k parts is constructed by  certain interpolation method. We say that the approximation order of the method is n if ||c − pk || H = O k−n . Due to Proposition 3.1, to estimate the Hausdorff distance it is not necessary to perform a sampling from both curves (requiring a quadratic complexity), but rather sample linearly the values of φ ∈ [φ0 , φ1 ]. If the error is too big, we subdivide the curve segment into more parts. Moreover, we can study directly the approximation order of the Hermite interpolation of the support function (in the maximum norm), and we obtain automatically the behavior of the Hausdorff distance. 3.1. Interpolation in a suitable basis In order to solve the interpolation problem (12), we must choose wisely the space G of the interpolation functions. Definition 3.3. We say that the space G = g 1 (φ), g 2 (φ), g 3 (φ), g 4 (φ) of smooth functions on the interval [α , β] is regular, if for any function h(φ) smooth on the interval [α , β] there exists a constant K so that for any φ0 , φ1 ∈ [α , β], φ0 = φ1 , 4 there exists exactly one function g (φ) = j =1 λ j g j (φ) ∈ G satisfying (12) and moreover |λ j | < K for j = 1, . . . , 4. The definition of regular space clearly does not depend on the choice of the basis, and the regularity is preserved by reparameterizations. Natural choices of regular spaces G are trigonometric polynomials (Šír et al., 2008), trigonometric polynomials with rational noninteger arguments (Bastl et al., 2012) and rational trigonometric functions (Gravesen et al., 1993). We will focus on the second case and, given the integers p , q, we will use the four-dimensional space

G1 = cos φ, sin φ, cos

p q

φ, sin

p q

φ .

We will also consider the polynomials in the rational variable s defined by (3). These support functions also provide curves with rational offsets and, moreover, we will be able to take advantage of the well-understood theory of interpolation by polynomials. We will thus also use the four-dimensional space

G2 = 1, s, s2 , s3 . The relation between the variables φ and s is given by s = arctan(φ/2). Obviously, in either basis the interpolation problem (12) is reduced to solving 4 linear equations in four variables. The regularity of these systems is well known for the polynomial case G2 and it was proved explicitly for G1 in Bastl et al. (2012). We thus obtain for any inflection-free curve segment precisely one C 1 Hermite interpolant, and the coefficients are bounded. In the sequel, the following lemma will be useful. Lemma 3.4. Let r be a real function which is four times differentiable on the interval (a, b) and C 1 continuous on [a, b]. Suppose that  (a) = r  (b ) = 0. Then there exists a function ξ : (a, b ) → (a, b ) so that r (a) = r (b) = 0 and r+ −

r (s) = (s − a)2 (s − b)2

r  (ξ(s)) 4!

.

Proof. Let fix s ∈ (a, b). We choose K such that

r (s) = K (s − a)2 (s − b)2 . Then we define for x ∈ [a, b] a function

F (x) = r (x) − K (x − a)2 (x − b)2 . For this function F (a) = F (s) = F (b) = 0, F  is continuous on [a, s] and [s, b] and differentiable on (a, s) and (s, b), so Rolle’s theorem guarantees the existence of c 1 ∈ (a, s) and c 2 ∈ (s, b) such that F  (c 1 ) = F  (c 2 ) = 0. Moreover, we have F  (a) = F  (b) = 0, so again applying (three times) Rolle’s theorem we get c 3 ∈ (a, c 1 ), c 4 ∈ (c 1 , c 2 ) and c 5 ∈ (c 2 , b) such that F  (c 3 ) = F  (c 4 ) = F  (c 5 ) = 0. Another Rolle gives c 6 ∈ (c 3 , c 4 ) and c 7 ∈ (c 4 , c 5 ) for which F  (c 6 ) = F  (c 7 ) = 0. The last use of Rolle’s theorem yields c 8 ∈ (c 6 , c 7 ) such that F  (c 8 ) = 0. Differentiating F we get F  (t ) = r  (t ) − 24K , so K = r  (c 8 )/24. As s was an arbitrary value, the statement of the lemma is proved. 2 Definition 3.5. Let C be a curve segment which has no inflections at the interior points. Let C be divided into subsegments {Ci }ki=0 at the points { P i }ki =+01 . Let the regular support function space G be fixed and c gi be the G 1 Hermite interpolant of the subsegment Ci with the support function g i ∈ G . Then the collection of segments {c gi }ki=0 is called an approximating spline

+1 constructed over the sequence { P i }ki = . 0

116

E. Blažková, Z. Šír / Computer Aided Geometric Design 63 (2018) 109–121

The behavior of the error of the approximating spline is analyzed in the following propositions. Proposition 3.6. Let C = {c(t ), t ∈ [ A , B ]} be a regularly parametrized smooth curve which has no inflections at the interior points nor at the endpoints. For any integer N > 1, let C˜N be the approximating spline constructed over the sequence

{c(t i )}iN=0 , where t i = A +

i N

( B − A ).

Then the approximation error satisfies

||C − C˜N || H = O

1



.

N4

Proof. For the sake of clarity of the proof, let us first consider the regular approximation space of the polynomials G2 . Let h(s), where s ∈ [a, b] be the precise support function of C in the variable s defined as above by (3). Because h is also smooth it has a bounded fourth derivative and we denote K = maxs∈[a,b] h (s). The interpolation values {t i }iN=0 are equally spaced. Because the parameterization c(t ) is regular, there is a constant δ such that |c (t )| < δ . Moreover, there are no inflections and thus the Gauss image is regular as well. Consequently, the sequence {si }iN=0 of the corresponding values of s is spaced not equally but still regularly. More precisely, there exist constants L 1 , L 2 so that

L1 N

≤ max(si +1 − si ) ≤ i

L2 N

.

By Definition 3.5, C˜N is the collection of the interpolants c gi having support function g i (s), s ∈ [si , si +1 ]. For every i, the function r i (s) = h(s) − g i (s) on [si , si +1 ] satisfies the assumptions of Lemma 3.4. Consequently, for s ∈ [si , si +1 ] we have

|h(s) − g i (s)| =

1 24

(s − si )2 (s − si +1 )2 (h − g i ) (ξ(s)) ≤ K (si +1 − si )4 ,

(14)

where the last inequality follows from the fact that g i ∈ G2 is a polynomial of degree three (with vanishing fourth derivative) and ξ(s) ∈ [si , si +1 ] ⊂ [a, b]. The estimate (14) holds for every i and so by Proposition 3.1 we get

||C − C˜N || H =

max

i s∈[si ,si +1 ]

|h(s) − g i (s)| ≤ K

L2 N

4

=

K ( L 2 )4 N4

,

which is the statement of the proposition. For a general regular approximation space G the proof is analogous, with the difference that the derivative g i does not vanish but is bounded by a global constant due to the definition of the regular space. 2 This behavior of the error of the approximating splines was already observed on the level of examples in Bastl et al. (2013), Šír et al. (2010). In the same papers, it was also observed that the error behavior deteriorates in the presence of the inflection. More precisely, one degree of approximation order is lost. This is due to the fact that at the inflection the support function h(s) behaves essentially as s3/2 , see (10), and consequently h is not bounded. We are, however, able to remedy this behavior by a nonuniform sampling of the interpolation points near the inflection. Proposition 3.7. Let C = {c(t ), t ∈ [ A , B ]} be a regularly parametrized smooth curve having only one ordinary inflection point at c( A ). Let us fix a real constant j ≥ 4/3. For any integer N > 1, let C˜N be the approximating spline constructed over the sequence

j

{c(t i )}iN=0 , where t i = A +

i

N

( B − A ),

(15)

then the approximation error satisfies

||C − C˜N || H = O

1 N4



.

Proof. Let us again consider first the approximation space G2 . Let h(s), s ∈ [a, b] be the precise support function of C in the variable s defined as above by (3). Because of the inflection point at the value s = a the relation between the parameters t and s is of the form (9), i.e. (s − a) = (t − A )2 + O ((t − A )3 ) and the support does not have a bounded fourth derivative, but has the form h(s) = (s − a)3/2 r ((s − a)1/2 ), where r (x) is a function analytical at x = 0, see (10). Let us consider the diffeomorphism

σ : (a, b) → (0, (b − a)1/2 j ), s˜ = σ (s) = (s − a)1/2 j .

E. Blažková, Z. Šír / Computer Aided Geometric Design 63 (2018) 109–121

117

The composed relation between the parameters t and s˜ is thus s˜ = (t − A )1/ j + O ((t − A )3/2 j ) and thus the sequence of points s˜ i corresponding to the sequence (15) is regularly spaced, i.e. there exist constants L 1 , L 2 so that

L1 N

≤ max(˜si +1 − s˜ i ) ≤ i

L2 N

.

Let us consider the transformation of the support function to the new parameter h˜ (˜s) = h(σ (s)) = s˜ 3 j r (˜s j ). By Definition 3.5, C˜N is the collection of the interpolants c gi having support function g i (s), s ∈ [si , si +1 ]. Let us again transform these supports to the new parameter g˜ i (˜s) = g i (σ (s)), s˜ ∈ [˜si , s˜ i +1 ]. Then the conditions of Lemma 3.8 (see infra) are satisfied and there exists a global constant K j so that we have

|h(s) − g i (s)| = |h˜ (˜s) − g˜ i (˜s)| ≤ K j (˜si +1 − s˜ i )4 . This estimate holds for every i, and so by Proposition 3.1 we get

||C − C˜N || H =

|h˜ (˜s) − g˜ i (˜s)| ≤ K j

max i

s∈[˜si ,˜si +1 ]

L2

4

N

=

K j ( L 2 )4 N4

,

which is the statement of the proposition. For different spaces G , the result can be obtained by approximation of the basis functions with the elements of G2 . 2 Lemma 3.8. Let  h(˜s) be a real function which is C 1 continuous on the interval [0, δ] and C 4 on (0, δ], δ > 0. Moreover, let j ≥ 4/3 and, on a right neighborhood of the point s˜ = 0, we have  h(˜s) = s˜ 3 j · r (˜s j ), where r is a function analytic at 0. Assume I = [˜a, b˜ ] ⊂ [0, δ]. 2 j 4 j 6 j Denote  g (˜s) := a0 + a1 s˜ + a2 s˜ + a3 s˜ the unique Hermite interpolant of the values and the first derivatives of  h(˜s) at the points ˜ a˜ and b. Then there exists a constant K j so that

max | h(˜s) −  g (˜s)| < K j · (b˜ − a˜ )4 . s˜ ∈ I

Proof. The function  h(˜s) −  g (˜s) satisfies assumptions of Lemma 3.4, so we have

( h − g )(4) (ξ(˜s))  h(˜s) −  g (˜s) = (˜s − a˜ )2 (˜s − b˜ )2 . 24

The maximum is

max || h(˜s) −  g (˜s)|| ≤ s˜ ∈ I

(b˜ − a˜ )4 ( h − g )(4) (ξ(˜s)) · . 16

24

If we can bound ( h − g )(4) on I by a universal constant, the lemma will be proved. For j bounded on I , so it suffices to bound  g (4) on I . It has the following form

≥ 4/3 the function  h(4) is

 g (4) (˜s) = a1 s˜ 2 j −4 + a2 s˜ 4 j −4 + a3 s˜ 6 j −4 .

(16)

Using equations (12) of Hermite interpolation  h(˜a) =  g (˜a),  h(b˜ ) =  g (b˜ ),  h (˜a) =  g  (˜a),  h (b˜ ) =  g  (b˜ ), we are able to calcu late the coefficients a1 , a2 , a3 of g explicitly and, substituting them into (16), we get

 g (4) (˜s) =

s˜ 2 j −4 2(˜a2 j − b˜ 2 j )3

  (˜a2 j − b˜ 2 j )˜a2 j a˜ 2 j (2b˜ 2 j − s˜ 2 j ) + (b˜ 2 j − s˜ 2 j )2 r  (˜a j )+

  +(˜a2 j − b˜ 2 j )b˜ 2 j a˜ 4 j + 2a˜ 2 j (b˜ 2 j − s˜ 2 j ) + s˜ 2 j (˜s2 j − b˜ 2 j ) r  (b˜ j )−   −˜a j a˜ 4 j (6b˜ 2 j − 3s˜ 2 j ) + a˜ 2 j (3b˜ 4 j − 3b˜ 2 j s˜ 2 j + s˜ 4 j ) + 3b˜ 2 j (b˜ 2 j − s˜ 2 j )2 r (˜a j )+

   +b˜ j 3a˜ 4 j (b˜ 2 j − 2s˜ 2 j ) + 3a˜ 6 j + 3a˜ 2 j (2b˜ 4 j − b˜ 2 j s˜ 2 j + s˜ 4 j ) + b˜ 2 j s˜ 2 j (˜s2 j − 3b˜ 2 j ) r (b˜ j ) .

(17)

We have to prove that this expression is bounded for a˜ ∈ [0, δ), b˜ ∈ (˜a, δ] and s˜ ∈ [˜a, b˜ ]. The only discontinuities (and therefore the places where  g (4) should be unbounded) can arise when (1) 4/3 ≤ j < 2 and s˜ → 0, (2) b˜ → a˜ .

118

E. Blažková, Z. Šír / Computer Aided Geometric Design 63 (2018) 109–121

Fig. 5. Left: Support function of the given curve (red) and its approximations using finite parts of the Puiseux series at the inflection point. Right: The corresponding primary curves.

In the first case, using inequality 0 ≤ a˜ ≤ s˜ , we have also a˜ → 0. In such a case

   1 ˜ −3 j 4 j −4  ˜ j 2 j ˜ 3 j    ˜ j   ˜ 2 j b s˜ b s˜ − b r b + 3b − s˜ 2 j r b˜ j 2

lim  g (4) (˜s) =

a˜ →0

          ≤ b˜ 4 j −4 r  b˜ j  + 2b˜ 3 j −4 r b˜ j  ,

which is bounded for j ≥ 4/3, b˜ ∈ (0, δ] and s˜ ∈ I . Specially also for 4/3 ≤ j < 2 and s˜ → 0. To treat the second case, let b˜ = a˜ + . The second case is equivalent to → 0. By substituting into (17), we get

 g (4) (˜a + ) =

a˜ −3 j s˜ 2 j −4  48

3a˜ j s˜ 4 j g  (˜a j ) − 3s˜ 4 j g (˜a j ) + a˜ 3 j s˜ 4 j g (3) (˜a j ) − 3a˜ 5 j s˜ 2 j g (3) (˜a j ) + 3a˜ 7 j g (3) (˜a j )+

+ 6a˜ 2 j s˜ 4 j g  (˜a j ) − 12a˜ 4 j s˜ 2 j g  (˜a j ) + 6a˜ 6 j g  (˜a j ) + 21a˜ 3 j s˜ 2 j g  (˜a j ) − 27a˜ 5 j g  (˜a j )+  ja˜ −3 j −1 s˜ 2 j −4   + 27a˜ 2 j s˜ 2 j g (˜a j ) + 27a˜ 4 j g (˜a j ) + − 3a˜ 2 j s˜ 2 j + 3a˜ 4 j + s˜ 4 j − 9a˜ j g  (˜a j ) + 9g (˜a j )+ 96  4 j (4 ) j 3 j (3 ) j 2 j  j + a˜ g (˜a ) + 6a˜ g (˜a ) − 3a˜ g (˜a ) + O( 2 ). As in the case a˜ → 0 we treated above, we can assume that there exists ε > 0 such that a˜ > ε and therefore also s˜ > ε and  g (4) is bounded. g (4) (˜s) is bounded and elsewhere it is continuous, so g˜ (4) (˜s) is bounded on the whole interval In both cases (1) and (2),  I and the lemma is proved. 2 4. Algorithm and examples In this section we form the theoretical results of the previous section into an approximation algorithm. We will also demonstrate it on the parametric curve of Example 2.4. Example 4.1. The support function of the curve (6) has a rational Puiseux series (given by Proposition 2.5): We get

s=

1 3

+ r2,

h=

1 2

9

6

5

5

− r2 +



3 5

r3 −

63 100

r 4 + O (r 5 ).

(18)

To obtain an inflection, we need at least the first three terms of the expansion. We denote h i the support function involving only terms of degrees of at most i. Their graphs are in Fig. 5, left. The corresponding primary curves c i (obtained using the envelope formula) are in the same figure on the right. To formulate an algorithm and examples following Section 3, assume that we have a parametric curve segment c(t ), t ∈ [ A , B ] which does not contain any inflection points in the interior. We naturally obtain such a curve segment as the output of an algorithm computing the topological structure of algebraic curves, such as Blažková and Šír (2014a, 2014b). We provide a G 1 Hermite interpolation on this segment.

E. Blažková, Z. Šír / Computer Aided Geometric Design 63 (2018) 109–121

119

Table 1 Errors for G 1 Hermite interpolation on the regular curve segment c(t ), t ∈ [1/2, 1]. Support function from G1 (p = 1, q = 3) n

error

1 2 4 8 16 32 64 128 256 512 1024

7.35064 · 10−2 5.39909 · 10−3 3.52580 · 10−4 2.20019 · 10−5 1.38914 · 10−6 8.70391 · 10−8 5.44331 · 10−9 3.40238 · 10−10 2.12650 · 10−11 1.32908 · 10−12 8.30674 · 10−14

Support function from G2 improve

n

error

improve

13.6146 15.3131 16.0250 15.8385 15.9600 15.9901 15.9985 15.9999 15.9998 16.0000

1 2 4 8 16 32 64 128 256 512 1024

3.43811 · 10−2 2.14616 · 10−3 1.42697 · 10−4 8.93366 · 10−6 5.60192 · 10−7 3.50252 · 10−8 2.18938 · 10−9 1.36844 · 10−10 8.55286 · 10−12 5.34555 · 10−13 3.34097 · 10−14

16.0198 15.0400 15.9729 15.9475 15.9940 15.9978 15.9991 15.9998 15.9999 16.0000

In the case of base G1 , we have to fix p , q and are then seeking an interpolant having the support function

g (φ) = v x sin φ + v y cos φ + s sin

p q

φ + c cos

p q

φ.

First, for A , B, we determine normal vectors n A , n B , which correspond to angles φ A , φ B , i.e. n A = n(φ A ), n B = n(φ B ). The Hermite interpolation thus reduces to solving the linear system in variables v x , v y , s, c ∈ R:  ⊥ g (φ A ) = n A · A , g (φ B ) = n B · B , g  (φ A ) = n⊥ A · A , g (φ B ) = n B · B .

(19)

If 0 < φ B − φ A < min(π , ba π ), the system has a unique solution and the normal of the interpolant runs the interval (φ A , φ B ). The details are described in Šír et al. (2010). Similarly in the case of G2 , we are seeking coefficients of the polynomial support function g (s) = a0 + a1 s + a2 s2 + a3 s3 such that  ⊥ g (s A ) = n A · A , g (s B ) = n B · B , g  (s A ) = n⊥ A · A , g (s B ) = n B · B .

(20)

If the obtained interpolant has too big an error, we subdivide the segment and consider the approximating spline instead. B If the segment is regular, we add a splitting point c( A + ). If one endpoint (without loss of generality c( A )) is an inflection 2

point, we have to fix j ≥ 4/3 and add the splitting point c( A + B −j A ). 2 If the error is still too big, we can divide the segment into more parts. In the general step k, the approximating   i ( B − A ) , i = 1, . . . 2k in the case of a regular segment and 2k  ( B − A ) , i = 1, . . . 2k in the case of a c( A ) inflection point.

spline will have 2k parts, and it is split at points c A +

c

A+

 j i 2k

Due to Propositions 3.6 and 3.7, in both cases, the interpolation error descends as O (2−4k ) and, after a finite number of steps, we reach any given quality. Example 4.2. Let us again use the parametric curve (6) having an inflection at c(0) = [−1/2, 1], shown in Fig. 3. We first perform the G 1 Hermite interpolation on the segment t ∈ [1/2, 1], which is completely regular. We implement the interpolation by the support function from G1 for p = 1, q = 3 as well as from G2 . The errors depending on the number of parts n are in Table 1. The third column gives the ratio of the previous and new errors. We see that it tends to 16 = 24 , indicating the approximation order 4. Next, let us do the same for the segment of c(t ) for t ∈ [0, 1/2], i.e. the segment with one inflection point. Without adapting the subdivision, we get only the approximation order 3, which confirms the results of Bastl et al. (2013), Šír et al. (2010), see Table 2. Finally, we do the same for an adapted subdivision for fixed j = 4/3. The results confirm the (best possible) approximation order 4, see Table 3. Eventually, let us consider the segment of c(t ) for t ∈ [−0.9, 0.8] which contains the inflection as an interior point. Dividing this interval uniformly into an even number of parts will always keep the inflection as an interior point of one of the intervals. The corresponding spline contains a cusp which does not disappear even in the case of a high number of spline parts. This ill-conditioned behavior may, in fact, in some cases even lead to an augmentation of the error as shown in Fig. 6 where the Hausdorff distance of the approximating spline and the original curve is equal to 0.1643 for n = 4 and to 0.6686 for n = 8. This example stress the importance of a proper handling of inflections in the dual approximation. 5. Conclusion We have analyzed the behavior of the support function in the neighborhood of a curve inflection. This analysis led us in particular to design an interpolation scheme which has the same approximation order 4 both at inflection and noninflection

120

E. Blažková, Z. Šír / Computer Aided Geometric Design 63 (2018) 109–121

Table 2 Errors for G 1 Hermite interpolation on the curve segment containing inflection c(t ), t ∈ [0, 1/2], subdivided uniformly. Support function from G1 (p = 1, q = 3) n

error

1 2 4 8 16 32 64 128 256 512 1024 2048

2.06742 · 10−2 2.34218 · 10−3 2.41869 · 10−4 2.50397 · 10−5 2.93218 · 10−6 3.54975 · 10−7 4.36752 · 10−8 5.41664 · 10−9 6.74432 · 10−10 8.41393 · 10−11 1.05071 · 10−11 1.31275 · 10−12

Support function from G2 improve

n

error

improve

8.82690 9.68368 9.65943 8.53961 8.26025 8.12760 8.06315 8.03141 8.01567 8.00782 8.00391

1 2 4 8 16 32 64 128 256 512 1024 2048

1.75600 · 10−2 2.51863 · 10−3 2.32844 · 10−4 2.51388 · 10−5 2.93471 · 10−6 3.55065 · 10−7 4.36787 · 10−8 5.41676 · 10−9 6.74433 · 10−10 8.41386 · 10−11 1.05070 · 10−11 1.31273 · 10−12

6.97205 10.8168 9.26235 8.56601 8.26528 8.12903 8.06361 8.03158 8.01573 8.00785 8.00392

Table 3 Errors for G 1 Hermite interpolation on the curve segment containing inflection c(t ), t ∈ [0, 1/2], subdivided nonuniformly, j = 4/3. Support function from G1 (p = 1, q = 3) n

error

1 2 4 8 16 32 64 128 256 512 1024 2048

2.0674 · 10−2 4.04023 · 10−3 5.58532 · 10−4 5.04553 · 10−5 3.63883 · 10−6 2.41407 · 10−7 1.55035 · 10−8 9.81510 · 10−10 6.17290 · 10−11 3.86997 · 10−12 2.42243 · 10−13 1.51518 · 10−14

Support function from G2 improve

n

error

improve

5.11709 7.23366 11.0698 13.8658 15.0734 15.5711 15.7956 15.9003 15.9508 15.9755 15.9878

1 2 4 8 16 32 64 128 256 512 1024 2048

1.75600 · 10−2 1.71363 · 10−3 2.33469 · 10−4 2.31334 · 10−5 1.42685 · 10−6 9.49301 · 10−8 6.00738 · 10−9 3.76075 · 10−10 2.35059 · 10−11 1.46940 · 10−12 9.18398 · 10−14 5.74000 · 10−15

10.2473 7.33988 10.0923 16.2129 15.0306 15.8022 15.9739 15.9991 15.9969 15.9996 16.0000

Fig. 6. The approximating splines obtained if the inflection is not a splitting point. Cusps occur both in the case of 4 parts (left) and in the case of 8 parts (right).

points. Using this scheme, we are able to convert any curve into a curve with rational offsets with high precision. The rational Puiseux expansions can be used, in particular, for higher degree Hermite interpolations. Our preliminary tests confirmed that for the G 2 case the approximation order 6 can be obtained, even at the inflection points, if a suitable nonuniform subdivision scheme is used. We plan to investigate this question in the future as well as to study the support function of surfaces at their parabolic lines.

E. Blažková, Z. Šír / Computer Aided Geometric Design 63 (2018) 109–121

121

Acknowledgements This work was supported by the project number 17-01171S of the Czech Science Foundation. Eva Blažková was supported by grant of Charles University Grant Agency SVV-2017-260456. References Aigner, M., Gonzalez-Vega, L., Jüttler, B., Sampoli, M.L., 2009b. Computing isophotes on free-form surfaces based on support function approximation. In: The Mathematics of Surfaces. In: LNCS, vol. 5654, pp. 1–18. Aigner, M., Jüttler, B., Gonzalez-Vega, L., Schicho, J., 2009a. Parametrizing surfaces with certain special support functions, including offsets of quadrics and rationally supported surfaces. J. Symb. Comput. 44, 180–191. Bastl, B., Láviˇcka, M., Šír, Z., 2012. G 2 Hermite interpolation with curves represented by multi-valued trigonometric support functions. In: MMCS 2012. In: LNCS, vol. 6920, pp. 142–156. Bastl, B., Slabá, K., Byrtus, M., 2013. Planar C 1 Hermite interpolation with uniform and non-uniform TC-biarcs. Comput. Aided Geom. Des. 30, 58–77. Blažková, E., Šír, Z., 2014a. Exploiting the implicit support function for a topologically accurate approximation of algebraic curves. In: MMCS 2012. In: LNCS, vol. 6920, pp. 49–67. Blažková, E., Šír, Z., 2014b. Identifying and approximating monotonous segments of algebraic curves using support function representation. Comput. Aided Geom. Des. 31, 358–372. Gravesen, J., 2007. Surfaces parametrised by the normals. Computing 79, 175–183. Gravesen, J., Jüttler, B., Šír, Z., 1993. On rationally supported surfaces. Comput. Aided Geom. Des. 5, 320–331. Gravesen, J., Jüttler, B., Šír, Z., 2007. Approximating offsets of surfaces by using the support function representation. In: ECMI 2006. In: Mathematics in Industry, vol. 12, pp. 719–723. Gruber, P.M., Wills, J.M., 1993. Handbook of Convex Geometry. North-Holland, Amsterdam. Láviˇcka, M., Bastl, B., Šír, Z., 2010. Reparameterization of curves and surfaces with respect to convolutions. In: MMCS 2008. In: LNCS, vol. 5862, pp. 285–298. Meek, D.S., Walton, D.J., 1997. Geometric Hermite interpolation with Tschirnhausen cubics. J. Comput. Appl. Math. 81, 299–309. Phillips, G.M., 2006. Interpolation and Approximation by Polynomials. Springer, Science and Business Media. Sabin, M., 1974. A Class of Surfaces Closed under Five Important Geometric Operations. Technical Report VTO/MS/207. British Aircraft Corporation. Available at http://www.damtp.cam.ac.uk/user/na/people/Malcolm/vtoms/vtos.html. Šír, Z., Bastl, B., Láviˇcka, M., 2010. Hermite interpolation by hypocycloids and epicycloids with rational offsets. Comput. Aided Geom. Des. 27, 405–417. Šír, Z., Gravesen, J., Jüttler, B., 2008. Curves and surfaces represented by polynomial support functions. Theor. Comput. Sci. 392, 141–157.