Sweep line algorithm: Difference between revisions

Content deleted Content added
No edit summary
 
(5 intermediate revisions by 4 users not shown)
Line 5:
 
The idea behind algorithms of this type is to imagine that a line (often a vertical line) is swept or moved across the plane, stopping at some points. Geometric operations are restricted to geometric objects that either intersect or are in the immediate vicinity of the sweep line whenever it stops, and the complete solution is available once the line has passed over all objects.
 
==History==
This approach may be traced to [[scanline algorithm]]s of rendering in [[computer graphics]], followed by exploiting this approach in early algorithms of [[integrated circuit layout]] design, in which a geometric description of an IC was processed in parallel strips because the entire description could not fit into memory.{{Citation needed|date=May 2009}}
 
==Applications==
ApplicationAn application of thisthe approach had led to a breakthrough in the [[Analysis of algorithms|computational complexity]] of geometric algorithms when [[Michael Ian Shamos|Shamos]] and Hoey presented algorithms for [[line segment intersection]] in the plane in 1976. In particular, they described how a combination of the scanline approach with efficient data structures ([[self-balancing binary search tree]]s) makes it possible to detect whether there are intersections among {{mvar|N}} segments in the plane in [[time complexity]] of {{math|[[Big O notation|O]](''N'' log ''N'')}}.<ref>{{citation
| last1 = Shamos | first1 = Michael I. | author1-link = Michael Ian Shamos
| last2 = Hoey | first2 = Dan
Line 28 ⟶ 25:
Topological sweeping is a form of plane sweep with a simple ordering of processing points, which avoids the necessity of completely sorting the points; it allows some sweep line algorithms to be performed more efficiently.
The [[rotating calipers]] technique for designing geometric algorithms may also be interpreted as a form of the plane sweep, in the [[projective dual]] of the input plane: a form of projective duality transforms the slope of a line in one plane into the ''x''-coordinate of a point in the dual plane, so the progression through lines in sorted order by their slope as performed by a rotating calipers algorithm is dual to the progression through points sorted by their ''x''-coordinates in a plane sweep algorithm.<ref>{{cn}}cite conference
| last1 = Cheung | first1 = Yam Ki
| last2 = Daescu | first2 = Ovidiu
| editor1-last = Goldberg | editor1-first = Andrew V.
| editor2-last = Zhou | editor2-first = Yunhong
| contribution = Line segment facility ___location in weighted subdivisions
| doi = 10.1007/978-3-642-02158-9_10
| pages = 100–113
| publisher = Springer (1)
| series = Lecture Notes in Computer Science
| title = Algorithmic Aspects in Information and Management, 5th International Conference, AAIM 2009, San Francisco, CA, USA, June 15-17, 2009. Proceedings
| volume = 5564
| year = 2009}}</ref>
 
The sweeping approach may be generalised to higher dimensions.<ref>{{cite arXiv |last=Sinclair |first=David |eprint=1602.04707 |title=A 3D Sweep Hull Algorithm for computing Convex Hulls and Delaunay Triangulation |class=cs.CG |date=2016-02-11}}</ref>
Line 35 ⟶ 44:
{{reflist}}{{Algorithmic paradigms}}
[[Category:Geometric algorithms]]
[[Category:1976 in computing]]