Go to Bottom of Page
LECTURE 3
Chee Yap
COMPUTATIONAL GEOMETRY (I)
COMPUTATIONAL GEOMETRY (I)
THESE NOTES ARE STILL UNDER CONSTRUCTION!
We now consider some basic problems of computational
geometry that will be useful for our applications.
We begin in 2 dimensions.
[Previous]
[Next]
[Top]
[Bot]
Segment Intersection
- Let S be a set of (closed) line segments.
The problem we face is this: compute the set of pairs
of segments that properly intersect.
-
The computational paradigm here is the plane sweep.
Assume a horizontal sweepline H(t) where t is the
time and also the y-coordinate.
-
Let S(t) be the set of line segments in S that is
intersected by H(t). The elements in S(t) are
naturally ordered by their x-coordinate:
Write s < t s¢ for this ordering.
-
Events: This ordering can change in three ways.
(1) When two segments s, s¢ intersect. Their relative ordering
is switched.
(2) A new segment enter the set S(t).
(3) A segment exits from the set S(t).
-
These events can be anticipated by using an event queue.
Initially, the queue has all the events of types (2) and (3)
put into it.
We just have to show how to update the queue after
each event.
-
The algorithm is seen to take O(nlogn + K) where
K is the number of intersections.
[Previous]
[Next]
[Top]
[Bot]
Euler's Formula
- Cell complex in R2 is a set K of
cells. The set is partitioned
into the cells of dimension 0, 1 and 2:
K = K0 ÈK1ÈK2.
Dimension 0 and 1 cells are points and edges
(open line segments).
The rest are 2-cells, which are maximally connected
connected components of R2- (K0ÈK1).
-
For cell complex, we only require that
(1) endpoints of edges are 0-cells.
If K also satisfy
(2) 2-cells are simply connected,
then we call K a subdivision.
- Let S be a set of non-crossing segments, where
a segment may degenerate into an isolated point.
we define n0(S) to be the number of distinct
endpoints in S.
Let n1(S)| is the number of non-degenerate segments, and
n2(S) be the number of 2-cells in the complement
of ÈS.
Finally, let b(S) be the number of connected components
in ÈS. We have Euler's formula,
n0(S) - n1(S) +n2(S) = 1 +b(S). |
|
- It turns out that we could also define
these numerical quantities for any undirected planar graph G.
The only non-obvious part is whether n2(G) is
well-defined. This will be justified by Euler's formula,
which continues to hold.
Go to Top of Page
File translated from
TEX
by
TTH,
version 3.01.
On 16 Oct 2001, 13:38.