1. Introduction
Spirals are curves with single-signed, monotonically increasing or decreasing curvatures. A planar curve is believed to be fair and attractive if its curvature plot has few monotonically increasing curvature sections [
1].
The benefit of using spiral segments in the design of fair curves, particularly revolution and swept surfaces, is being able to mill an arbitrary surface, that is, controlling unwanted flat spots and undulations [
2]. Given the spiral nature of a clothoid, it is often used as a transition curve among circles, straight lines, or circles and straight lines in highway designs and railway routes [
3,
4,
5,
6], mobile robot trajectories [
7] and other modern manufacturing applications (see [
2,
8] and references therein).
Two provided endpoints and two unit tangent vectors are the
-dimensional Hermite data components. In [
9,
10], hodographs can match
data, but higher-order polynomials are required compared with standard polynomial interpolations. Log-aesthetic curves are general curves with many appealing properties. They are costly to be computed [
11,
12]. Clothoids are given by matching any
Hermite data with one segment [
13], but one nonlinear equation should be solved. Various spiral types have been used for interpolating
Hermite data [
2,
14,
15,
16,
17,
18,
19]. They connect all
data but have no control on the curvatures.
Two provided endpoints, two unit tangent vectors and two signed curvatures are the
-dimensional Hermite data components. The C-shaped data of
Hermite type can be interpolated using a C-shaped curve.
Hermite data are spiral
Hermite data for which only interpolation by a spiral is possible [
20]. Hodographs can match
data with a polynomial of degree seven, which is good for offset properties [
9,
10]. Biarcs cannot match arbitrary
data with single arcs, so more than three arcs are required and jumps are observed in curvatures. Clothoids can match arbitrary
data with three arcs and have continuous curvatures, but a
nonlinear system must be solved [
21]. An efficient algorithm for the computation of a
interpolating clothoid spline was presented in [
22]. Among the nine various targets/problems considered, the problems were solved with a couple of Newton iterations, whereas complex minimizations were solved with a few iterations of a nonlinear solver. Ref. [
23] presented a C++ library with a MATLAB interface for computing clothoid curves and related algorithms.
Some existing studies match
Hermite data by piecewise spirals or design
curves with spiral segments. Ref. [
24] described an extension to the additional case of the technique of drawing with a Bézier spiral segment that matches the position, tangent and curvature of the end of another segment. In the design field, ref. [
25] proposed a new interactive
and
Hermite interpolation method with a secondary minor boundary condition. In this novel approach, coupled log-aesthetic curve segments, which may include inflection points (S-shaped curve) or cusps, were computed. Ref. [
26] outlined two
Hermite interpolation situations, which could be solved with a pair of rational spiral segments. The first involved building C-shaped spiral segments that connected two consecutive zero curvature points, whereas the second involved joining two spiral segments between two points with given tangents and curvatures of opposite sign. Ref. [
27] demonstrated how quadratic rational Bézier curve segments with monotone curvatures could be used to design curvature continuous curves. Choosing low-order polynomials for representing curvature radius functions, ref. [
28] described a planar
Hermite data interpolation by a pair of smooth-connected integral curves, but it was not guaranteed that a positive solution would always be present.
Due to the requirement of achieving
continuity at the joints of neighboring spiral segments [
29], various spirals types have been used for
Hermite data interpolation [
29,
30,
31,
32,
33,
34,
35]. Following the Kneser theorem in [
20], with an appropriate method to choose the free parameters of biarcs, a planar spiral can be approximated by a spiral arc spline [
34]. Ref. [
36] presented a biarc-based subdivision scheme that could match any C-shaped spiral
Hermite data by a spiral segment, including the case where the curvature at one end was zero.
piecewise rational PH spirals are constructed by interpolating
Hermite data associated with two nonconcentric circles, one inside the other [
37]. Ref. [
38] presented a Hermite interpolation scheme for boundary data and arc length constraints using PH curves of degree seven. In this way, the solutions of the continuity equations could be derived in a closed form, depending on four free parameters. To achieve a
Hermite interpolation with a low degree curve, ref. [
39] studied planar
Hermite interpolation using a quintic Bézier curve.
Regarding matching arbitrary
Hermite data by piecewise spirals, existing methods either use special segmented spirals to design curves or cannot guarantee the solution existence. That is, they can only interpolate special
Hermite data and cannot process general data. Through the biarc-based subdivision scheme, ref. [
36] generated a planar spiral matching an arbitrary set of given spiral
Hermite data. On the basis of the subdivision scheme proposed in [
36], we present a geometric method for matching arbitrary C-shaped
Hermite data by at most three piecewise spirals. The basic idea is to intersect one or two new points with their tangents and curvatures, dividing the data into two or three spiral data sets with
continuity. The new data are then matched with two or three piecewise spiral segments using the method proposed in [
36]. The conclusions are given in the form of algorithms, which are simple and effective, have obvious geometric significance and do not require solving equations.
In this study, the curvatures of a spiral segment are always assumed to be positive. The rest of this paper is organized as follows: the backgrounds of the external homothetic centers of two circles are introduced in
Section 2. The spiral
Hermite data and some theoretical background are also briefly discussed. Matching nonspiral data by piecewise spirals is presented in
Section 3. A few experimental examples are provided in
Section 4 to illustrate the suggested techniques. Concluding observations and future work suggestions are covered in
Section 5.
2. External Homothetic Centers of Two Circles and Spiral Hermite Data
2.1. External Homothetic Centers of Two Circles
A homothetic center is the meeting point of lines that connect corresponding points from homothetic figures [
40]. Radii are drawn parallel and in the same direction on two nonconcentric circles, then the line connecting the extremities of the radii passes through a fixed point on the line of centers, dividing that line externally in the ratio of the radii. This point is the external homothetic center called
C. If radii are drawn in opposite directions, rather than parallel, then the extremities of the radii pass through a fixed point on the line of centers, dividing that line internally in the ratio of the radii. This point is the internal homothetic center known as
.
In general,
C of the two separation circles is the meeting crossing point of the common external tangents of two circles, whereas
is the meeting crossing point of the common internal tangents of two circles (see
Figure 1a). The common tangent point
C of two internally tangent circles is only one, whereas the common tangent point
C of two containing circles is in the common region of two circles interior, that is,
C is inside both circles. When the two circles are moving closer to each other,
C is changed (see
Figure 1b–g).
C is also defined for two concentric circles, being their common center in that case (see
Figure 1g).
For convenience, we use the same coordinates to represent points and row vectors. If points , then is a vector and a ray, emanating from point P to point Q. Let vector , be also defined as a ray, emanating from point P in direction T. All rotating angles are obtained in a counterclockwise direction, and is defined as a vector obtained by a rotation T of angle . Here, the rotation matrix is . Moreover, results from rotating T with an angle . is defined as the length of vector T.
Let
and
be the centers of two circles, and
and
be their respective radii. Define unit vector
. Then, points
and
are on the circles
and
, respectively, and
is parallel to
. According to the definition of
C,
. Substituting
and
into
C, we have
, so
, and we obtain the following:
Equation (
1) denotes that if
, then
, and
C is located inside both circles; otherwise, if
and
, then
C is the point at infinity and is located outside both circles.
Lemma 1. Given circles and with radii and , respectively, C has different possibilities (see Figure 1): - (1)
If , then C is located inside both circles.
- (2)
If , then C is located on both circles.
- (3)
If , then C is located outside both circles.
2.2. Spiral Hermite Data
A planar Hermite data set means a pair of distinct points, A and B; a pair of unit tangent vectors, and at A and B, respectively; and the corresponding pair of curvatures, and (or curvature centers and ). The radii of the osculating circles at A and B are defined as and . Denote the angle rotating from to as , and the one from to . The data set can also be written as or . In this study, all angles and curvatures are assumed to be positive, and we only discuss C-shaped data, that is, .
In terms of universality, unit tangent vectors
and
can be denoted as follows:
For convenience, the shaded planar region bounded by
and two rays,
and
, is defined as
G (see
Figure 2). If
, then
G is an infinite region (see
Figure 2a), otherwise,
G is a triangle (see
Figure 2b). Define the cross product of vectors
and
by
. If the directed angle between two vectors is less than
, then their cross product is positive. Thus, we have the following:
Theorem 1. Given the region G of Hermite data defined in Figure 2, point Q is located in region G if and only if three numbers (i.e., , and are positive. To determine whether
Hermite data are spiral data, [
36] proposed the following lemma (see
Figure 3):
Lemma 2. For Hermite data with (resp., ), there exists a matching spiral if and only if (resp., )).
means
, and curvature circle
is contained in
. By Lemma 1 and the geometric property of
C, we obtain the following theorem result (see
Figure 3):
Theorem 2. For Hermite data , there exists a matching spiral if and only if C is in the overlapping region of region G and the small curvature circle interior.
Proof. Without loss of generality, let us assume that and denote the overlapping region of region G and small curvature circle interior as the shaded circular segment region.
Note that arc is a counterclockwise arc from X to Y.
By Lemma 1, there exists a spiral that corresponds to the given data with if and only if and . Thus, contains , and C is inside the interior. Suppose line intersects circles and at H and F, respectively, then ; ; and are the inscribed angles corresponding to circular arcs and , respectively. For convenience, we institute that the circular arc for the inscribed angle corresponds to the circular arc, that is, , .
- (1)
If
C is on the chord
, then
, thus
(see
Figure 4a).
- (2)
If
C is not on the chord
, then draw the line
that intersects circles
and
at
and
E, respectively (see
Figure 4b,c).
- (a)
If
C is in the shaded region (see
Figure 4b), then we have
thus
.
,
. Following the triangle angle properties,
, so
.
- (b)
If
C is outside the shaded region (see
Figure 4c), then we have
thus, we know
,
(i.e.,
),
, so
.
The above shows that the theorem is true. □
3. Matching Hermite Data by Piecewise Spirals
If
Hermite data
are spiral data, then a spiral segment can be obtained by the biarc-based subdivision scheme proposed in [
36]. Otherwise, they are nonspiral data. A natural solution is to insert an additional data set
, such that
and
are spiral data sets. Then, the subdivision method proposed by [
36] can be used to build piecewise spirals to interpolate the above two data groups, so that the given data can be interpolated with
continuous spirals.
For
Hermite data
, find the new data set inserted during the rotation of vector
counterclockwise to vector
; the inserted unit tangent vector
must be located at one of the positions. Determining that the rotation angle from vector
to vector
counterclockwise is
is easy. Let
be an arbitrary angle, then the possible new inserted tangent vector may be
. Therefore, we can draw a tangent of
parallel to
with tangent point
, and a tangent of
parallel to
with its tangent point
(see
Figure 5) to obtain the following:
Divide region G into two.
Definition 1. Ray divides the region G of Hermite data into two parts (see Figure 5a): the first one is bounded by and rays and , whereas the second one is bounded by rays and . Definition 2. Ray divides the region G of Hermite data into two parts (see Figure 5b): the first one is bounded by and rays and , whereas the second one is bounded by and rays , . Then, we have the following:
Theorem 3. For every tangent vector (), points and are given by (4).
- (1)
If there exists a data set , such that are curvature-decreasing spiral data, the new point N must be in the first part of and outside ; meanwhile, if there exists a data set such that are curvature-increasing spiral data, then the new point M must be in the second part of and inside (see Figure 5a). - (2)
If there exists a data set , such that are curvature-decreasing spiral data, the new point M must be in the first part of and outside ; meanwhile, if there exists a data set such that are curvature-increasing spiral data, then the new point N must be in the second part of and outside (see Figure 5b).
Proof. First, we prove (1). In
Figure 5a, let
be the angle between vectors
and
,
be the angle between vectors
and
,
be the angle between vectors
and
,
be the angle between vectors
and
,
be the angle between vector
and
and
be the angle between vectors
and
.
It holds that
, so
. Similarly,
for point
M in the second part of
. Therefore, if
are curvature-decreasing spiral data, then there exists
containing
, which means that
N should be outside
. Similarly, if there exists a data set
, such that
are curvature-increasing spiral data, then the new point
M must be in the second part of
and inside
(see
Figure 5a).
In
Figure 5b, let
be the angle between vectors
and
,
be the angle between vectors
and
,
be the angle between vectors
and
, and
be the angle between vectors
and
. The same can be proven that (2) is established. □
For every tangent vector
(
),
and
are computed by (4). When
, there must be an intersection
J of two rays
and
(see
Figure 6a).
Let angles
and
g as shown in
Figure 6a. According to osculation angle properties, we have
and
. We straightforwardly prove that
,
. Given that
and
, we have
, so that
. That is, rays
and
must intersect at the following point:
Here, . Point J has different positions according to different . According to these positions, we can insert one new point in different regions, so that the original data set can be divided into two spiral data sets. Unfortunately, a single new inserted point data set is sometimes insufficient to divide nonspiral data into two spiral data sets. As a result, two new point interpolations should be considered.
Theorem 4. For every tangent vector , the following possibilities regarding point J positions exist:
- (1)
J is located outside both circles, and : an admissible region is found. For every point N in the interior of the region, there exists a curvature circle containing and , so are curvature-decreasing spiral data, and are curvature-increasing spiral data (see Figure 6a,b). - (2)
J is located inside both circles, and : an admissible region is observed. For every point N in the interior of the region, there exists a curvature circle contained by and , so are curvature-increasing spiral data, and are curvature-decreasing spiral data (see Figure 6c–e). - (3)
Otherwise, for every point , no curvature circle exists, such that and are spiral data sets (see Figure 6f).
Proof. (1) If
J is located outside both circles and
,
J and
are on different sides of the tangent line of
at
, whereas
J and
are on different sides of the tangent line of
at
. Label the intersection point of
and the tangent of
at
as
, and the intersection point of
and the tangent of
at
as
,
If , then triangle region is the region where the new inserted point is allowed to exist; otherwise, the admissible region is the triangle . The region is in the first part of and in the second part of , so for every point N in the interior of the admissible region, connect and . Following Theorem 3, we have and .
The admissible region and , are on different sides of both tangent lines of at and those of at . That is, a curvature circle containing and exists for every point N in the interior of the region. Then, are spiral data with decreasing curvatures, and are spiral data with increasing curvatures.
(2) If J is located inside both circles and , then a region exists where four regions intersect: the second part of , the first part of and circle and ’s interiors. For every point N in the admissible region, connect and . Following Theorem 3, we have . That is, a curvature circle is contained in and . Then, are spiral data with increasing curvatures, and are spiral data with decreasing curvatures.
(3) Otherwise, a region where the following four regions intersect does not exist: the first part of , the second part of , outside and outside , that is, no , such that are curvature-decreasing spiral data, and are curvature-increasing spiral data. In addition, no region exists where the following four regions intersect: the second part of , the first part of , inside and inside , that is, no , such that are curvature-increasing spiral data, and are curvature-decreasing spiral data. □
We realize that the position of external homothetic center C is closely linked to the possibility that the given Hermite data can be split into two parts by inserting just one point. According to different C positions, we propose different methods to find the data set to be inserted.
3.1. C Is Outside Two End Curvature Circles
The two circles are separation circles, externally tangent circles or intersecting circles if
C is outside two end-curvature circles. Both circles share two externally tangent lines. Denoting the two pairs of common externally tangent points by
and
(see
Figure 7), we have
. Let the unit vector parallel to the vector
be
. Subsequently, we obtain the following equations:
and are the two most common externally tangent lines. If region G contains at least one pair of tangent points ( or ), then only one new point N must be inserted; otherwise, two points must be inserted.
3.1.1. One Pair of Tangent Points Are Located in Region G
When
and
are located inside region
G,
A is not on line
. Denote the rotating angle from
to vector
as
, and the rotating angle from
to vector
as
(see
Figure 7a). Then,
is different from
. Let
, then
and
. Compute
J. The following results hold regarding the position of
J.
When , circles and are on the same side of tangent at N. Evidently, J is located outside both circles, and . According to Theorem 4, the admissible region of the newly inserted point is the interior of triangle . Pick a point N in . For example, is a common choice.
Construct the perpendicular
to
at
N. Using the bisection method on the interval
, find a
d, such that the third circle
can include circles
and
, where
(see
Figure 7b).
Let , then the diameter of approaches ∞, and approaches a line. There exists at least a curvature circle , which can include circles and , so that and . Along with and , we deduce that are curvature-decreasing spiral data, and are curvature-increasing spiral data. is computed using the bisection method on the interval as follows:
- (a)
Find a large enough real number , such that the circle with contains circles and ;
- (b)
Compute and , for , until cannot contain circles and , then ;
- (c)
.
If
, then
J is located inside circles
and
. Two intersection points of
and
exist. Following Theorem 4, the admissible region is the curve quadrilateral interior
as illustrated in
Figure 6e, where
Data set exists, such that are curvature-increasing spiral data, and are curvature-decreasing spiral data. d can be computed by the bisection method on the interval and is contained by both circles and .
A simple geometric method (instead of the bisection method) can be used to find the radius of a circle that is inside and has tangent at the point N.
Proposition 1. If is the other intersection point of line with circle , and is the intersection point between line and perpendicular at N on , then the circle centered at (with radius ) has tangent at point N and is tangent to circle . In the same way, and can be found and the required circle (inside both circles) has the radius at least equal to the greater of and (see Figure 8). A similar construction can be used in other cases (e.g., when a circle has tangent at N and is contained inside and ).
The point-inserting algorithm is given as Algorithm 1.
Algorithm 1 Inserting one point when |
- Input:
Nonspiral Hermite data satisfying - Output:
. - 1:
Let , then , . Compute J by ( 5); - 2:
If , pick a point N in ; else, compute by ( 8) and pick a point N in ; - 3:
If , using the bisection method on the interval , compute d such that the third circle can include circles and ; else, by the bisection method on the interval , compute d such that the third circle can be contained in both circles; - 4:
.
|
3.1.2. At Most, One Tangent Point on Each Common Externally Tangent Line Is Located inside Region G
If one tangent point on each common externally tangent line exists in the region
G at most (see
Figure 6f), then
is different from
. Let
be an arbitrary angle. Suppose the possible new inserted tangent vector is
.
When
, following Theorem 4, if a curvature circle
containing
and
exists, then
and
are spiral data sets.
N must be outside circles
and
and in the first part of
and second part of
(yellow regions
and
in
Figure 6f). However, the intersection of
and
is always an empty set. On the other side, if a curvature circle
contained in
and
exists, then both
and
are spiral data sets.
N must be inside both circles and in the second part of
and first part of
(green regions
and
in
Figure 6f). Again, the intersection of regions
and
is the empty set.
The same is true when
(see
Figure 9a). Thus, inserting only one new data set
is difficult and impossible, such that
and
are spiral data sets. Inserting two points should be considered. We observe that by letting
,
, a unified method for finding the first inserted point can be obtained. When
, we always insert the first point
N inside
; otherwise, the first point
N is always inserted in
. The following theorem shows how to insert two points to divide the original data into three spiral data sets.
Theorem 5. If at most one tangent point on every common externally tangent line located in region G exists, then, let . Compute and by (4), J by (5) and and by (6). - (1)
If , for an arbitrary point N in the curve quadrilateral (as shown in Figure 9b) and contained in , then are curvature-increasing spiral data, whereas are nonspiral data that can be divided into two spiral data sets by Algorithm 1. Here, - (2)
If , for an arbitrary point N in the quadrilateral (as displayed in Figure 9c) and contained in , then are curvature-decreasing spiral data, whereas are nonspiral data that can be divided into two spiral data sets by Algorithm 1. Here,
Proof. If
, then
J is inside
and outside
. The admissible region
is located in
G, within
, and in the second part of
. As a result, for each point
N in the admissible region
, the associated curvature circle
contained in
can be found, and
are curvature-increasing spiral data. Meanwhile,
and
are separation circles, externally tangent circles, or intersecting circles; and
does not intersect
at B, that is, one pair of
and
common tangent points is located in region
G of data
. As mentioned in
Section 3.1.2,
are nonspiral data that can be divided into two spiral data sets using Algorithm 1. If
, then the theorem can be proven in the same way. □
Algorithm 2 is given when
or
.
Algorithm 2 Inserting two points when |
- Input:
Nonspiral Hermite data , (resp. ); there exists one tangent point at most on every common externally tangent line located in region G. - Output:
and . - 1:
Let ; - 2:
Compute , by ( 4), by ( 6), and by ( 9) (or by ( 10)); - 3:
When (resp., ), pick a point N inside region (resp., ); - 4:
Using the bisection method on the interval (resp., ), find a d such that the third circle can be included in circle (resp., ); - 5:
; - 6:
For (resp., ), compute by Algorithm 1.
|
3.2. C Is on or in Both End-Curvature Circles
If
C is on both curvature circles, then the two circles are internally tangent.
C is the only common tangent point of both circles. Let
be the common tangent,
When
, only one new point must be inserted (see
Figure 10). Otherwise,
(including
or
; see
Figure 11), and two new points must be inserted.
3.2.1. C Is on Both End-Curvature Circles and
Without loss of generality, suppose
, that is,
contains
(see
Figure 10). Denote
as the angle rotating from
to
. We have the following theorem.
Theorem 6. If , for an arbitrary newly inserted tangent vector , , then compute and by (4) and and by (6) (see Figure 10). - (1)
If , then . No new data set exists, such that and are spiral data sets (see Figure 10a). - (2)
If , for an arbitrary point N in curve triangle region (see Figure 10b), data set exists, such that are curvature-increasing spiral data, and are curvature-decreasing spiral data. - (3)
If , for an arbitrary point N in triangle region (see Figure 10c), data set is found, such that are curvature-decreasing spiral data, and are curvature-increasing spiral data.
Proof. (1) By Theorem 4,
J is on both circles, and the intersection region of the first part of
and second part of
is the empty set (yellow regions
and
of
Figure 10a). The intersection region of the second part of
and first part of
is also the empty set (green regions
and
). Therefore, adding just one new point is impossible.
(2) If
, then
J is inside both circles. According to Theorem 4, a curvature circle
contained in
and
for arbitrary point
N in region
exists.
are curvature-increasing spiral data, and
are curvature-decreasing spiral data. Here,
is the intersection of
and
(see
Figure 10b). In a similar way, (3) can be proven.
□
Usually,
. We provide Algorithm 3 from Theorem 6(3).
Algorithm 3 Inserting one point when (see Figure 10c) |
- Input:
Nonspiral Hermite data , ; ; . - Output:
. - 1:
Let . Compute by ( 4), J by ( 5) and by ( 6); - 2:
Pick a point N in region ; - 3:
Using the bisection method on the interval , find a d such that circle can contain circles and , then ;
|
3.2.2.
From the above section, we know that if
C is on or in both end-curvature circles and
(including
or
) (see
Figure 11a and
Figure 12a), for an arbitrary newly inserted tangent vector
,
, then no new data set
exists, such that both
and
are spiral data sets.
The case of inserting two points should be considered. As demonstrated in
Section 3.1.2, let
,
; in this way, a unified method for finding the first inserted point can be obtained. The framework is only suggested when
. Algorithm 4 provides instructions.
Theorem 7. Suppose . If , and C is on or in both end-curvature circles, then let ; compute and by (4), and by (6) and and by (10) (Figure 11b,c and Figure 12b). For an arbitrary point N in the curved triangle , data set exists, such that are curvature-decreasing spiral data, and are nonspiral data, which can be divided into two spiral data sets by Algorithm 1. Algorithm 4 Inserting two points when |
- Input:
Nonspiral Hermite data , ; ; (see Figure 11 and Figure 12). - Output:
, . - 1:
Let . Compute by ( 4), by ( 6) and by ( 10); - 2:
Pick a point N in region ; - 3:
Using the bisection method on the interval , find a d such that the third circle can be included in circle , then ; - 4:
For , compute by Algorithm 1.
|
Given any nonspiral C-shaped
Hermite data
, we can use the method in this section to insert one or two new data groups, so that the given data can be divided into two or three spiral
Hermite data groups. Subsequently, the subdivision method proposed by [
36] can be employed to build piecewise spirals, so that the given data can be interpolated with
continuous spirals. Refer to [
36] for further details on the subdivison algorithm. Algorithm 5 is used to create piecewise spirals that match any C-shaped
Hermite data
:
Algorithm 5 Matching arbitrary Hermite data by piecewise spirals |
Input: Hermite data with . Output: Piecewise spirals.
Procedure
- 1:
- 2:
ifthen - 3:
compute by ( 7); - 4:
- 5:
go to Algorithm 1; - 6:
else - 7:
go to Algorithm 2; - 8:
end if - 9:
else - 10:
if and ( Figure 10) then - 11:
go to Algorithm 3; - 12:
else - 13:
if then - 14:
go to Algorithm 4; - 15:
end if - 16:
end if - 17:
end if - 18:
Compute piecewise spirals matching new data sets by scheme in [ 36].
|
4. Examples
We present some examples of the proposed algorithms introduced in
Section 3. In all examples,
, and
Hermite data
are denoted as
. Initial points
A and
B are represented in black, whereas inserted points are represented in green. Initial tangent vectors are drawn with black line segments with arrows, and inserted tangent vectors are drawn in red. Piecewise spirals interpolating
data are represented by blue lines. To clearly illustrate the quality of interpolating spirals, we drew 65 curvature values for each spline and attached a clip curvature plot, so that the situation at joints could also be clearly evaluated. If curvature values were too high, then we sometimes used a simple scale for the effect (examples 1a–1d, 2a–2e).
In examples 1a–1f, two piecewise spirals interpolating nonspiral data are provided to show the performance of Algorithms 1 and 3 (see
Figure 13). In example 1b,
; in example 1c,
; in example 1f,
. In examples 1a and 1d,
; in example 1c,1e and 1f,
. In example 1d,
has a small value and
has a large one. Example 1g shows the curvature behaviors of examples 1a–1f. The curvature of example 1d is too large, so we illustrate the effect of 1d on a simple scale in
Figure 13g.
In examples 2a-2f, three piecewise spirals interpolating nonspiral data are given to illustrate Algorithms 2 and 4 (see
Figure 14). The following are some special examples:
for example 2e and
for examples 2d and 2f. Example 2g shows the curvature behaviors of examples 2a–2f. The inserted curvature of example 2b is too large, so we display the effect of 2b on a simple scale in
Figure 14g.
These examples illustrate that the curves are continuous. The presented algorithms may sometimes fail to obtain curves with smooth curvatures. Although the implementation effect may deviate from other algorithms in a few cases, the advantage of our algorithms is that for arbitrary Hermite data, we can use three piecewise spiral interpolations at most. Other existing methods either use segmented splines to design curves or cannot guarantee solutions. That is, only special Hermite data can be interpolated by spirals, but general data cannot be processed.