\beta-skeletons for a set of line segments in R^{2} This research is supported by the ESF EUROCORES program EUROGIGA, CRP VORONOI.

# β-skeletons for a set of line segments in R2††thanks: This research is supported by the ESF EUROCORES program EUROGIGA, CRP VORONOI.

Mirosław Kowaluk Institute of Informatics, University of Warsaw, Warsaw, Poland,
kowaluk@mimuw.edu.plgm248309@students.mimuw.edu.pl
Gabriela Majewska Institute of Informatics, University of Warsaw, Warsaw, Poland,
kowaluk@mimuw.edu.plgm248309@students.mimuw.edu.pl
###### Abstract

-skeletons are well-known neighborhood graphs for a set of points. We extend this notion to sets of line segments in the Euclidean plane and present algorithms computing such skeletons for the entire range of values. The main reason of such extension is the possibility to study -skeletons for points moving along given line segments. We show that relations between -skeletons for , -skeleton (Gabriel Graph), and the Delaunay triangulation for sets of points hold also for sets of segments. We present algorithms for computing circle-based and lune-based -skeletons. We describe an algorithm that for computes the -skeleton for a set of segments in the Euclidean plane in time in the circle-based case and in in the lune-based one, where the construction relies on the Delaunay triangulation for , is a functional inverse of Ackermann function and denotes the maximum possible length of a Davenport-Schinzel sequence. When , the -skeleton can be constructed in a time. In the special case of , which is a generalization of Gabriel Graph, the construction can be carried out in a time.

## 1 Introduction

-skeletons in belong to the family of proximity graphs, geometric graphs in which an edge between two vertices (points) exists if and only if they satisfy particular geometric requirements. In this paper we use the following definitions of the -skeletons for sets of points in the Euclidean space (-skeletons are also defined for but those cases have no significant influence on our considerations) :

###### Definition 1

For a given set of points in , a distance function and a parameter we define a graph

• – called a lune-based -skeleton [12] – as follows: two points are connected with an edge if and only if no point from belongs to the set (neighborhood) where:

1. for , is the intersection of two discs, each with radius and having the segment as a chord,

2. for , is the intersection of two discs, each with radius , whose centers are in points and in , respectively;

• – called a circle-based -skeleton [5] – as follows: two points are connected with an edge if and only if no point from belongs to the set (neighborhood) where:

1. for there is ,

2. for the set is a union of two discs, each with radius and having the segment as a chord.

Points are called generators of the neighborhood (, respectively). The neighborhood is called a lune. It follows from the definition that .

-skeletons are both important and popular because of many practical applications which span a spectrum of areas from geographic information systems to wireless ad hoc networks and machine learning. For example, they allow us to reconstruct a shape of a two-dimensional object from a given set of sample points and they are also helpful in finding the minimum weight triangulation of a point set.

Hurtado, Liotta and Meijer [9] presented an algorithm for the -skeleton when . Matula and Sokal [15] showed that the lune-based -skeleton (Gabriel Graph ) can be computed from the Delaunay triangulation in a linear time. Supowit [18] described how to construct the lune-based -skeleton (Relative Neighborhood Graph ) of a set of points in time. Jaromczyk and Kowaluk [10] showed how to construct the from the Delaunay triangulation for the metric in time. This result was further improved to time [14] for -skeletons where . For , the circle-based -skeletons can be constructed in time from the Delaunay triangulation with a simple test to filter edges of the [5]. On the other hand, so far the fastest algorithm for computing the lune-based -skeletons for runs in time [13].

Let us consider the case when we compute the -skeleton for a set of points where every point is allowed to move along a straight-line segment . Let . For each pair of segments containing points , respectively, we want to find such positions of points and that for any . We will attempt to solve this problem by defining a -skeleton for the set of line segments as follows.

###### Definition 2

(, respectively) is a graph with vertices such that there exists a bijection between the set of vertices and the set of segments , and for an edge exists if there are points and such that (, respectively).

Note that when segments degenerate to points, we have the standard -skeleton for a point set.

Geometric structures concerning a set of line segments, e.g. the Voronoi diagram [3, 16] or the straight skeleton [1] are well-studied in the literature.

Chew and Kedem [4] defined the Delaunay triangulation for line segments. Their definition was generalized by Brévilliers et al. [2].

However, -skeletons for a set of line segments were completely unexplored. This paper makes an initial effort to fill this gap.

The paper is organized as follows. In the next section we present some basic facts and we prove that the definition of -skeletons for a set of line segments preserves inclusions from the theorem of Kirkpatrick and Radke [12] formulated for a set of points. In Section 3 we show a general algorithm computing -skeletons for a set of line segments in Euclidean plane when . In Section 4 we present a similar algorithm for in both cases of lune-based and circle-based -skeletons. In Section 5 we consider an algorithm for Gabriel Graph. The last section contains open problems and conclusions.

## 2 Preliminaries

Let us consider a two-dimensional plane with the Euclidean metric and a distance function .

Let be a finite set of disjoint closed line segments in the plane. Elements of are called sites. A circle is tangent to a site if intersects the circle but not its interior. We assume that the sites of are in general position, i.e., no three segment endpoints are collinear and no circle is tangent to four sites.

The Delaunay triangulation for the set of line segments is defined as follows.

###### Definition 3

[2] The segment triangulation of is a partition of the convex hull of in disjoint sites, edges and faces such that:

• Every face of is an open triangle whose vertices belong to three distinct sites of and whose open edges do not intersect ,

• No face can be added without intersecting another one,

• The edges of are the (possibly two-dimensional) connected components of , where is the set of faces of .

The segment triangulation such that the interior of the circumcircle of each triangle does not intersect is called the segment Delaunay triangulation.

In this paper we will consider a planar graph (a planar multigraph, respectively) corresponding to the segment Delaunay triangulation and its relations with -skeletons. This graph has a linear number of edges and is dual to the Voronoi Diagram graph for . It is also possible to study properties of plane partitions generated by -skeletons for line segments. We will discuss this problem in the last section of this paper.

We can consider open (closed, respectively) neighborhoods that lead to open (closed, respectively) -skeletons. For example, the Gabriel Graph [7] is the closed -skeleton and the Relative Neighborhood Graph [19] is the open -skeleton.

Kirkpatrick and Radke [12] showed a following important inclusions connecting -skeletons for a set of points with the Delaunay triangulation of : , where .

We show that definitions of the -skeleton and the Delaunay triangulation for a set of line segments preserve those inclusions. We define as a -skeleton.

###### Theorem 2.1

Let us assume that line segments in are in general position and let (, respectively) denote the lune-based (circle-based, respectively) -skeleton for the set . For following inclusions hold true: (, respectively).

###### Proof

First we prove that . Let be such a pair of points that there exists a disc with diameter containing no points belonging to segments from inside of it. We transform under a homothety with respect to so that its image is tangent to in the point . Then we transform under a homothety with respect to so that its image is tangent to (see Figure 2). The disc lies inside of , i.e., it does not intersect segments from , and it is tangent to and , so the center of lies on the Voronoi Diagram edge. Hence, if the edge belongs to then it also belongs to .

The last inclusion is based on a fact that for and for any two points it is true that (see [12]).

The sequence of inclusions for circle-based -skeletons is a straightforward consequence of the fact that two different circles intersect in at most two points.

## 3 Algorithm for computing β-skeletons for 0<β<1

Let us consider a set of disjoint line segments in the Euclidean plane. First we show a few geometrical facts concerning -skeletons .

The following remark is a straightforward consequence of the inscribed angle theorem.

###### Remark 1

For a given parameter if is a point on the boundary of , different from and , then an angle has a constant measure which depends only on .

Let us consider a set of parametrized lines containing given segments. A line contains a segment and has a parametrization , where and are ends of the segment and .

Let respective points from segments and be generators of a lune and let an inscribed angle determining a lune for a given value of be equal to . The main idea of the algorithm is as follows. For any point we compute points for which there exists a point , where , such that , i.e., (see Figure 3). Then we analyze a union of pairs of neighborhoods generators for all . If this union contains all pairs of points , where and , then .

For a given and a segment we shoot rays from a point towards . Let us assume that a given ray intersects in a point for some value of . Let be the vector between points and . Then where coefficients for depend only on endpoints coordinates of segments and . The ray refracts in from in such a way that the angle between directions of incidence and refraction of the ray is equal to . The parametrized equation of the refracted ray is for (or for , respectively) where (, respectively) denotes a rotation matrix for a clockwise (counter-clockwise, respectively) angle . If refracted ray intersects line in a point (it is not always possible - see Figure 3) then we compare the -coordinates of and . As a result we obtain a function containing only parameters and : , where coefficients are fixed. Since -coordinates of and are also equal we obtain , where and are (at most quadratic) polynomials of variable and are fixed (the exact description of those polynomials and variables is much more complex than the description of the coefficients in the previous step and it is omitted here - see them in Appendix).

Let denote a value of the parameter of the intersection point of the line and the line containing the ray that starts in and refracts in creating an angle . Let , where is a set of values of such that the ray refracted in intersects . The function is a hyperbola and the function is a part of it (see Figure 3).

Note that for a given angle (, respectively) extreme points of the function (, respectively) do not have to belong to the set . We can find them by computing a derivative .

Then we can compute the corresponding values of the parameter . This way we obtain the pair such that the segment is a chord of a circle that is tangent to the analyzed segment in and (, respectively).

Let , i.e., this is a set of all such that points and generate a lune intersected by the analyzed segment . Let be a set of pairs of parameters such that the segment intersects a lune generated by points and . The set is an area limited by algebraic curves of degree at most . The curves match the values of the parameter corresponding to extreme points of (, respectively). In particular there are hyperbolas for angles and correlated with the rays refracted in the ends of the segment (for parameters and ) - see Figure 4.

###### Lemma 1

The edge belongs to the -skeleton if and only if
.

###### Proof

If then there exists a pair of parameters such that a lune generated by points and is not intersected by any segment , i.e., . The opposite implication can be proved in the same way.

###### Theorem 3.1

For the -skeleton can be found in time.

###### Proof

We analyze pairs of line segments. For each pair of segments we compute . For each we find a set of pairs of parameters such that . The arrangement of curves in total can be found in time [6]. Then the difference can be found in time (see Figure 11 in Appendix). Therefore we can verify which edges belong to in time.

## 4 Finding β-skeletons for 1≤β

Let us first consider the circle-based -skeletons. According to Theorem 2.1 for there are only edges which can belong to the -skeleton for a given set of line segments. We will use this property to compute -skeletons faster than in the previous section.

###### Lemma 2

For and the set of line segments the number of connected components of the set is O(n) for any pair .

###### Proof

According to Theorem by Kirkpatrick and Radke [12] for the following inclusion holds . Therefore any neighborhood for is included in some neighborhood for with the same pair of generators. On the other hand, for a given parameter and a given connected component of the set there exists a sufficiently big such that for the component contains only one point (we increase an arbitrary neighborhood corresponding to the connected component for a given ). Hence, the number of one point components (for all values of ) estimates the number of connected components for a given . But in this case at least one disc forming the neighborhood is tangent to two segments different than and or at least one generator of the neighborhood is at the end of or . In the first case the two segments tangent to the disc and segments are the the closest ones to the center of the disc. Therefore the complexity of the set of such components does not exceed the complexity of the -order Voronoi diagram for , i.e., it is [16]. In the second case there is a constant number of additional components.

###### Lemma 3

For any and there is at most one connected component of the set that contains points with the same coordinate.

###### Proof

Let the inscribed angle corresponding to be equal to . Let and (, respectively) be points such that the angle between (, respectively) and is equal to (for we have ), see Figure 5. Boundaries of all neighborhoods generated by and a point in contain either or . There exists the leftmost (rightmost, respectively) position (might be in infinity) of the second neighborhood generator with respect to the direction of . Between those positions no neighborhood intersects segments from . Hence, points corresponding to positions of such generators belong to the same connected component of .

The algorithm for computing circle-based -skeletons for is almost the same as the algorithm for .

###### Theorem 4.1

For the circle-based -skeleton can be found in time.

###### Proof

Due to Theorem 2.1 we have to analyze edges of . For and for the given segments each set can be divided in two sets with respect to the variable . For each the first set contains part of that is unbound from above with respect to and the second one contains part of unbound from below. The part that contains pairs such that the set of values of is can be divided arbitrarily. We use Hershberger’s algorithm [8] to compute unions of sets for in each group separately. Then, according to Lemma 3 we find an intersection of complements of computed unions. It needs time. Hence, the total time complexity of the algorithm is .

Let us consider the lune-based -skeletons now. Unfortunately, Lemma 3 does not hold in this case (see Figure 10 in Appendix).

According to Theorem 2.1, in this case we have to consider only pairs of line segments in (the pairs corresponding to edges of ). We will analyze pairs of points belonging to given segments which generate discs such that each of them is intersected by any segment . We will consider -skeletons for (a -skeleton is the same in the circle-based and lune-based case). Let and be generators of a lune and let be a circle creating a part of its boundary containing point .

We will shoot a ray from a lune generator and we will compute a possible position of the second generator when the refraction point belongs to the lune. Let an angle between a shot ray and a refracted ray be equal to and let . Unfortunately, the ray shot from and refracted in does not intersect the segment in . However, we can define a segment such that the ray shot from refracts in if and only if the same ray refracted in a point of passes through (see Figure 7).

###### Lemma 4

Assume that , and , where . Let a point , where , belong to . Let be a line perpendicular to the segment , passing through and crossing in a point . Then .

###### Proof

Let be an opposite to end of the diameter of . Then , where is the center of . From the definition of the -skeleton follows that . According to Thales’ theorem (see Figure 7).

The algorithm computing a lune-based -skeleton for is similar to the previous one. Let , where is a homothety with respect to a point and a ratio . Like in the case of circle-based -skeletons we compute pairs of parameters such that the ray shot from refracts in a point of and intersects the segment in , i.e., an analyzed segment intersects a disc limited by the circle .

However, in the case of lune-based -skeletons we analyze only one hyperbola (functions for clockwise and counterclockwise refractions are the same). Moreover, sets and are different. They contain pairs of parameters corresponding to points generating discs such that each of them separately is intersected by the segment . Therefore, we have to intersect those sets to obtain a set of pairs of parameters corresponding to points generating lunes intersected by (see Figure 8).

###### Theorem 4.2

For the lune-based -skeleton can be found in time.

###### Proof

-skeletons for satisfy the inclusions from Theorem 2.1. Hence, the number of tested edges is linear. For each such pair of segments we compute the corresponding sets of pairs of points generating lunes that do not intersect segments from . Similarly as in Theorem 3.1 we can do it in time. Therefore, the total time complexity of the algorithm (after analysis of pairs of segments) is .

## 5 Computing Gabriel Graph for segments

In the previous sections we constructed sets of all pairs of points generating neighborhoods that do not intersect segments other than the segments containing generators. Now we want to find only pairs of generators (one pair for each edge of a -skeleton) that define the graph. Let denote a region of the -order Voronoi diagram for the set corresponding to and denote a region of the -order Voronoi diagram for the set corresponding to . If an edge , where belongs to the Gabriel Graph then there exists a disc centered in , which does not contain points from and its diameter is , where , and . The disc center belongs to the set for some .

First, for segments we define a set of all middle points of segments with one endpoint on and one on . This set is a quadrilateral (or a segment if ) with vertices in points , where for are endpoints of the segments for (boundaries of the set are determined by the images of and under four homotheties with respect to the ends of those segments and a ratio ).

Let us analyze a position of a middle point of a segment whose ends slide along the segments . Let the length of be . We rotate the plane so that segment lies in the negative part of -axis and the point of intersection of lines containing segments and (if there exists) is . Let the segment lie on the line parametrized by for . Then the middle point of is , where .

Since , then we have , so all points for a given lie on an ellipse - see Figure 9.

We want to find a point which is a center of a segment , where and , and . Then the disc with the center in and the radius intersects only segments , i.e., there exists an edge of between and .

We need to examine two cases. First, we consider the situation when the closest to point of a segment belongs to the interior of . Let be the line that contains segment , which endpoints are and , and let be the parametrization of . Let be a line parallel to with parametrization such that the distance between and is equal to . We compute the intersection of the ellipse and the line . The result is , so satisfies an equation where coefficients are fixed and depend on for . This equation defines a curve (see Figure 9) which intersects corresponding ellipses. A point which belongs to a part of the ellipse that lies on the opposite side of the curve than the segment is a center of a disc which has a diameter , where , , and does not intersect segment .

In the second case one of the endpoints of the segment is the nearest point to (among the points from ). Let and