Applying Rational Envelope curves for skinning purposes

Special curves in the Minkowski space such as Minkowski Pythagorean hodographs play an important role in Computer Aided Geometric Design, and their usages have been thoroughly studied in the recent years. Also, several papers have been published which describe methods for interpolating Hermite data in R2,1 by MPH curves. Bizzarri et al.introduced the class of RE curves and presented an interpolation method for G1 Hermite data, where the resulting RE curve yields a rational boundary for the represented domain. We now propose a new application area for RE curves: skinning of a discrete set of input circles. We find the appropriate Hermite data to interpolate so that the obtained rational envelope curves touch each circle at previously defined points of contact. This way we overcome the problematic scenarios when the location of the touching points would not be appropriate for skinning purposes.


Introduction
Medial Axis Transform (MAT) is a widely studied area both in computer graphics and in image processing. For a given planar domain, the Medial Axis (MA) is the locus of the centers of the maximal inscribed disks, and the MAT can be obtained by lifting the MA into the space by the radii of the inscribed disks. Once we obtain the MAT of a domain, we can reconstruct the boundary of the domain by using the well-known envelope formula by [2,3]. Curves in the Minkowski space are suitable to describe MATs, however, only special curves describe domains whose boundaries are rational. It was shown by [4] that Minkowski Pythagorean curves are such, and the yielded envelope curves are not only rational but Pythagorean hodograph curves, thus, their offsets are rational as well.
Nowadays, several Hermite interpolation methods have been published using MPH curves so that the resulting envelope is rational ( [5,6,7,8,9,10]). In 2016, [1] showed that a broader class of curves exists in R 2,1 that yield rational boundaries: the so-called Rational Envelope (RE) curves. Thus, if only the rationality of the envelope is required, one can rely on RE curves (which are simpler to compute), while one has to restrict oneself to MPH curves only if the rationality of the offsets are needed as well. The authors described a G 1 interpolation method to construct an RE interpolant, which can be used to create rational blending surfaces between canal surfaces. Now let us introduce a quite different area in Computer Aided Geometric Design: skinning. Standard point-based curve and surface modeling has always played an important role in CAGD, but there has been a growing interest in curve and surface modeling based on different objects, such as circles and spheres. Skinning has become known as constructing a pair of at least G 1 continuous splines for a predefined sequence of circles which touch each circle at one point. The idea can also be extended to 3D, leading to the skinning of an input set of spheres. In recent years, several skinning methods have been published, such as [11,12,13,14].
From the outlook, skinning and boundary reconstruction are somehow similar, but it is important to note that the problem settings are fundamentally different. In skinning, we cannot talk about the reconstruction of the boundary, since there is no initial domain assumed at all. Despite this fact, based on the similarities of the two es, we propose to approach skinning from an aspect of MAT and use the yielded rational envelopes.
In this paper, we introduce how we apply the MPH/RE interpolation method proposed by [1] for the aim of skinning, and we show a geometric construction for appropriately choosing the Hermite input data. We approach it in a somehow inverse way: instead of having the tangent vectors as input, we fix the location of the touching points, from which we then calculate the tangent vectors. In Section 2, we overview the two methods that stand as a basis for our work. Then, in Section 3 we introduce our novel approach to use RE curves as skinning, and we show some examples as well. Finally, Section 4 concludes our results.

Motivation and related work
Firstly, let us consider the parametric curve y(t) = (y(t), r(t)) as the MAT of a domain. Then the boundary (envelope) of the domain can be reconstructed using the envelope formula ( [2,3]): Now let us overview the G 1 Hermite interpolation method proposed by [1], since we will use this RE curve construction method for skinning approach. In the second part of this section, we examine the standard skinning method of [11].

G 1 Hermite interpolation yielding rational envelopes
Given two points and two vectors as the input Hermite data to interpolate, let P 0 and P 1 note the end points, and let t 0 and t 1 note the end tangent vectors. Let us mark projection as n = (n x , n y ) if n = (n x , n y , n z ) and n ∈ R 2,1 . Let us mark rotation as n ⊥ = (n y , −n x ) if n = (n x , n y ) and n ∈ R 2 .
By directly applying the envelope formula 1, we can get the touching points Q ± i (i ∈ {0, 1}) of the corresponding envelope curve as: The construction relies only on one branch, and we define the touching point Q i as Q + i . We then define appropriate tangent vectors: Once we obtain Q i and v i , we construct the planar curve x(t), t ∈ [0, 1] that interpolates Q i and v i , for example with Hermite interpolation.
The final step is to construct the medial axis y(t) as a one-sided offset of x(t) with varying distance: To assure that the resulting curve interpolates the initial input data P i and t i , f (t) : [0, 1] → R has to be constructed as a polynomial function with the following boundary conditions (i ∈ {0, 1}): Figure 1: Construction of the RE curve y(t) which interpolates the input data P i and t i (i ∈ {0, 1}) with G 1 continuity, using the method of [1].
By lifting the medial axis back to the space, the final form of the interpolant is: The resulting y(t) is a so-called RE curve, a curve yielding rational envelope. For the construction, see Fig. 1. The authors in [1] prove that the envelope is indeed rational. Moreover, if x(t) is a PH curve, then y(t) is an MPH curve, and the offsets of the envelope are rational as well.

Skinning of circles
As mentioned in Section 1, skinning is a technique used in Computer Aided Geometric Design for modeling. Now let us introduce the skinning method of [11]. Given an ordered set of circles, skinning is the construction of two G 1 continuous curves touching each of the given circles at one point separately. One of the most important steps is the localization of the touching points (see Fig. 2). The touching points for the first and last circles are determined by the two common outer tangents of the circles, and for the other circles, circle triplets are considered. For each triplet, we find two special solutions to the problem of Apollonius, by which we can define the touching points for the middle circle. Once we determine the points of contact, then they are separated into two groups for the "left" and for the "right" skin. Finally, Hermite interpolation curves are constructed between every two neighboring circles, for which the tangent lengths are computed with the help of the radical lines of the circle pairs. The resulting G 1 continuous splines are called the skins of the circle set.
The algorithm generally provides good results for various input sets, and the skins respond dynamically when the user modifies the positions or the radii of the circles during modeling. Since the touching points are derived from the solution to the problem of Apollonius, it also guarantees that they never lie inside any of the neighboring circles. For an example, see Fig. 3.

Applying MPH/RE curves for skinning
In this section, we propose a new application area for MPH/RE curves: skinning discrete sets of circles. As the problem setting of skinning is to find the bounding curves for an admissible set of predefined circles, we can define the appropriate input set of circles as in [14]. Definition 1. Given an ordered set of circles C = {c 1 , c 2 , . . . , c n } , n ∈ N, and the corresponding disks D = {d 1 , d 2 , . . . , d n }, C is an admissible configuration for skinning, if it satisfies the following conditions (see Fig. 4): • To attain a rational envelope for an admissible sequence of circles C-by applying the RE interpolation method of [1]-for each circle pair we need to construct the input data for the interpolation.
Using cyclographic mapping, we can map the circles to points in R 2,1 , so that we obtain a sequence of points P = {P 1 , P 2 , . . . , P n }, where for each circle c i -with center O i (O ix , O iy ) and radius r i -the corresponding spatial point is P i = (O ix , O iy , r i ). However, since we do not have any additional information about the circles, there are no initial tangent vectors provided.
We may define the vectors using e.g., the Catmull-Rom spline interpolation, so that each t i tangent vector is defined as t i = λ · (P i+1 − P i−1 ), (i ∈ [2, n − 1], λ ∈ R + ). For the first and last ones, the vectors are defined as t 1 = λ · (P 2 − P 1 ) and t n = λ · (P n − P n−1 ). Then, by using Formula 2 we calculate the positions of the touching points, and by constructing the y RE curve (see Formula 5), we obtain the envelope. Generally this provides adequate output, however, in the case of intersecting circles, the resulting touching point can get inside the neighboring circle, and thus, the envelope can cut into the circles. As an example, refer to Fig. 5.
To resolve this problem, we can approach from an inverse aspect. As we could see in Section 2, the method of [11] localizes the touching points by solving the problem of Apollonius, which guarantees that the points never lie inside any Figure 5: By using seemingly appropriate tangent vectors that are chosen freely, we can observe that the touching points can get inside the circles.
of the neighboring circles. Our idea is to localize the touching points at first, and then reconstruct that tangent vector with which we would obtain exactly these points.

Reconstructing tangent vectors
Regarding every circle c i in C, let us fix two points on the circle which we want to use later as the touching points of the envelope. Let us mark these points as W + i and W − i . The aim is to determine that tangent vector for which we get W ± i = Q ± i using the Formula 2. It is known that the envelope formula describes a geometric construction ( [15,16]), and [17] also presented different ways to obtain touching points for skinning, one of which was using this geometrical approach to create the corresponding touching points. We used this as an inspiration to reconstruct the tangent vector t i from the touching points.
Let W − i and W + i note the left and right touching points on c i as shown in Fig. 2, and we aim to construct S i , the endpoint of the desired tangent vector.
Once S i is obtained, the direction of the tangent vector t i still has to be defined. Let us construct the vector v + i by rotating the vector W + i − P i counterclockwise by π 2 , and let u i be defined as S i − P i . Since we would like the tangent vector t i to point towards the next circle, we can choose between the two directions by measuring the angle between v + i and u i , and we can define t i as follows: To see the geometric construction of t i , we refer the reader to Fig. 6. Since our construction is exactly the inverse of the standard geometric construction of the envelope points, it is trivial that once we define t i this way, the obtained Q + i and Q − i points using Formula 2 are the same as W + i and W − i . Also, it is important to note that choosing the tangent vector this way assures that t i is always space-like.

Constructing the envelope curves
We have seen that the RE method defined by [1] uses the α i values in Formula 3 as free parameters which essentially affect the shape of the resulting envelope, as y(t) is constructed from the planar curve x(t). Since now we use the touching points of [11], it is natural to choose the tangent length the authors suggested. Let l i denote the radical line of c i and c i+1 . To assure an aesthetically more satisfying result, for each neighboring circle pair, the starting and ending tangent lengths will be different. Thus for the circle pair c i and c i+1 , the corresponding tangent vectors v i and v i+1 for the touching point are defined as follows: where Q j = Q + j = W + j . The α j values can be determined using the perpendicular distance: To define the medial axis, we only need to follow the remaining steps of the algorithm in [1]. After having x(t) defined as a rational planar curve interpolating Q i , Q i+1 , v i , and v i+1 (with e.g., Hermite arc), we construct the polynomial function f with the boundary conditions (Formula 4), and we obtain the final RE curve in the form of Formula 5. The resulting y is an RE curve, for which by applying Formula 1, the resulting envelope curves are rational. Fig. 7 shows our results using the inverted calculation to define the Hermite input data, so that the resulting touching points of the envelope are always adequate for the purpose of skinning. [1] proved that if we construct x(t) as a PH curve, not only the envelope is rational, but its offsets as well. Fig. 8 shows such a scenario: the resulting offsets are rational too.

Conclusions
RE curves were introduced by [1], and they presented an interpolation method which can be used to create rational surface blends for canal surfaces. In this paper, we propose a new application for RE curves: skinning a discrete set of circles. If we aim to apply the algorithm to obtain the envelope bounding a Figure 8: MPH curve used for skinning with our inverse calculation approach. Not only the envelope curves are rational, but the offsets too. discrete set of circles, we face a serious obstacle: even though the circles can be regarded as spatial points using cyclographic mapping, there is no kind of information for the tangent vectors that should be used for the interpolation. Obviously, the shape of the envelope fundamentally depends on the chosen tangent vectors. Even by choosing a seemingly suitable method (e.g., the Catmull-Rom interpolation) to define these vectors, we can see that the resulting touching points and the shape of the envelope is sometimes problematic. When two circles intersect, the touching points of the circle can lie inside other circles. To resolve this problem, we offer an inverted approach: we predefine the positions of the touching points (with the method of [11]), and then we calculate which is the appropriate tangent vector that would provide these points as touching points. We also fix the free parameters in the method of [1] by giving an exact calculation, which also greatly affects the shape of the envelope. This way our method does not need a numerical optimization afterwards to generate a good output.
To sum up, we offer a new application for RE curves: skinning a discrete set of circles which provides a rational envelope (and can be constructed so that the offsets are rational as well). We give an exact solution, thus, we guarantee that there exists only one envelope for a user-defined circle sequence. With our method, we solve the problem when the touching points of a circle could get inside the neighboring circles. As a future work, we plan to extend our algorithm to 3D to provide another application for RE curves: skinning a discrete set of spheres.