New methods for computing visibility graphs
M.H. Overmars, Emo Welzl · 1988
Let S be a set of n non-intersecting line segments in the plane. The visibility graph GS of S is the graph that has the endpoints of the segments in S as nodes and in which two nodes are adjacent whenever they can “see” each other (i.e., the open line segment joining them is disjoint from all segments or is contained in a segment). Two new methods are presented to construct GS. Both methods are very simple to implement. The first method is based on a new solution to the following problem: given a set of points, for each point sort the other points around it by angle. It runs in time Ο(n2). The second method uses the fact that visibility graphs often are sparse and runs in time Ο(m log n) where m is the number of edges in GS. Both methods use only Ogr;(n) storage.