Permalink

Newer

100644
55 lines (32 sloc)
3.4 KB

1

# Zone-Theorem-on-Arrangement

2

Concepts:

3

4

Zone Theorem-

5

The zone of a line L in an arrangement is the set of faces that L intersects.

6

7

In an arrangement of n lines the complexity of the zone of any line is O(n).

8

9

Arrangement of Lines-

10

The arrangement of a set of lines is the subdivision of the plane by that set of lines.

11

12

13

Simple Arrangement-

14

Arrangement of lines with no two lines being parallel, and no more than two lines intersecting at one point.

15

16

A Simple Arrangement has (n choose 2) vertices, n^2 edges, and (n choose 2) + n + 1 faces.

17

18

An arrangement can be constructed by an incremental algorithm. For each new line, 'l', we find the leftmost face, F, that 'l' intersects. Then we traverse the halfedges of F until we find the halfedgewhere 'l' leaves the face. We place a vertex at this point, and then we traverse the halfedges of the face on the other side of the intersected halfedge. The walk ends when 'l' exits the rightmost face it intersects. This construction of the arrangement takes O(n^2) time because for each of our n lines we add to the arrangement, we traverse O(n) halfedges of the faces it intersects.

19

20

Bounding Box-

21

A box just large enough that it contains all intersections of lines in the arrangement. When a bounding box is constructed, all edges and faces of the arrangement become bounded.

22

23

Planar Straight Line Graph (PSLG)-

24

A graph such that it can be embedded in a plane and all edges are straight lines. This means the graph can be drawn so that there is no line segments that intersect anywhere but at their endpoints.

25

26

27

Functions:

28

29

counter-clockwise test-

30

Checks the orientation of three consecutive points a, b , c. Returns 1 if abc are oriented counter-clockwise. Returns -1 if abc is oriented clockwise. Returns 0 if abc are collinear.

31

32

Line Intersection Test-

33

Given two lines with endpoints a1, a2 and b1, b2 respectively, these lines intersect if ccw(a1, a2, b1) and ccw(a1, a2, b2) have different orientations and if ccw(b1, b2, a1) and ccw(b1, b2, a2) have different orientations as well.

34

35

Data Structure:

36

Half Edge (Doubly Connected Edge List)-

37

Node-

38

reference to arbitrary outgoing edge as well as coordinates in plane.

39

40

Face-

41

reference to arbitrary incident edge

42

43

HalfEdge-

44

reference to origin node, next halfedge in the current face, previous halfedge(optional), twin halfedge, and incident face

45

46

Tools:

47

Processing 3

48

49

Plan:

50

Program will begin by creating a bounding box of size determined by the Processing window size. Then a random number of lines will be generated. Each line will be guaranteed to intersect at least one line already in the plane in order to ensure an interesting arragement. Each line will have endpoints on the bounding box in order to simulate the construction of a bounding box around the intersections of an arrangement of lines of arbitrary size. As a line is added, the arrangement will be built incrementally using a simple walk that places vertices and halfedges. Once all lines are placed the final product will be a PSLG. The user will be able to add a line to this arrangement and the simple walk will be run again highlighting the path taken in order to add the line to the PSLG. The added line will automatically extend to have endpoints on the bounding box in order to simulate an unbounded line passing through the bounding box into the arrangement.

51

52

53

54

55