Fix mathjax formatting issues

This commit is contained in:
Rory Healy 2024-06-13 14:39:15 +10:00
parent d54205b5d3
commit 62b80b3946
Signed by: roryhealy
GPG key ID: 0A3CBDE9C2AE672F

View file

@ -10,25 +10,25 @@ An alternative approach is to precompute the region of all points that is closer
### Bisector
An important concept for Voronoi diagrams is the bisector of two points. The bisector is orthogonal to the line segment connecting the two points and is equidistant to both points. If you had a compass, you would simply center the compass on each site, draw a circle (it does not have to have the other site on its circumference but the circles need to overlap to generate at least one intersection). Of course, for an implementation, we need an actual formula. The point $S_m$ is easy to compute as it is just the midpoint of $S_1$ and $S_2$, which is calculated as:
An important concept for Voronoi diagrams is the bisector of two points. The bisector is orthogonal to the line segment connecting the two points and is equidistant to both points. If you had a compass, you would simply center the compass on each site, draw a circle (it does not have to have the other site on its circumference but the circles need to overlap to generate at least one intersection). Of course, for an implementation, we need an actual formula. The point $S_m$ is easy to compute as it is just the midpoint of $S_1$ and $S_2$, which is calculated as:
$$
```math
S_m = \bigg(\frac{S_{1x} + S_{2x}}{2}, \frac{S_{1y} + S_{2y}}{2}\bigg)
$$
```
The actual bisector is just a usual straight line and its formula is:
$$
```math
y = -\frac{S_{2x} - S_{1x}}{S_{2y} - S_{1y}} \times (x - S_{mx}) + S_{my}
$$
```
![](./images/image01.png)
Note that every point on the bisector is equidistant to the sites $S_1$ and $S_2$. In particular, it divides the line segment $\overline{S1S2}$ into two equal halves at point $S_m$. Finally, the line segment $\overline{S1S2}$ is orthogonal to the bisector $b_{12}$.
Note that every point on the bisector is equidistant to the sites $S_1$ and $S_2$. In particular, it divides the line segment $\overline{S1S2}$ into two equal halves at point $S_m$. Finally, the line segment $\overline{S1S2}$ is orthogonal to the bisector $b_{12}$.
### Voronoi cell
In this assignment, we will use the DCEL to store the Voronoi diagram. More formally, in general we have $n$ sites $S_1, \dots, S_n$ (our watchtowers), then the ***Voronoi cell*** of a site $S_i$ for a given region $R$ (say Victoria) is defined as the set of points $P$ in the given region $R$ that fulfil the following condition:
In this assignment, we will use the DCEL to store the Voronoi diagram. More formally, in general we have $n$ sites $S_1, \dots, S_n$ (our watchtowers), then the ***Voronoi cell*** of a site $S_i$ for a given region $R$ (say Victoria) is defined as the set of points $P$ in the given region $R$ that fulfil the following condition:
```math
VC(S_i) = \{P \in R\ |\ dist(P, S_i) \lt dist(P, S_j)\ \forall\ S_j,\ j \neq i \}
@ -38,21 +38,21 @@ $dist(\sdot,\ \sdot)$ is the usual Euclidean distance between two points.
### Voronoi edges and Voronoi vertices
A shared edge between two Voronoi cells is called a ***Voronoi edge***. If $S_i$ and $S_j$ are two sites whose Voronoi cells share an edge $e_{ij}$, then all the points on $e_{ij}$ are equidistant to $S_i$ and $S_j$. This means that a Voronoi edge is part of the perpendicular bisector between two sites $S_i$ and $S_j$. Voronoi cells can share at most one Voronoi edge. In the figure the sites $S_0$ and $S_4$ share edge $e_{04}$.
A shared edge between two Voronoi cells is called a ***Voronoi edge***. If $S_i$ and $S_j$ are two sites whose Voronoi cells share an edge $e_{ij}$, then all the points on $e_{ij}$ are equidistant to $S_i$ and $S_j$. This means that a Voronoi edge is part of the perpendicular bisector between two sites $S_i$ and $S_j$. Voronoi cells can share at most one Voronoi edge. In the figure the sites $S_0$ and $S_4$ share edge $e_{04}$.
A point at which the edges of three (or more) Voronoi cells meet is called a ***Voronoi vertex***. If $S_i$, $S_j$ and $S_k$ are three sites with shared Voronoi edges $e_{ij}$, $e_{ik}$, and $e_{jk}$ that meet in $V_{ijk}$, then the Voronoi vertex is the circumcentre of the triangle with vertices $S_i$, $S_j$ and $S_k$, because the points $S_i$, $S_j$ and $S_k$ are all equidistant to $V_{ijk}$.
A point at which the edges of three (or more) Voronoi cells meet is called a ***Voronoi vertex***. If $S_i$, $S_j$ and $S_k$ are three sites with shared Voronoi edges $e_{ij}$, $e_{ik}$, and $e_{jk}$ that meet in $V_{ijk}$, then the Voronoi vertex is the circumcentre of the triangle with vertices $S_i$, $S_j$ and $S_k$, because the points $S_i$, $S_j$ and $S_k$ are all equidistant to $V_{ijk}$.
For example, the vertex $V_{234}$ is shared by the edges $e_{23}$, $e_{24}$ and $e_{34}$ in the figure below:
For example, the vertex $V_{234}$ is shared by the edges $e_{23}$, $e_{24}$ and $e_{34}$ in the figure below:
![](./images/image02.png)
Usually, there are two types of Voronoi edges: those that connect two Voronoi vertices and those start from a single vertex and are unbounded (i.e., are infinite). We will assume a (convex) polygon around our Voronoi sites, which clips all infinite edges. This means you can assume that all Voronoi edges are bounded and you use for the second point on the edge simply the intersection points of the polygon with the Voronoi edges.
In the figure above, the Polygon is defined by the points $A$ to $P$ and the unbounded Voronoi edges $e_{01}$, $e_{02}$, $e_{23}$, $e_{13}$ are described as line segments $\overline{V_{014}P_{01}}$, $\overline{V_{024}P_{02}}$, $\overline{V_{234}P_{23}}$, $\overline{V_{134}P_{13}}$, respectively.
In the figure above, the Polygon is defined by the points $A$ to $P$ and the unbounded Voronoi edges $e_{01}$, $e_{02}$, $e_{23}$, $e_{13}$ are described as line segments $\overline{V_{014}P_{01}}$, $\overline{V_{024}P_{02}}$, $\overline{V_{234}P_{23}}$, $\overline{V_{134}P_{13}}$, respectively.
By the way: there are as many Voronoi cells as we have sites, and if we have $n$ sites, then there are $O(n)$ vertices and edges.
If we had two sites $S_1$ and $S_2$, what would the Voronoi diagram look like assuming a bounding rectangle as a polygon? Here is an example:
If we had two sites $S_1$ and $S_2$, what would the Voronoi diagram look like assuming a bounding rectangle as a polygon? Here is an example:
![](./images/image03.png)