CG-Voronoi Diagrams

Voronoi Diagrams

CG系列文章


CG-Introduction
CG-Voronoi Diagrams
CG-Line Segment Intersection
CG-Polygon Triangulation
CG-Delaunay Triangulations
CG-Orthogonal Range Searching
CG-windowing query



在这里插入图片描述
图为贸易区的划分,黑点可理解为超市,目标:为每个地点选择一个购物的超市。(最近)
衍生问题: 物流配送、周边导航、加油站

定义

for each site where the people live who obtain their goods or services from that site

To study this question we make the following simplifying assumptions:

  • the price of a particular good or service is the same at every site;
  • the cost of acquiring the good or service is equal to the price plus the cost of transportation to the site;
  • the cost of transportation to a site equals the Euclidean distance to the site times a fixed price per unit distance;
  • consumers try to minimize the cost of acquiring the good or service.

The model where every point is assigned to the nearest site is called the Voronoi assignment model.(目的是求解模型)

7.1 Definition and Basic Properties

欧几里得距离
在这里插入图片描述
We define the Voronoi diagram of P as the subdivision of the plane into n cells, one for each site in P, with the property that a point q lies in the cell corresponding to a site pi.
if dist(q, pi ) < dist(q, p j ) for each p j ∈ P with j à= i.

用 Vor§表示Voronoi 图

The cell of Vor§ that corresponds to a site pi is denoted V(pi);we call it the Voronoi cell of pi. (In the terminology of the introduction to this chapter: V(pi) is the trading area of site pi.)
生活在V(pi)的居民一定到pi这个点购物。

For two points p and q in the plane we define the bisector(垂直平分线) of p and q as the perpendicular bisector of the line segment pq.

This bisector splits the plane into two half-planes. We denote the open half-plane that contains p by h(p,q) and the open half-plane that contains q by h(q,p).

Notice that r ∈ h( p, q) if and only if dist(r, p) < dist(r, q).
在这里插入图片描述
V(pi)表示的是所有Pi开头的半平面的交集,如下图所示
在这里插入图片描述

方法一: 直接求线段相交(n-1条分割线相交的区域)
方法二: 平面扫描线算法

theorem 7.2

Let P be a set of n point sites in the plane. If all the sites are collinear then Vor§ consists of n − 1 parallel lines(平行直线). Otherwise, Vor§ is connected (连同的)and its edges are either segments or half-lines(射线).

在这里插入图片描述
这是对平面的一个划分,一般不是多边形,里面只存在线段或者射线,不会有直线

证明

假设 voronoi 图含有 full line
在这里插入图片描述
当P点的个数大于等于三,且不是所有的点都共线时,就不可能存在full line了。
The bisector of p j and pk is not parallel to e and, hence, it intersects e. But then the part of e that lies in the interior of h(pk, pj) cannot be on the boundary of V(pj), because it is closer to pk than to pj, a contradiction.

It remains to prove that Vor§ is connected.

如果不连通,必然存在full line,然后前面证明了不可能有full line。所以全部都是连通的

Voronoi 图的复杂度

在这里插入图片描述
O表示最坏情况下的时间复杂度

theorem 7.3

For n 3, the number of vertices in the Voronoi diagram of a set of n point sites in the plane is at most 2n − 5 and the number of edges is at most 3n−6.

顶点的个数最多2n-5
边的个数最多3n-6

证明

验证 在所有的点共线时 成立
下面考虑点不共线的情况

欧拉公式
在这里插入图片描述
顶点数-边数+面数 = 2

现为voronoi图增加一个无穷远点
在这里插入图片描述
则符合欧拉公式,满足
在这里插入图片描述

对应到voronoi 图有
在这里插入图片描述

加了无穷远点之后,每条边恰好两个顶点,若把每个顶点的度数加起来(度数是边的个数的两倍),每个顶点的度数最少是3,所以有:
在这里插入图片描述

空圆

For a point q we define the largest empty circle of q with respect to P, denoted by CP(q)

在这里插入图片描述
空圆内不含site(三点确定一个圆),把最大的空圆称为CP(q).接下来要用空圆刻画voronoi图的性质

The following theorem characterizes the vertices and edges of the Voronoi diagram.

theorem 7.4

For the Voronoi diagram Vor§ of a set of points P the following holds:

  • A point q is a vertex of Vor§ if and only if its largest empty circle CP(q) contains three or more sites on its boundary.(点q是Vor(P)的顶点,当且仅当其最大空圆CP(q)在其边界上包含三个或更多个位点时。)
  • The bisector between sites pi and pj defines an edge of Vor§ if and only if there is a point q on the bisector such that CP (q) contains both pi and pj on its boundary but no other site(当且仅当在平分线上存在点q使得CP(q)在其边界上包含pi和pj而没有其他位点时,站点pi和pj之间的平分线定义Vor(P)的边缘。).

在这里插入图片描述

7.2 Computing the Voronoi Diagram

在这里插入图片描述
每个site对应一段抛物线,抛物线上的点到海岸线和到对应site的距离相等。
抛物线的交点形成了voronoi图的边

海岸线

在这里插入图片描述
每个抛物线对应一个site节点

Observation 7.5

The beach line is x-monotone, that is, every vertical line intersects it in exactly one point.

海岸线是x连通的(垂直于x轴的直线划分的区域是连通的)

Notice that the breakpoints between the different parabolic arcs forming the beach line lie on edges of the Voronoi diagram.

the breakpoints exactly trace out the Voronoi diagram while the sweep line moves from top to bottom. These properties of the beach line can be proved using elementary geometric arguments.

在这里插入图片描述
经过一个site节点时,
在这里插入图片描述
A new arc appears on the beach line because a site is encountered

不存抛物线方程,而是存对应site节点的x坐标

lemma 7.6

The only way in which a new arc can appear on the beach line is through a site event.(穿过site节点)
在这里插入图片描述
There are two ways in which this could happen.

  • The first possibility is that βj breaks through in the middle of an arc of a parabola βi. (相切,相交于一个点)
    Let y denote the y-coordinate of the sweep line at the moment of tangency.
    在这里插入图片描述

  • The second possibility is that βj appears in between two arcs.
    在这里插入图片描述
    在这种情况下:
    在这里插入图片描述

结论
An immediate consequence of the lemma is that the beach line consists of at most 2n − 1 parabolic arcs: each site encountered gives rise to one new arc and the splitting of at most one existing arc into two, and there is no other way an arc can appear on the beach line.
最多含有2n-1个抛物线的段(每增加一个site,相当于增加了两段)
在这里插入图片描述
Figure 7.4
An arc disappears from the beach line

一条抛物线消失相当于生成了一个voronoi图的顶点。

lemma 7.7

The only way in which an existing arc can disappear from the beach line is through a circle event.(圆事件点)

at a site event a new edge starts to grow, and at a circle event two growing edges meet to form a vertex.

在这里插入图片描述

two ‘standard’ data structures for any sweep line algorithm: an event queue and a structure that represents the status of the sweep line. Here the latter structure is a representation of the beach line. These data structures are implemented in the following way.

扫描线可以放在平衡的二叉树中
site节点的x坐标是有序的
断点与相邻的两个site节点关联
The internal nodes of T represent the breakpoints on the beach line.
A breakpoint is stored at an internal node by an ordered tuple of sites <pi,pj>
存储内节点
At an internal node, we simply compare the x-coordinate of the new site with the x-coordinate of the breakpoint, which can be computed from the tuple of sites and the position of the sweep line in constant time. (比较x坐标)
In T we also store pointers to the other two data structures used during the sweep.

The event queue Q is implemented as a priority queue, where the priority of an event is its y-coordinate. (事件放在根据y坐标值的优先级队列中)
For a circle event the event point that we store is the lowest point of the circle, with a pointer to the leaf in T that represents the arc that will disappear in the event.

lemma 7.8

Every Voronoi vertex is detected by means of a circle event(每个圆事件点)

在这里插入图片描述
当圆时间点生成的时候,中间段弧要消失掉。
We must show that just before the sweep line reaches the lowest point of C(pi, pj, pk), there are three consecutive arcs α, α and α on the beach line defined by the sites pi, pj, and pk.
Therefore, the corresponding circle event is in Q just before the event takes place, and the Voronoi vertex is detected.

实现算法

在这里插入图片描述
在这里插入图片描述

lemma7.9

The algorithm runs in O(n log n) time and it uses O(n) storage.

在这里插入图片描述

总结: 两个数据结构
优先级队列 :事件点
平衡树 :扫描线状态

7.3 Voronoi Diagrams of Line Segments

在这里插入图片描述
The Voronoi diagram can also be defined for objects other than points.
到线段的距离相等
the bisector of two disjoint line segments has a more complex shape. It consists of up to seven parts, where each part is either a line segment or a parabolic arc.
可以将弧线看成分隔曲面 (由线段和抛物线组成)
上图为 两个线段的voronoi图

Assume for a moment that we allow the line segments to be non-crossing, that is, we allow them to share endpoints.
在这里插入图片描述
两个线段共点
在阴影区域,到两条线段的距离相等
Then a whole region of the plane can be equally close to two line segments via their common endpoint, and bisectors are not even curves anymore. (不再是曲线)

所以:assume here that all line segments are strictly disjoint.(线段不想交)

The sweep line algorithm for points can be adapted to the case of line segment sites. Let S = {s1,…,sn} be a set of n disjoint line segments. We call the segments of S sites as before, and use the terms site endpoint and site interior in the following description.
在这里插入图片描述

voronoi图的对偶图,是将voronoi图中连线两侧的点连起来。
Delaunay三角剖分,使最小角最大化

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

_Summer tree

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值