duality transformation and its applications to computational geometry
TRANSCRIPT
![Page 1: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/1.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Duality Transformation and its Applications toComputational Geometry
Partha P. Goswami
University of KalyaniKalyani, West Bengal, India.
![Page 2: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/2.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Outline
1 Introduction
2 Definition and Properties
3 Convex Hull
4 Arrangement of Lines
5 Smallest Area Triangle
6 Nearest Neighbor of a Line
![Page 3: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/3.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Introduction
In the Cartesian plane, a point has two parameters (x- andy -coordinates) and a (non-vertical) line also has twoparameters (slope and y -intercept). We can thus map a set ofpoints to a set of lines, and vice versa, in an one-to-onemanner.
This natural duality between points and lines in the Cartesianplane has long been known to geometers.
The concept of duality is a powerful tool for the description,analysis, and construction of algorithms.
In this lecture we explore how geometric duality can be usedto design efficient algorithms for a number of importantproblems in computational geometry.
![Page 4: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/4.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Introduction
In the Cartesian plane, a point has two parameters (x- andy -coordinates) and a (non-vertical) line also has twoparameters (slope and y -intercept). We can thus map a set ofpoints to a set of lines, and vice versa, in an one-to-onemanner.
This natural duality between points and lines in the Cartesianplane has long been known to geometers.
The concept of duality is a powerful tool for the description,analysis, and construction of algorithms.
In this lecture we explore how geometric duality can be usedto design efficient algorithms for a number of importantproblems in computational geometry.
![Page 5: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/5.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Introduction
In the Cartesian plane, a point has two parameters (x- andy -coordinates) and a (non-vertical) line also has twoparameters (slope and y -intercept). We can thus map a set ofpoints to a set of lines, and vice versa, in an one-to-onemanner.
This natural duality between points and lines in the Cartesianplane has long been known to geometers.
The concept of duality is a powerful tool for the description,analysis, and construction of algorithms.
In this lecture we explore how geometric duality can be usedto design efficient algorithms for a number of importantproblems in computational geometry.
![Page 6: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/6.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Introduction
In the Cartesian plane, a point has two parameters (x- andy -coordinates) and a (non-vertical) line also has twoparameters (slope and y -intercept). We can thus map a set ofpoints to a set of lines, and vice versa, in an one-to-onemanner.
This natural duality between points and lines in the Cartesianplane has long been known to geometers.
The concept of duality is a powerful tool for the description,analysis, and construction of algorithms.
In this lecture we explore how geometric duality can be usedto design efficient algorithms for a number of importantproblems in computational geometry.
![Page 7: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/7.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Introduction
There are many different point-line duality mappings possible,depending on the conventions of the standard representationsof a line.
Each such mapping has its advantages and disadvantages inparticular contexts.
![Page 8: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/8.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Introduction
There are many different point-line duality mappings possible,depending on the conventions of the standard representationsof a line.
Each such mapping has its advantages and disadvantages inparticular contexts.
![Page 9: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/9.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Outline
1 Introduction
2 Definition and Properties
3 Convex Hull
4 Arrangement of Lines
5 Smallest Area Triangle
6 Nearest Neighbor of a Line
![Page 10: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/10.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Definition
Let D be the duality transformation.
Definition
A point p(a, b) is transformed to the lineDp(y = ax − b).
Definition
A line l(y = cx + d) is transformed to thepoint Dl(c ,−d).
primal
dual
pD
p
lD
l
![Page 11: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/11.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Definition
Let D be the duality transformation.
Definition
A point p(a, b) is transformed to the lineDp(y = ax − b).
Definition
A line l(y = cx + d) is transformed to thepoint Dl(c ,−d).
primal
dual
pD
p
lD
l
![Page 12: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/12.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Definition
Let D be the duality transformation.
Definition
A point p(a, b) is transformed to the lineDp(y = ax − b).
Definition
A line l(y = cx + d) is transformed to thepoint Dl(c ,−d).
primal
dual
pD
p
lD
l
![Page 13: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/13.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Properties
Lemma
D is its own inverse, that is, DDp = p and DDl = l .
Lemma
D is not defined for vertical lines since vertical lines can not berepresented in the form y = mx + c.
However this is not a problem in general. Because we can alwaysrotate the problem space slightly so that none is vertical.
![Page 14: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/14.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Properties
Lemma
D is its own inverse, that is, DDp = p and DDl = l .
Lemma
D is not defined for vertical lines since vertical lines can not berepresented in the form y = mx + c.
However this is not a problem in general. Because we can alwaysrotate the problem space slightly so that none is vertical.
![Page 15: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/15.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Properties
Lemma
D is its own inverse, that is, DDp = p and DDl = l .
Lemma
D is not defined for vertical lines since vertical lines can not berepresented in the form y = mx + c.
However this is not a problem in general. Because we can alwaysrotate the problem space slightly so that none is vertical.
![Page 16: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/16.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Properties
Incidence preserving
Lemma
A point p(a, b) is incident to the linel(y = cx + d) in the primal plane iff pointDl(c ,−d) is incident to the lineDp(y = ax − b) in the dual plane.
primal
dual
pD
Dl
p
l
![Page 17: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/17.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Properties
Incidence preserving
Lemma
A point p(a, b) is incident to the linel(y = cx + d) in the primal plane iff pointDl(c ,−d) is incident to the lineDp(y = ax − b) in the dual plane.
primal
dual
pD
Dl
p
l
![Page 18: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/18.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Properties
Order preserving
Lemma
A point p(a, b) is above (below) the linel(y = cx + d) in the primal plane iff lineDp(y = ax − b) is below (above) the pointDl(c ,−d) in the dual plane.
primal
dual
Dl
pD
lp
![Page 19: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/19.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Properties
Order preserving
Lemma
A point p(a, b) is above (below) the linel(y = cx + d) in the primal plane iff lineDp(y = ax − b) is below (above) the pointDl(c ,−d) in the dual plane.
primal
dual
Dl
pD
lp
![Page 20: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/20.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Alternative Definition
The duality transformation we have described so far is oftencalled m-c duality.
An alternative definition, called polar duality, is also used.
![Page 21: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/21.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Alternative Definition
The duality transformation we have described so far is oftencalled m-c duality.
An alternative definition, called polar duality, is also used.
![Page 22: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/22.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Polar Duality
Definition
A point p with coordinates (a, b) in the primal plane correspondsto a line Tp with equation ax + by + 1 = 0 in the dual plane andvice versa.
Geometrically this means if d is thedistance from the origin to the point p,The dual Tp of p is the line perpendicularto Op at distance 1/d from O and placedon the other side of O.
![Page 23: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/23.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Polar Duality
Definition
A point p with coordinates (a, b) in the primal plane correspondsto a line Tp with equation ax + by + 1 = 0 in the dual plane andvice versa.
Geometrically this means if d is thedistance from the origin to the point p,The dual Tp of p is the line perpendicularto Op at distance 1/d from O and placedon the other side of O.
![Page 24: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/24.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Polar Duality
Definition
A point p with coordinates (a, b) in the primal plane correspondsto a line Tp with equation ax + by + 1 = 0 in the dual plane andvice versa.
Geometrically this means if d is thedistance from the origin to the point p,The dual Tp of p is the line perpendicularto Op at distance 1/d from O and placedon the other side of O.
O
p
Tp
1/d
1
d
![Page 25: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/25.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Outline
1 Introduction
2 Definition and Properties
3 Convex Hull
4 Arrangement of Lines
5 Smallest Area Triangle
6 Nearest Neighbor of a Line
![Page 26: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/26.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Convex Hull
Let P be a set of points in the plane.
Definition
Convex hull of P, denoted by CH(P), is thesmallest convex set containing P.
Informally, an elastic band stretchedopen to encompass the given set,when released, assumes the shape ofthe convex hull.
![Page 27: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/27.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Convex Hull
Let P be a set of points in the plane.
Definition
Convex hull of P, denoted by CH(P), is thesmallest convex set containing P.
Informally, an elastic band stretchedopen to encompass the given set,when released, assumes the shape ofthe convex hull.
![Page 28: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/28.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Convex Hull
Let P be a set of points in the plane.
Definition
Convex hull of P, denoted by CH(P), is thesmallest convex set containing P.
Informally, an elastic band stretchedopen to encompass the given set,when released, assumes the shape ofthe convex hull.
![Page 29: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/29.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Convex Hull
Let P be a set of points in the plane.
Definition
Convex hull of P, denoted by CH(P), is thesmallest convex set containing P.
Informally, an elastic band stretchedopen to encompass the given set,when released, assumes the shape ofthe convex hull.
![Page 30: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/30.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Convex Hull Problem
Problem
Given a set of points P in the plane, compute the convex hullCH(P) of the set P.
To compute the convex hull of a point set is a well known andfundamental problem in computational geometry.
![Page 31: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/31.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Convex Hull Problem
Problem
Given a set of points P in the plane, compute the convex hullCH(P) of the set P.
To compute the convex hull of a point set is a well known andfundamental problem in computational geometry.
![Page 32: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/32.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
A Naive Algorithm
input: a set S of n points in the plane
for each triple (u,v,w) of S{remove all the points of S contained in Tr(u,v,w)
}Order the remaining points of S andoutput the ordered list
![Page 33: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/33.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
A Naive Algorithm
input: a set S of n points in the planefor each triple (u,v,w) of S{
remove all the points of S contained in Tr(u,v,w)
}
Order the remaining points of S andoutput the ordered list
![Page 34: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/34.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
A Naive Algorithm
input: a set S of n points in the planefor each triple (u,v,w) of S{
remove all the points of S contained in Tr(u,v,w)}
Order the remaining points of S andoutput the ordered list
![Page 35: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/35.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
A Naive Algorithm
input: a set S of n points in the planefor each triple (u,v,w) of S{
remove all the points of S contained in Tr(u,v,w)}Order the remaining points of S andoutput the ordered list
![Page 36: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/36.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
![Page 37: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/37.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
![Page 38: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/38.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
![Page 39: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/39.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
![Page 40: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/40.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
![Page 41: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/41.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
![Page 42: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/42.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
![Page 43: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/43.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
![Page 44: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/44.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
![Page 45: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/45.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
![Page 46: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/46.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Complexity
There are O(n3) triangles and it takes O(n) time for each triangle.So processing time for all triangles is O(n4).The sorting step requires O(n log n) time.Final reporting takes O(n) time.
Result
The naive algorithm takes O(n4) time and O(n) space to computethe convex hull of a set of n points.
![Page 47: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/47.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Complexity
There are O(n3) triangles and it takes O(n) time for each triangle.So processing time for all triangles is O(n4).The sorting step requires O(n log n) time.Final reporting takes O(n) time.
Result
The naive algorithm takes O(n4) time and O(n) space to computethe convex hull of a set of n points.
![Page 48: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/48.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Optimal Algorithms
The worst case computational complexity of the problem hasbeen shown to be O(n log n), where n is the size of the givenpoint set.
A number of optimal algorithms have been devised for theconvex hull problem.
![Page 49: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/49.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Optimal Algorithms
The worst case computational complexity of the problem hasbeen shown to be O(n log n), where n is the size of the givenpoint set.
A number of optimal algorithms have been devised for theconvex hull problem.
![Page 50: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/50.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Optimal Algorithms
Grahams scan, time complexity O(nlogn).(Graham, R.L., 1972)
Divide and conquer algorithm, time complexity O(nlogn).(Preparata, F. P. and Hong, S. J., 1977)
Jarvis’s march or gift wrapping algorithm, time complexityO(nh) where h number of vertices of the convex hull.(Jarvis, R. A., 1973)
Most efficient algorithm to date is based on the idea ofJarvis’s march, time complexity O(nlogh).T. M. Chan (1996)
![Page 51: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/51.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Definitions
Let P be the given set of n points in theplane. Let pa ∈ P be the point having smallestx-coordinate and pd ∈ P be the point withlargest x-coordinate. Obviously, both pa andpd belongs to CH(P).
Definition
The c-wise polygonal chain pa, . . . , pd alongthe hull is called the upper hull.
Definition
The cc-wise polygonal chain pa, . . . , pd alongthe hull is called the lower hull.
pa
pb
pc
pd
xp
![Page 52: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/52.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Definitions
Let P be the given set of n points in theplane. Let pa ∈ P be the point having smallestx-coordinate and pd ∈ P be the point withlargest x-coordinate. Obviously, both pa andpd belongs to CH(P).
Definition
The c-wise polygonal chain pa, . . . , pd alongthe hull is called the upper hull.
Definition
The cc-wise polygonal chain pa, . . . , pd alongthe hull is called the lower hull.
pa
pb
pc
pd
xp
![Page 53: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/53.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Definitions
Let P be the given set of n points in theplane. Let pa ∈ P be the point having smallestx-coordinate and pd ∈ P be the point withlargest x-coordinate. Obviously, both pa andpd belongs to CH(P).
Definition
The c-wise polygonal chain pa, . . . , pd alongthe hull is called the upper hull.
Definition
The cc-wise polygonal chain pa, . . . , pd alongthe hull is called the lower hull.
pa
pb
pc
pd
xp
![Page 54: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/54.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Definitions
Let L be a set of lines in the plane.
Definition
The upper envelope is a polygoal chain Eu
such that no line l ∈ L is above Eu.
Definition
The lower envelope is a polygoal chain El suchthat no line l ∈ L is below El .
upper envelope
low
er e
nvel
ope
![Page 55: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/55.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Definitions
Let L be a set of lines in the plane.
Definition
The upper envelope is a polygoal chain Eu
such that no line l ∈ L is above Eu.
Definition
The lower envelope is a polygoal chain El suchthat no line l ∈ L is below El .
upper envelope
low
er e
nvel
ope
![Page 56: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/56.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Definitions
Let L be a set of lines in the plane.
Definition
The upper envelope is a polygoal chain Eu
such that no line l ∈ L is above Eu.
Definition
The lower envelope is a polygoal chain El suchthat no line l ∈ L is below El .
upper envelope
low
er e
nvel
ope
![Page 57: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/57.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Connection Between Hull and Envelope
ly
la
lb
lc
pc
pb
px
lx
ap p
s
pd
Dl c
Dl y
Dl x
Dl a
Dl b
Dps
![Page 58: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/58.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Connection Between Hull and Envelope
ly
la
lb
lc
pc
pb
px
lx
ap p
s
pd
Dl c
Dl y
Dl x
Dl a
Dl b
Dps
![Page 59: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/59.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Connection Between Hull and Envelope
ly
la
lb
lc
pc
pb
px
lx
ap p
s
pd
Dl c
Dl y
Dl x
Dl a
Dl b
Dps
![Page 60: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/60.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Connection Between Hull and Envelope
ly
la
lb
lc
pc
pb
px
lx
ap p
s
pd
Dl c
Dl y
Dl x
Dl a
Dl b
Dps
![Page 61: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/61.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Connection Between Hull and Envelope
Conclusion
Upper hull (lower hull) in primal plane corresponds to the lowerenvelope (upper envelope) in the dual plane.
Thus the problem of computing convex hull of a point set in theprimal plane reduces to the problem of computing upper and lowerenvelopes of the line set in the dual plane.
![Page 62: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/62.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Connection Between Hull and Envelope
Conclusion
Upper hull (lower hull) in primal plane corresponds to the lowerenvelope (upper envelope) in the dual plane.
Thus the problem of computing convex hull of a point set in theprimal plane reduces to the problem of computing upper and lowerenvelopes of the line set in the dual plane.
![Page 63: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/63.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Algorithm
Input: I = (L1, L2, ..., Ln) is the list of dual linesin the increasing order of slopes.
Output: O = (L1, L2, ..., Lk is the polygonal chainrepresenting the upper hull.
O = (L1);for i = 2 to n do{L = last line in O;while(the line segment L in O does not intersect Li)remove L from O and replace L with its predecessor;
insert the line Li at the tail of the list O;}
![Page 64: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/64.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Algorithm
Input: I = (L1, L2, ..., Ln) is the list of dual linesin the increasing order of slopes.
Output: O = (L1, L2, ..., Lk is the polygonal chainrepresenting the upper hull.
O = (L1);for i = 2 to n do{L = last line in O;while(the line segment L in O does not intersect Li)remove L from O and replace L with its predecessor;
insert the line Li at the tail of the list O;}
![Page 65: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/65.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Algorithm
Input: I = (L1, L2, ..., Ln) is the list of dual linesin the increasing order of slopes.
Output: O = (L1, L2, ..., Lk is the polygonal chainrepresenting the upper hull.
O = (L1);
for i = 2 to n do{L = last line in O;while(the line segment L in O does not intersect Li)remove L from O and replace L with its predecessor;
insert the line Li at the tail of the list O;}
![Page 66: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/66.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Algorithm
Input: I = (L1, L2, ..., Ln) is the list of dual linesin the increasing order of slopes.
Output: O = (L1, L2, ..., Lk is the polygonal chainrepresenting the upper hull.
O = (L1);for i = 2 to n do{
L = last line in O;while(the line segment L in O does not intersect Li)remove L from O and replace L with its predecessor;
insert the line Li at the tail of the list O;
}
![Page 67: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/67.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Algorithm
Input: I = (L1, L2, ..., Ln) is the list of dual linesin the increasing order of slopes.
Output: O = (L1, L2, ..., Lk is the polygonal chainrepresenting the upper hull.
O = (L1);for i = 2 to n do{L = last line in O;
while(the line segment L in O does not intersect Li)remove L from O and replace L with its predecessor;
insert the line Li at the tail of the list O;
}
![Page 68: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/68.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Algorithm
Input: I = (L1, L2, ..., Ln) is the list of dual linesin the increasing order of slopes.
Output: O = (L1, L2, ..., Lk is the polygonal chainrepresenting the upper hull.
O = (L1);for i = 2 to n do{L = last line in O;while(the line segment L in O does not intersect Li)
remove L from O and replace L with its predecessor;insert the line Li at the tail of the list O;
}
![Page 69: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/69.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Algorithm
Input: I = (L1, L2, ..., Ln) is the list of dual linesin the increasing order of slopes.
Output: O = (L1, L2, ..., Lk is the polygonal chainrepresenting the upper hull.
O = (L1);for i = 2 to n do{L = last line in O;while(the line segment L in O does not intersect Li)remove L from O and replace L with its predecessor;
insert the line Li at the tail of the list O;
}
![Page 70: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/70.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Algorithm
Input: I = (L1, L2, ..., Ln) is the list of dual linesin the increasing order of slopes.
Output: O = (L1, L2, ..., Lk is the polygonal chainrepresenting the upper hull.
O = (L1);for i = 2 to n do{L = last line in O;while(the line segment L in O does not intersect Li)remove L from O and replace L with its predecessor;
insert the line Li at the tail of the list O;}
![Page 71: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/71.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
L1
L2
L3
L4
L5
L6
L1
L2
L3
L4
L5
L6
![Page 72: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/72.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
L1
L2
L3
L4
L5
L6 L1
L2
L3
L4
L5
L6
![Page 73: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/73.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
L1
L2
L3
L4
L5
L6 L1
L2
L3
L4
L5
L6
![Page 74: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/74.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
L1
L2
L3
L4
L5
L6 L1
L2
L3
L4
L5
L6
![Page 75: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/75.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
L1
L2
L3
L4
L5
L6 L1
L2
L3
L4
L5
L6
![Page 76: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/76.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
L1
L2
L3
L4
L5
L6 L1
L2
L3
L4
L5
L6
![Page 77: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/77.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
L1
L2
L3
L4
L5
L6 L1
L2
L3
L4
L5
L6
![Page 78: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/78.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
L1
L2
L3
L4
L5
L6 L1
L2
L3
L4
L5
L6
![Page 79: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/79.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Result
Lemma
After sorting n lines by their slopes in O(nlogn) time, the upperenvelope can be obtained in O(n) time.
Proof.
It may check more than one line segment when inserting a new line,but those ones checked are all removed except the last one.
![Page 80: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/80.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Result
Lemma
After sorting n lines by their slopes in O(nlogn) time, the upperenvelope can be obtained in O(n) time.
Proof.
It may check more than one line segment when inserting a new line,but those ones checked are all removed except the last one.
![Page 81: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/81.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Result
Result
Given a set P of n points in the plane, CH(P) can be computed inO(n log n) time using n space.
![Page 82: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/82.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Outline
1 Introduction
2 Definition and Properties
3 Convex Hull
4 Arrangement of Lines
5 Smallest Area Triangle
6 Nearest Neighbor of a Line
![Page 83: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/83.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Definition
Let L be a set of n lines in the plane. Theembedding of L in the plane induces aplanner subdivision that consists ofvertices, edges, and faces where some ofthe edges and faces are unbounded. Thissubdivision is referred to as arrangementinduced by L, and is denoted by A(L).
An arrangement is called simple if nothree lines passes through the same pointand no two lines are parallel.
The (combinatorial) complexity of anarrangement is the total number ofvertices, edges, and faces. Observe thatworst case complexity occurs when anarrangement is simple.
face
edge
vertex
![Page 84: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/84.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Definition
Let L be a set of n lines in the plane. Theembedding of L in the plane induces aplanner subdivision that consists ofvertices, edges, and faces where some ofthe edges and faces are unbounded. Thissubdivision is referred to as arrangementinduced by L, and is denoted by A(L).
An arrangement is called simple if nothree lines passes through the same pointand no two lines are parallel.
The (combinatorial) complexity of anarrangement is the total number ofvertices, edges, and faces. Observe thatworst case complexity occurs when anarrangement is simple.
face
edge
vertex
![Page 85: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/85.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Definition
Let L be a set of n lines in the plane. Theembedding of L in the plane induces aplanner subdivision that consists ofvertices, edges, and faces where some ofthe edges and faces are unbounded. Thissubdivision is referred to as arrangementinduced by L, and is denoted by A(L).
An arrangement is called simple if nothree lines passes through the same pointand no two lines are parallel.
The (combinatorial) complexity of anarrangement is the total number ofvertices, edges, and faces. Observe thatworst case complexity occurs when anarrangement is simple.
face
edge
vertex
![Page 86: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/86.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Definition
Let L be a set of n lines in the plane. Theembedding of L in the plane induces aplanner subdivision that consists ofvertices, edges, and faces where some ofthe edges and faces are unbounded. Thissubdivision is referred to as arrangementinduced by L, and is denoted by A(L).
An arrangement is called simple if nothree lines passes through the same pointand no two lines are parallel.
The (combinatorial) complexity of anarrangement is the total number ofvertices, edges, and faces. Observe thatworst case complexity occurs when anarrangement is simple.
face
edge
vertex
![Page 87: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/87.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Definition
Let L be a set of n lines in the plane. Theembedding of L in the plane induces aplanner subdivision that consists ofvertices, edges, and faces where some ofthe edges and faces are unbounded. Thissubdivision is referred to as arrangementinduced by L, and is denoted by A(L).
An arrangement is called simple if nothree lines passes through the same pointand no two lines are parallel.
The (combinatorial) complexity of anarrangement is the total number ofvertices, edges, and faces. Observe thatworst case complexity occurs when anarrangement is simple.
face
edge
vertex
![Page 88: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/88.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Result
Theorem
Let L be the set of n lines in the plane, and let A(L) be thearrangement induced by L.
(i) The number of vertices of A(L) is at mostn(n − 1)/2.
(ii) The number of edges of A(L) is at most n2.
(iii) The number of faces of A(L) is at mostn2/2 + n/2 + 1.
Equality holds in these three statements iff A(L) is simple.
Can be proved easily by using Euler’s formula:For any connected planner embedded graph with mv nodes, me
arcs, and mf faces the following relation holds
mv −me + mf = 2.
![Page 89: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/89.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Result
Theorem
Let L be the set of n lines in the plane, and let A(L) be thearrangement induced by L.
(i) The number of vertices of A(L) is at mostn(n − 1)/2.
(ii) The number of edges of A(L) is at most n2.
(iii) The number of faces of A(L) is at mostn2/2 + n/2 + 1.
Equality holds in these three statements iff A(L) is simple.
Can be proved easily by using Euler’s formula:For any connected planner embedded graph with mv nodes, me
arcs, and mf faces the following relation holds
mv −me + mf = 2.
![Page 90: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/90.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Computation of Arrangement
One of the fundamental problems in computational geometryis constructing arrangements of lines, that is, explicitlybuilding the regions formed by the intersections of a set of nlines.
Algorithms for a surprising number of problems are based onconstructing and analyzing the arrangement of a specific setof lines.
A variety of data structures have been proposed for thispurpose.
![Page 91: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/91.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Computation of Arrangement
One of the fundamental problems in computational geometryis constructing arrangements of lines, that is, explicitlybuilding the regions formed by the intersections of a set of nlines.
Algorithms for a surprising number of problems are based onconstructing and analyzing the arrangement of a specific setof lines.
A variety of data structures have been proposed for thispurpose.
![Page 92: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/92.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Computation of Arrangement
One of the fundamental problems in computational geometryis constructing arrangements of lines, that is, explicitlybuilding the regions formed by the intersections of a set of nlines.
Algorithms for a surprising number of problems are based onconstructing and analyzing the arrangement of a specific setof lines.
A variety of data structures have been proposed for thispurpose.
![Page 93: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/93.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Computation of Arrangement
Algorithms for constructing arrangementsare usually incremental. Beginning withan arrangement of one or two lines,subsequent lines are inserted into thearrangement one at a time, therebybuilding larger and larger arrangements.
To insert a new line, we start on theleftmost cell containing the line and walkover the arrangement to the right, movingfrom cell to neighboring cell and splittinginto two pieces those cells that containthe new line.
![Page 94: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/94.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Computation of Arrangement
Algorithms for constructing arrangementsare usually incremental. Beginning withan arrangement of one or two lines,subsequent lines are inserted into thearrangement one at a time, therebybuilding larger and larger arrangements.
To insert a new line, we start on theleftmost cell containing the line and walkover the arrangement to the right, movingfrom cell to neighboring cell and splittinginto two pieces those cells that containthe new line.
![Page 95: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/95.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Computation of Arrangement
Algorithms for constructing arrangementsare usually incremental. Beginning withan arrangement of one or two lines,subsequent lines are inserted into thearrangement one at a time, therebybuilding larger and larger arrangements.
To insert a new line, we start on theleftmost cell containing the line and walkover the arrangement to the right, movingfrom cell to neighboring cell and splittinginto two pieces those cells that containthe new line.
![Page 96: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/96.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Computation of Arrangement
A geometric fact called the zone theorem implies that thek-th line inserted cuts through k cells of the arrangement and,moreover, O(k) total edges form the boundary of these cells.
We can thus scan through each edge of every cell encounteredon our insertion walk in linear time.
The total time to insert all n lines in constructing the fullarrangement is O(n2).
![Page 97: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/97.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Computation of Arrangement
A geometric fact called the zone theorem implies that thek-th line inserted cuts through k cells of the arrangement and,moreover, O(k) total edges form the boundary of these cells.
We can thus scan through each edge of every cell encounteredon our insertion walk in linear time.
The total time to insert all n lines in constructing the fullarrangement is O(n2).
![Page 98: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/98.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Computation of Arrangement
A geometric fact called the zone theorem implies that thek-th line inserted cuts through k cells of the arrangement and,moreover, O(k) total edges form the boundary of these cells.
We can thus scan through each edge of every cell encounteredon our insertion walk in linear time.
The total time to insert all n lines in constructing the fullarrangement is O(n2).
![Page 99: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/99.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Levels
We consider an alternative concept, called levels, forstructuring an arrangement of lines.
It is simple both from understanding and implementationspoint of view.
![Page 100: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/100.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Levels
We consider an alternative concept, called levels, forstructuring an arrangement of lines.
It is simple both from understanding and implementationspoint of view.
![Page 101: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/101.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Definition
Definition
Let L be a set on n lines in the plane inducing an arrangementA(L). A point π in the plane is at level θ (0 ≤ θ ≤ n) if there areexactly θ lines in L that lie strictly below π. The θ-level of A(L) isthe closure of a set of points on the lines of L whose levels areexactly θ in A(L), and is denoted as λθ.
![Page 102: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/102.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
definition
Clearly, the edges of λθ form a monotonepolychain from x = −∞ to x = ∞. Eachvertex of the arrangement A(L) appearsin two consecutive levels, and each edgeof A(L) appears in exactly one level.
We can thus store each level simply as anarray of segments.
Observe that the upper and the lowerenvelops mentioned earlier, are simply then-th and 0-th levels respectively.
level 0
level 1
level 2
level 3
level 4
level 5level 6
![Page 103: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/103.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
definition
Clearly, the edges of λθ form a monotonepolychain from x = −∞ to x = ∞. Eachvertex of the arrangement A(L) appearsin two consecutive levels, and each edgeof A(L) appears in exactly one level.
We can thus store each level simply as anarray of segments.
Observe that the upper and the lowerenvelops mentioned earlier, are simply then-th and 0-th levels respectively.
level 0
level 1
level 2
level 3
level 4
level 5level 6
![Page 104: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/104.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
definition
Clearly, the edges of λθ form a monotonepolychain from x = −∞ to x = ∞. Eachvertex of the arrangement A(L) appearsin two consecutive levels, and each edgeof A(L) appears in exactly one level.
We can thus store each level simply as anarray of segments.
Observe that the upper and the lowerenvelops mentioned earlier, are simply then-th and 0-th levels respectively.
level 0
level 1
level 2
level 3
level 4
level 5level 6
![Page 105: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/105.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
definition
Clearly, the edges of λθ form a monotonepolychain from x = −∞ to x = ∞. Eachvertex of the arrangement A(L) appearsin two consecutive levels, and each edgeof A(L) appears in exactly one level.
We can thus store each level simply as anarray of segments.
Observe that the upper and the lowerenvelops mentioned earlier, are simply then-th and 0-th levels respectively.
level 0
level 1
level 2
level 3
level 4
level 5level 6
![Page 106: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/106.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
definition
Clearly, the edges of λθ form a monotonepolychain from x = −∞ to x = ∞. Eachvertex of the arrangement A(L) appearsin two consecutive levels, and each edgeof A(L) appears in exactly one level.
We can thus store each level simply as anarray of segments.
Observe that the upper and the lowerenvelops mentioned earlier, are simply then-th and 0-th levels respectively.
level 0
level 1
level 2
level 3
level 4
level 5level 6
![Page 107: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/107.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Computing Levels
Once an arrangement is computed using traditional datastructures mentioned earlier, levels of an arrangement can becomputed in optimal O(n2) time.
Here we consider an alternative method using plane sweepparadigm.
The method was first introduced by Bentley and Ottmann(1979) in the context of solving the problem of line segmentintersections.
![Page 108: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/108.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Computing Levels
Once an arrangement is computed using traditional datastructures mentioned earlier, levels of an arrangement can becomputed in optimal O(n2) time.
Here we consider an alternative method using plane sweepparadigm.
The method was first introduced by Bentley and Ottmann(1979) in the context of solving the problem of line segmentintersections.
![Page 109: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/109.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Computing Levels
Once an arrangement is computed using traditional datastructures mentioned earlier, levels of an arrangement can becomputed in optimal O(n2) time.
Here we consider an alternative method using plane sweepparadigm.
The method was first introduced by Bentley and Ottmann(1979) in the context of solving the problem of line segmentintersections.
![Page 110: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/110.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Plane Sweep Method
Basic method consists of:
A vertical line l , called the sweep line, sweeps over the planefrom x = −∞ to x = ∞.
The status of the sweep line at any instant is the set of linesintersecting it.
The status changes only when the sweep line reaches someparticular points, called event points.
The algorithm performs some computational steps when thesweep line reaches event points.
![Page 111: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/111.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Plane Sweep Method
Basic method consists of:
A vertical line l , called the sweep line, sweeps over the planefrom x = −∞ to x = ∞.
The status of the sweep line at any instant is the set of linesintersecting it.
The status changes only when the sweep line reaches someparticular points, called event points.
The algorithm performs some computational steps when thesweep line reaches event points.
![Page 112: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/112.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Plane Sweep Method
Basic method consists of:
A vertical line l , called the sweep line, sweeps over the planefrom x = −∞ to x = ∞.
The status of the sweep line at any instant is the set of linesintersecting it.
The status changes only when the sweep line reaches someparticular points, called event points.
The algorithm performs some computational steps when thesweep line reaches event points.
![Page 113: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/113.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Plane Sweep Method
Basic method consists of:
A vertical line l , called the sweep line, sweeps over the planefrom x = −∞ to x = ∞.
The status of the sweep line at any instant is the set of linesintersecting it.
The status changes only when the sweep line reaches someparticular points, called event points.
The algorithm performs some computational steps when thesweep line reaches event points.
![Page 114: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/114.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Data structure
In our case, events are the points of intersection of the lines.Apart from storing the events, we also need to insert newevents and extract the event nearest to the sweep line on itsright. Clearly, a queue is a suitable data structure for this.
At every instant, the sweep line intersects each element of L.Order the lines from bottom to top according to theirintersection points with the sweep line. Data structure we usefor maintaining the sweep line status are arrays storing thelevels. At an instant, portion of the line at the i-th position,0 ≤ i ≤ n, is part of the i-th level.
![Page 115: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/115.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Data structure
In our case, events are the points of intersection of the lines.Apart from storing the events, we also need to insert newevents and extract the event nearest to the sweep line on itsright. Clearly, a queue is a suitable data structure for this.
At every instant, the sweep line intersects each element of L.Order the lines from bottom to top according to theirintersection points with the sweep line. Data structure we usefor maintaining the sweep line status are arrays storing thelevels. At an instant, portion of the line at the i-th position,0 ≤ i ≤ n, is part of the i-th level.
![Page 116: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/116.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Processing
Let the next event be the intersection point of the linescurrently at i-th and (i + 1)-th positions respectively.Processing steps to be performed at this event point are asfollows.
Portion of the line at the i-th position before the event pointwill become part of the (i + 1)-th level after the event point.Similarly, portion of the line at the (i + 1)-th position beforethe event point will become part of the i-th level after theevent point.
If the line at the (i + 1)-th position after the event pointintersect the line at the (i + 2)-th position on the right of thesweep line, then insert the intersection point as a future eventpoint. Similarly, if the line at the i-th position after the eventpoint intersect the line at the (i − 1)-th position on the rightof the sweep line, then insert the intersection point as a futureevent point.
![Page 117: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/117.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Processing
Let the next event be the intersection point of the linescurrently at i-th and (i + 1)-th positions respectively.Processing steps to be performed at this event point are asfollows.
Portion of the line at the i-th position before the event pointwill become part of the (i + 1)-th level after the event point.Similarly, portion of the line at the (i + 1)-th position beforethe event point will become part of the i-th level after theevent point.
If the line at the (i + 1)-th position after the event pointintersect the line at the (i + 2)-th position on the right of thesweep line, then insert the intersection point as a future eventpoint. Similarly, if the line at the i-th position after the eventpoint intersect the line at the (i − 1)-th position on the rightof the sweep line, then insert the intersection point as a futureevent point.
![Page 118: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/118.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Processing
Let the next event be the intersection point of the linescurrently at i-th and (i + 1)-th positions respectively.Processing steps to be performed at this event point are asfollows.
Portion of the line at the i-th position before the event pointwill become part of the (i + 1)-th level after the event point.Similarly, portion of the line at the (i + 1)-th position beforethe event point will become part of the i-th level after theevent point.
If the line at the (i + 1)-th position after the event pointintersect the line at the (i + 2)-th position on the right of thesweep line, then insert the intersection point as a future eventpoint. Similarly, if the line at the i-th position after the eventpoint intersect the line at the (i − 1)-th position on the rightof the sweep line, then insert the intersection point as a futureevent point.
![Page 119: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/119.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Initialization
Compute the left most intersection point. Position the sweepline before this intersection point.
Compute the intersection points of the lines with the sweepline and order the lines from bottom to top according to theorder of the intersection points.
Initialize the level arrays with the lines according to theirposition on the sweep line.
Check each pair of lines from bottom to top if they insert onthe right of the sweep line. If yes, insert these intersectionpoints in the queue as an event point.
![Page 120: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/120.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Initialization
Compute the left most intersection point. Position the sweepline before this intersection point.
Compute the intersection points of the lines with the sweepline and order the lines from bottom to top according to theorder of the intersection points.
Initialize the level arrays with the lines according to theirposition on the sweep line.
Check each pair of lines from bottom to top if they insert onthe right of the sweep line. If yes, insert these intersectionpoints in the queue as an event point.
![Page 121: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/121.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Initialization
Compute the left most intersection point. Position the sweepline before this intersection point.
Compute the intersection points of the lines with the sweepline and order the lines from bottom to top according to theorder of the intersection points.
Initialize the level arrays with the lines according to theirposition on the sweep line.
Check each pair of lines from bottom to top if they insert onthe right of the sweep line. If yes, insert these intersectionpoints in the queue as an event point.
![Page 122: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/122.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Initialization
Compute the left most intersection point. Position the sweepline before this intersection point.
Compute the intersection points of the lines with the sweepline and order the lines from bottom to top according to theorder of the intersection points.
Initialize the level arrays with the lines according to theirposition on the sweep line.
Check each pair of lines from bottom to top if they insert onthe right of the sweep line. If yes, insert these intersectionpoints in the queue as an event point.
![Page 123: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/123.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Algorithm
Input: A set L of n lines in the plane
Compute initial position of the sweep line. Initializeevent queue Q and level arrays LA[i], 0 <= i <= n.
while Q is not empty doretrieve the next event point from Q and delete it.process the event point.
![Page 124: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/124.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Algorithm
Input: A set L of n lines in the planeCompute initial position of the sweep line. Initializeevent queue Q and level arrays LA[i], 0 <= i <= n.
while Q is not empty doretrieve the next event point from Q and delete it.process the event point.
![Page 125: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/125.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Algorithm
Input: A set L of n lines in the planeCompute initial position of the sweep line. Initializeevent queue Q and level arrays LA[i], 0 <= i <= n.
while Q is not empty do
retrieve the next event point from Q and delete it.process the event point.
![Page 126: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/126.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Algorithm
Input: A set L of n lines in the planeCompute initial position of the sweep line. Initializeevent queue Q and level arrays LA[i], 0 <= i <= n.
while Q is not empty doretrieve the next event point from Q and delete it.
process the event point.
![Page 127: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/127.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Algorithm
Input: A set L of n lines in the planeCompute initial position of the sweep line. Initializeevent queue Q and level arrays LA[i], 0 <= i <= n.
while Q is not empty doretrieve the next event point from Q and delete it.process the event point.
![Page 128: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/128.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
level1
level2
level3
level4
level5
level0
![Page 129: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/129.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
level1
level2
level3
level4
level5
level0
![Page 130: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/130.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
level1
level2
level3
level4
level5
level0
![Page 131: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/131.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
level1
level2
level3
level4
level5
level0
![Page 132: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/132.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
level1
level2
level3
level4
level5
level0
![Page 133: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/133.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
level1
level2
level3
level4
level5
level0
![Page 134: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/134.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
level1
level2
level3
level4
level5
level0
![Page 135: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/135.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
level1
level2
level3
level4
level5
level0
![Page 136: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/136.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
level1
level2
level3
level4
level5
level0
![Page 137: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/137.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
level1
level2
level3
level4
level5
level0
![Page 138: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/138.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
level1
level2
level3
level4
level5
level0
![Page 139: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/139.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
level1
level2
level3
level4
level5
level0
![Page 140: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/140.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Example
level1
level2
level3
level4
level5
level0
![Page 141: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/141.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Complexity
Initialization step requires O(n2) time.
At each event point, processing requires O(log n) time.
Since there are O(n2) event points, overall time complexity isO(n2 log n).
Space complexity is O(n2).
![Page 142: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/142.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Complexity
Initialization step requires O(n2) time.
At each event point, processing requires O(log n) time.
Since there are O(n2) event points, overall time complexity isO(n2 log n).
Space complexity is O(n2).
![Page 143: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/143.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Complexity
Initialization step requires O(n2) time.
At each event point, processing requires O(log n) time.
Since there are O(n2) event points, overall time complexity isO(n2 log n).
Space complexity is O(n2).
![Page 144: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/144.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Complexity
Initialization step requires O(n2) time.
At each event point, processing requires O(log n) time.
Since there are O(n2) event points, overall time complexity isO(n2 log n).
Space complexity is O(n2).
![Page 145: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/145.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Result
Theorem
Using plane sweep, levels of an arrangement of n lines can becomputed in O(n2 log n) time using O(n2) space.
![Page 146: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/146.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Outline
1 Introduction
2 Definition and Properties
3 Convex Hull
4 Arrangement of Lines
5 Smallest Area Triangle
6 Nearest Neighbor of a Line
![Page 147: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/147.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Smallest Area Triangle Problem
Problem
Let P be a set of n points in the plane. The problem is todetermine which of the
(n3
)triangles with vertices in P has the
smallest area.
The solution of the above problem allows us to solve the followingproblem also.
Problem
Let P be a set of n points in the plane. The problem is todetermine whether three points in P are collinear.
![Page 148: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/148.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Smallest Area Triangle Problem
Problem
Let P be a set of n points in the plane. The problem is todetermine which of the
(n3
)triangles with vertices in P has the
smallest area.
The solution of the above problem allows us to solve the followingproblem also.
Problem
Let P be a set of n points in the plane. The problem is todetermine whether three points in P are collinear.
![Page 149: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/149.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Smallest Area Triangle Problem
Problem
Let P be a set of n points in the plane. The problem is todetermine which of the
(n3
)triangles with vertices in P has the
smallest area.
The solution of the above problem allows us to solve the followingproblem also.
Problem
Let P be a set of n points in the plane. The problem is todetermine whether three points in P are collinear.
![Page 150: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/150.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Smallest Area Triangle Problem
The difficulty of the problem arises fromthe fact that the vertices of the smallesttriangle can be arbitrarily apart (i.e.,absence of locality).
The best known algorithm, without usingduality, for this problem has time andspace complexities O(n2 log n) and O(n)respectively.(Edelsbrunner and Welzl, 1982).
Using duality, it is possible to improveupon the complexity.
![Page 151: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/151.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Smallest Area Triangle Problem
The difficulty of the problem arises fromthe fact that the vertices of the smallesttriangle can be arbitrarily apart (i.e.,absence of locality).
The best known algorithm, without usingduality, for this problem has time andspace complexities O(n2 log n) and O(n)respectively.(Edelsbrunner and Welzl, 1982).
Using duality, it is possible to improveupon the complexity.
![Page 152: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/152.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Smallest Area Triangle Problem
The difficulty of the problem arises fromthe fact that the vertices of the smallesttriangle can be arbitrarily apart (i.e.,absence of locality).
The best known algorithm, without usingduality, for this problem has time andspace complexities O(n2 log n) and O(n)respectively.(Edelsbrunner and Welzl, 1982).
Using duality, it is possible to improveupon the complexity.
![Page 153: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/153.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Assumption
The definition of duality implies that if two points pi and pj inthe primal plane have same x-coordinate values, thencorresponding duals Dpi and Dpj are parallel in the dual plane.
To avoid this we assume that no two points in P have samex-coordinates. This may possibly require rotating the axes bya small angle which can be determined in O(n log n) time.
![Page 154: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/154.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Assumption
The definition of duality implies that if two points pi and pj inthe primal plane have same x-coordinate values, thencorresponding duals Dpi and Dpj are parallel in the dual plane.
To avoid this we assume that no two points in P have samex-coordinates. This may possibly require rotating the axes bya small angle which can be determined in O(n log n) time.
![Page 155: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/155.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Sketch of the solution
Let h(i , j , k) be the perpendiculardistance from the point pk to the segmentpipj and let the line through pk that isparallel to pipj is l(i , j , k).
Smallest area triangle with pipj as anedge minimizes h(i , j , k) for all k 6= i , j ;1 ≤ k ≤ n.
Straight forward use of this scheme leadsto an O(n3) time algorithm.
However, when taken to dual plane, thisleads to efficient algorithm.
p_ip_j
p_k
h(i,j,k)
![Page 156: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/156.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Sketch of the solution
Let h(i , j , k) be the perpendiculardistance from the point pk to the segmentpipj and let the line through pk that isparallel to pipj is l(i , j , k).
Smallest area triangle with pipj as anedge minimizes h(i , j , k) for all k 6= i , j ;1 ≤ k ≤ n.
Straight forward use of this scheme leadsto an O(n3) time algorithm.
However, when taken to dual plane, thisleads to efficient algorithm.
p_ip_j
p_k
h(i,j,k)
![Page 157: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/157.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Sketch of the solution
Let h(i , j , k) be the perpendiculardistance from the point pk to the segmentpipj and let the line through pk that isparallel to pipj is l(i , j , k).
Smallest area triangle with pipj as anedge minimizes h(i , j , k) for all k 6= i , j ;1 ≤ k ≤ n.
Straight forward use of this scheme leadsto an O(n3) time algorithm.
However, when taken to dual plane, thisleads to efficient algorithm.
p_ip_j
p_k
h(i,j,k)
![Page 158: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/158.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Sketch of the solution
Let h(i , j , k) be the perpendiculardistance from the point pk to the segmentpipj and let the line through pk that isparallel to pipj is l(i , j , k).
Smallest area triangle with pipj as anedge minimizes h(i , j , k) for all k 6= i , j ;1 ≤ k ≤ n.
Straight forward use of this scheme leadsto an O(n3) time algorithm.
However, when taken to dual plane, thisleads to efficient algorithm.
p_ip_j
p_k
h(i,j,k)
![Page 159: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/159.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Dualization
In the dual plane, the edge pipj becomesthe intersection point I of Dpi and Dpj .
The line l(i , j , k) becomes the point onDpk
having same x-coordinate as I .
Expression for the vertical distanceh(i , j , k) between I and Dpk
is
h(i , j , k) = y(pk)+x(pk)[y(pj)− y(pi )] + x(pj)y(pi )− x(pi )y(pj)
x(pi )− x(pj)
Dpi
Dpj
Dpk
I
h(i,j,k)
![Page 160: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/160.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Dualization
In the dual plane, the edge pipj becomesthe intersection point I of Dpi and Dpj .
The line l(i , j , k) becomes the point onDpk
having same x-coordinate as I .
Expression for the vertical distanceh(i , j , k) between I and Dpk
is
h(i , j , k) = y(pk)+x(pk)[y(pj)− y(pi )] + x(pj)y(pi )− x(pi )y(pj)
x(pi )− x(pj)
Dpi
Dpj
Dpk
I
h(i,j,k)
![Page 161: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/161.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Dualization
In the dual plane, the edge pipj becomesthe intersection point I of Dpi and Dpj .
The line l(i , j , k) becomes the point onDpk
having same x-coordinate as I .
Expression for the vertical distanceh(i , j , k) between I and Dpk
is
h(i , j , k) = y(pk)+x(pk)[y(pj)− y(pi )] + x(pj)y(pi )− x(pi )y(pj)
x(pi )− x(pj)
Dpi
Dpj
Dpk
I
h(i,j,k)
![Page 162: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/162.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Algorithm
We use the plane sweep method. Basicsteps are as follows.
Sweep a vertical line over thearrangement of n lines in the dual plane.
Here event points are the intersectionpoints between pairs of lines.
When sweep line reaches an event point,the intersection point between Dpi andDpj say, compute the vertical distances,along the sweep line, between the eventpoint and the lines just above and belowit.
Let the minimum distance occurs for theline Dpk
. Compute the minimum area ofthe triangle with pipj as base.
![Page 163: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/163.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Algorithm
We use the plane sweep method. Basicsteps are as follows.
Sweep a vertical line over thearrangement of n lines in the dual plane.
Here event points are the intersectionpoints between pairs of lines.
When sweep line reaches an event point,the intersection point between Dpi andDpj say, compute the vertical distances,along the sweep line, between the eventpoint and the lines just above and belowit.
Let the minimum distance occurs for theline Dpk
. Compute the minimum area ofthe triangle with pipj as base.
![Page 164: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/164.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Algorithm
We use the plane sweep method. Basicsteps are as follows.
Sweep a vertical line over thearrangement of n lines in the dual plane.
Here event points are the intersectionpoints between pairs of lines.
When sweep line reaches an event point,the intersection point between Dpi andDpj say, compute the vertical distances,along the sweep line, between the eventpoint and the lines just above and belowit.
Let the minimum distance occurs for theline Dpk
. Compute the minimum area ofthe triangle with pipj as base.
![Page 165: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/165.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Algorithm
We use the plane sweep method. Basicsteps are as follows.
Sweep a vertical line over thearrangement of n lines in the dual plane.
Here event points are the intersectionpoints between pairs of lines.
When sweep line reaches an event point,the intersection point between Dpi andDpj say, compute the vertical distances,along the sweep line, between the eventpoint and the lines just above and belowit.
Let the minimum distance occurs for theline Dpk
. Compute the minimum area ofthe triangle with pipj as base.
habove
hbelow
![Page 166: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/166.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Algorithm
We use the plane sweep method. Basicsteps are as follows.
Sweep a vertical line over thearrangement of n lines in the dual plane.
Here event points are the intersectionpoints between pairs of lines.
When sweep line reaches an event point,the intersection point between Dpi andDpj say, compute the vertical distances,along the sweep line, between the eventpoint and the lines just above and belowit.
Let the minimum distance occurs for theline Dpk
. Compute the minimum area ofthe triangle with pipj as base.
habove
hbelow
![Page 167: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/167.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Complexity
Observe that during sweep we need not store thearrangement. Moreover, at any instance, number of eventpoints stored in the event queue is O(n).
Hence space complexity of the algorithm is O(n).
Time complexity of the algorithm is, clearly, O(n2 log n).
The log n factor in the time complexity can be avoided byusing topological line sweep.(Edelsbrunner, H. and Guibas, L. J., 1989)
![Page 168: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/168.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Complexity
Observe that during sweep we need not store thearrangement. Moreover, at any instance, number of eventpoints stored in the event queue is O(n).
Hence space complexity of the algorithm is O(n).
Time complexity of the algorithm is, clearly, O(n2 log n).
The log n factor in the time complexity can be avoided byusing topological line sweep.(Edelsbrunner, H. and Guibas, L. J., 1989)
![Page 169: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/169.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Complexity
Observe that during sweep we need not store thearrangement. Moreover, at any instance, number of eventpoints stored in the event queue is O(n).
Hence space complexity of the algorithm is O(n).
Time complexity of the algorithm is, clearly, O(n2 log n).
The log n factor in the time complexity can be avoided byusing topological line sweep.(Edelsbrunner, H. and Guibas, L. J., 1989)
![Page 170: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/170.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Complexity
Observe that during sweep we need not store thearrangement. Moreover, at any instance, number of eventpoints stored in the event queue is O(n).
Hence space complexity of the algorithm is O(n).
Time complexity of the algorithm is, clearly, O(n2 log n).
The log n factor in the time complexity can be avoided byusing topological line sweep.(Edelsbrunner, H. and Guibas, L. J., 1989)
![Page 171: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/171.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Outline
1 Introduction
2 Definition and Properties
3 Convex Hull
4 Arrangement of Lines
5 Smallest Area Triangle
6 Nearest Neighbor of a Line
![Page 172: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/172.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Problem
Problem
Given a set P of n points in the plane and aquery line l , compute the nearest neighbor (inthe perpendicular distance sense) of the queryline l .
![Page 173: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/173.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Problem
Problem
Given a set P of n points in the plane and aquery line l , compute the nearest neighbor (inthe perpendicular distance sense) of the queryline l .
l
![Page 174: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/174.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Multi-shot Query
For a single query line, the problem can be solved in optimalO(n) time.
We are interested in multi-shot query version.
Here we are allowed to preprocess the point set so that eachquery can be answered efficiently.
![Page 175: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/175.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Multi-shot Query
For a single query line, the problem can be solved in optimalO(n) time.
We are interested in multi-shot query version.
Here we are allowed to preprocess the point set so that eachquery can be answered efficiently.
![Page 176: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/176.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Multi-shot Query
For a single query line, the problem can be solved in optimalO(n) time.
We are interested in multi-shot query version.
Here we are allowed to preprocess the point set so that eachquery can be answered efficiently.
![Page 177: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/177.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Strategy
We use duality to solve the problem.
Since our definition of duality does not allow vertical line, weneed to have separate algorithm for handling vertical querylines.
![Page 178: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/178.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Strategy
We use duality to solve the problem.
Since our definition of duality does not allow vertical line, weneed to have separate algorithm for handling vertical querylines.
![Page 179: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/179.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Nearest Neighbor Query Vertical Line
Sort the points of the given set P on theirx-coordinates. This can be done inO(n log n) time using O(n) space.
Using binary search find the position ofthe query vertical line x = α in the sortedarray. This will take O(log n) time.
Then a pair of scan from α towards leftand right determine the nearest neighborin constant time.
x = α
![Page 180: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/180.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Nearest Neighbor Query Vertical Line
Sort the points of the given set P on theirx-coordinates. This can be done inO(n log n) time using O(n) space.
Using binary search find the position ofthe query vertical line x = α in the sortedarray. This will take O(log n) time.
Then a pair of scan from α towards leftand right determine the nearest neighborin constant time.
x = α
![Page 181: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/181.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Nearest Neighbor Query Vertical Line
Sort the points of the given set P on theirx-coordinates. This can be done inO(n log n) time using O(n) space.
Using binary search find the position ofthe query vertical line x = α in the sortedarray. This will take O(log n) time.
Then a pair of scan from α towards leftand right determine the nearest neighborin constant time.
x = α
![Page 182: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/182.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Nearest Neighbor Query Vertical Line
Sort the points of the given set P on theirx-coordinates. This can be done inO(n log n) time using O(n) space.
Using binary search find the position ofthe query vertical line x = α in the sortedarray. This will take O(log n) time.
Then a pair of scan from α towards leftand right determine the nearest neighborin constant time.
x = α
![Page 183: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/183.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Farthest Neighbor Vertical Query Line
Same scheme can also be used fordetermining the farthest neighbor of aquery vertical line.
Here a pair of scan from the end points ofthe array will determine the farthestneighbor of the query vertical line x = α.
x = α
![Page 184: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/184.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Farthest Neighbor Vertical Query Line
Same scheme can also be used fordetermining the farthest neighbor of aquery vertical line.
Here a pair of scan from the end points ofthe array will determine the farthestneighbor of the query vertical line x = α.
x = α
![Page 185: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/185.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Farthest Neighbor Vertical Query Line
Same scheme can also be used fordetermining the farthest neighbor of aquery vertical line.
Here a pair of scan from the end points ofthe array will determine the farthestneighbor of the query vertical line x = α.
x = α
![Page 186: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/186.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Farthest Neighbor Vertical Query Line
Same scheme can also be used fordetermining the farthest neighbor of aquery vertical line.
Here a pair of scan from the end points ofthe array will determine the farthestneighbor of the query vertical line x = α.
x = α
![Page 187: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/187.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Result
Lemma
With O(n log n) preprocessing time using O(n) space, nearest andfarthest neighbors of a query vertical line can be found in O(log n)time.
![Page 188: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/188.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Farthest Neighbor of a Non-Vertical Query Line
Suppose the problem is to report the farthest neighbor of agiven query line which is non-vertical.
As the preprocessing step, compute the upper envelope andthe lower envelope of the set of lines dual to the given set ofpoints P. This can be done in in O(n log n) time using O(n)space as mentioned previously.
![Page 189: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/189.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Farthest Neighbor of a Non-Vertical Query Line
Suppose the problem is to report the farthest neighbor of agiven query line which is non-vertical.
As the preprocessing step, compute the upper envelope andthe lower envelope of the set of lines dual to the given set ofpoints P. This can be done in in O(n log n) time using O(n)space as mentioned previously.
![Page 190: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/190.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Farthest Neighbor of a Non-Vertical Query Line
Let Eu and El are the arrays storing theupper and the lower envelops respectively.
Given a query line l , shoot a vertical rayfrom the point Dl in upward anddownward direction and find theintersection points with the upper and thelower envelope respectively.
This can be done in O(log n) time byusing two binary searches on the arrays Eu
and El holding the envelopes.
![Page 191: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/191.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Farthest Neighbor of a Non-Vertical Query Line
Let Eu and El are the arrays storing theupper and the lower envelops respectively.
Given a query line l , shoot a vertical rayfrom the point Dl in upward anddownward direction and find theintersection points with the upper and thelower envelope respectively.
This can be done in O(log n) time byusing two binary searches on the arrays Eu
and El holding the envelopes.
![Page 192: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/192.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Farthest Neighbor of a Non-Vertical Query Line
Let Eu and El are the arrays storing theupper and the lower envelops respectively.
Given a query line l , shoot a vertical rayfrom the point Dl in upward anddownward direction and find theintersection points with the upper and thelower envelope respectively.
This can be done in O(log n) time byusing two binary searches on the arrays Eu
and El holding the envelopes.
![Page 193: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/193.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Result
Lemma
With O(n log n) preprocessing time using O(n) space, farthestneighbors of a query non-vertical line can be found in O(log n)time.
![Page 194: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/194.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Nearest Neighbor of a Query Non-vertical Line
Let L be the set of lines which are dual tothe points of the given set P. Also let Dl
be the point dual to to the querynon-vertical line l .
Let A(L) be the arrangement of lines ofthe set L.
Let f be the cell of the arrangement A(L)containing Dl .
Then one of the points corresponding tothe lines just above Dl is the nearestneighbor of l in the primal plane.
![Page 195: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/195.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Nearest Neighbor of a Query Non-vertical Line
Let L be the set of lines which are dual tothe points of the given set P. Also let Dl
be the point dual to to the querynon-vertical line l .
Let A(L) be the arrangement of lines ofthe set L.
Let f be the cell of the arrangement A(L)containing Dl .
Then one of the points corresponding tothe lines just above Dl is the nearestneighbor of l in the primal plane.
![Page 196: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/196.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Nearest Neighbor of a Query Non-vertical Line
Let L be the set of lines which are dual tothe points of the given set P. Also let Dl
be the point dual to to the querynon-vertical line l .
Let A(L) be the arrangement of lines ofthe set L.
Let f be the cell of the arrangement A(L)containing Dl .
Then one of the points corresponding tothe lines just above Dl is the nearestneighbor of l in the primal plane.
![Page 197: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/197.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Nearest Neighbor of a Query Non-vertical Line
Let L be the set of lines which are dual tothe points of the given set P. Also let Dl
be the point dual to to the querynon-vertical line l .
Let A(L) be the arrangement of lines ofthe set L.
Let f be the cell of the arrangement A(L)containing Dl .
Then one of the points corresponding tothe lines just above Dl is the nearestneighbor of l in the primal plane.
Dl
![Page 198: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/198.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Point Location Problem
Given an arrangement of lines A(L), the problem of findingthe component of A(L) containing a given query point p isknown as point location problem in computational geometry.
With standard data structure for storing an arrangement oflines, point location problem can be solved in optimalO(log n) time.
So with standard data structure, nearest neighbors of anon-vertical query line can be determined in O(log n) time.The reqired preprocessing time and space is O(n2).
Here we describe an algorithm for point location using levelsof arrangement.
![Page 199: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/199.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Point Location Problem
Given an arrangement of lines A(L), the problem of findingthe component of A(L) containing a given query point p isknown as point location problem in computational geometry.
With standard data structure for storing an arrangement oflines, point location problem can be solved in optimalO(log n) time.
So with standard data structure, nearest neighbors of anon-vertical query line can be determined in O(log n) time.The reqired preprocessing time and space is O(n2).
Here we describe an algorithm for point location using levelsof arrangement.
![Page 200: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/200.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Point Location Problem
Given an arrangement of lines A(L), the problem of findingthe component of A(L) containing a given query point p isknown as point location problem in computational geometry.
With standard data structure for storing an arrangement oflines, point location problem can be solved in optimalO(log n) time.
So with standard data structure, nearest neighbors of anon-vertical query line can be determined in O(log n) time.The reqired preprocessing time and space is O(n2).
Here we describe an algorithm for point location using levelsof arrangement.
![Page 201: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/201.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Point Location Problem
Given an arrangement of lines A(L), the problem of findingthe component of A(L) containing a given query point p isknown as point location problem in computational geometry.
With standard data structure for storing an arrangement oflines, point location problem can be solved in optimalO(log n) time.
So with standard data structure, nearest neighbors of anon-vertical query line can be determined in O(log n) time.The reqired preprocessing time and space is O(n2).
Here we describe an algorithm for point location using levelsof arrangement.
![Page 202: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/202.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Point Location Using Level Structure
First compute the levels of thearrangement A(L) in O(n2 log n) timeusing O(n2) space.
Let λθ be the linear array containingvertices and edges of level θ,θ = 0, 1, . . . , n, of the arrangement A(L).
Create a balanced binary search tree T ,called the primary structure, whose nodescorrespond to the levels θ, 0 ≤ θ ≤ n.Each node of T , representing a level θ, isattached with the corresponding array λθ,called the secondary structure. Thisrequires O(n log n) time and O(n) space.
λ 0
λ 1
λ 2
λ 3
λ 4λ 5
T
![Page 203: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/203.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Point Location Using Level Structure
First compute the levels of thearrangement A(L) in O(n2 log n) timeusing O(n2) space.
Let λθ be the linear array containingvertices and edges of level θ,θ = 0, 1, . . . , n, of the arrangement A(L).
Create a balanced binary search tree T ,called the primary structure, whose nodescorrespond to the levels θ, 0 ≤ θ ≤ n.Each node of T , representing a level θ, isattached with the corresponding array λθ,called the secondary structure. Thisrequires O(n log n) time and O(n) space.
λ 0
λ 1
λ 2
λ 3
λ 4λ 5
T
![Page 204: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/204.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Point Location Using Level Structure
Given the query line l , we perform twolevel binary search on the tree T with thepoint Dl .
This will enable us to locate the twoedges just above and below Dl .
Time complexity for performing this pointlocation is O(log2 n).
λ 0
λ 1
λ 2
λ 3
λ 4λ 5
T
![Page 205: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/205.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Point Location Using Level Structure
Given the query line l , we perform twolevel binary search on the tree T with thepoint Dl .
This will enable us to locate the twoedges just above and below Dl .
Time complexity for performing this pointlocation is O(log2 n).
λ 0
λ 1
λ 2
λ 3
λ 4λ 5
T
![Page 206: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/206.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Point Location Using Level Structure
Given the query line l , we perform twolevel binary search on the tree T with thepoint Dl .
This will enable us to locate the twoedges just above and below Dl .
Time complexity for performing this pointlocation is O(log2 n).
λ 0
λ 1
λ 2
λ 3
λ 4λ 5
T
![Page 207: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/207.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Complexity
Lemma
With O(n2 log n) preprocessing time and O(n2) space, nearestneighbor of a non-vertical query line can be determined inO(log2 n) time.
It may be mentioned that the query time complexity can bereduced to O(log n), by using a data structuring technique,called fractional cascading.(Lueker, G. S., 1978)
![Page 208: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/208.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Complexity
Lemma
With O(n2 log n) preprocessing time and O(n2) space, nearestneighbor of a non-vertical query line can be determined inO(log2 n) time.
It may be mentioned that the query time complexity can bereduced to O(log n), by using a data structuring technique,called fractional cascading.(Lueker, G. S., 1978)
![Page 209: Duality Transformation and its Applications to Computational Geometry](https://reader036.vdocuments.mx/reader036/viewer/2022071519/613c6252f237e1331c513ca6/html5/thumbnails/209.jpg)
Introduction Definitions Hull Arrangement Triangle Nearest Neighbor
Thank you!