![Page 1: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/1.jpg)
CG course, Lecture 10
Michal Kleinbort
Tel Aviv University, May 2019
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 1 / 45
![Page 2: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/2.jpg)
Outline
Optimal point locationNearest-neighbor search using kd-treesA glimpse of nearest-neighbor search in robot motion planning
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 2 / 45
![Page 3: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/3.jpg)
Outline
Optimal point locationNearest-neighbor search using kd-treesA glimpse of nearest-neighbor search in robot motion planning
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 2 / 45
![Page 4: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/4.jpg)
Planar Point Location - Definition
Let S be a planar subdivision consisting of faces, edges, and vertices
The Planar Point Location ProblemInput: Query point qOutput: The feature of S containing q
q
n - the number of subdivision edges
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 3 / 45
![Page 5: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/5.jpg)
Two Variants of the Trapezoidal Map RIC Point Location
Basic algorithm [Mulmuley ’90, Seidel ’91]I Expected O(log n) query timeI Expected O(n) sizeI Expected O(n log n) preprocessing time
Guaranteed variant [de Berg et al. ’00]I Guaranteed O(log n) query timeI Guaranteed O(n) sizeI Expected O(n log2 n) preprocessing time (?)
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 4 / 45
![Page 6: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/6.jpg)
The Basic RIC Point Location Algorithm
Description: Builds the trapezoidal-map using a randomized incrementalconstruction and maintains an auxiliary search-structure (DAG)
B
Dcv1
q1
p1
A
C
[Mulmuley ’90, Seidel’91]
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 5 / 45
![Page 7: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/7.jpg)
The Basic RIC Point Location Algorithm
Description: Builds the trapezoidal-map using a randomized incrementalconstruction and maintains an auxiliary search-structure (DAG)
B
DA
C
cv1(p1, q1)
B
Dcv1
q1
p1
A
C
[Mulmuley ’90, Seidel’91]
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 5 / 45
![Page 8: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/8.jpg)
The Basic RIC Point Location Algorithm
Description: Builds the trapezoidal-map using a randomized incrementalconstruction and maintains an auxiliary search-structure (DAG)
B
DA
C
cv1(p1, q1)
cv2(p2, q2)
B
Dcv1
q1
p1
A
C
[Mulmuley ’90, Seidel’91]
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 5 / 45
![Page 9: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/9.jpg)
The Basic RIC Point Location Algorithm
Description: Builds the trapezoidal-map using a randomized incrementalconstruction and maintains an auxiliary search-structure (DAG)
B
DA
C
cv1(p1, q1)
cv2(p2, q2)
B
D
A
C
p1
q1
cv1
[Mulmuley ’90, Seidel’91]
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 5 / 45
![Page 10: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/10.jpg)
The Basic RIC Point Location Algorithm
Description: Builds the trapezoidal-map using a randomized incrementalconstruction and maintains an auxiliary search-structure (DAG)
B
DA
E
cv1(p1, q1)
cv2(p2, q2)
F
HC
B
Dcv1
q1
p1
A
F
E
p2
cv2
HC
[Mulmuley ’90, Seidel’91]
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 5 / 45
![Page 11: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/11.jpg)
The Basic RIC Point Location Algorithm
Description: Builds the trapezoidal-map using a randomized incrementalconstruction and maintains an auxiliary search-structure (DAG)
B
DA
E
cv1(p1, q1)
cv2(p2, q2)
F
HC
B
Dcv1
q1
p1
A
F
E
p2
cv2
HC
[Mulmuley ’90, Seidel’91]
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 5 / 45
![Page 12: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/12.jpg)
The Basic RIC Point Location Algorithm
Description: Builds the trapezoidal-map using a randomized incrementalconstruction and maintains an auxiliary search-structure (DAG)
B
GA
E
cv1(p1, q1)
cv2(p2, q2)
F
HC HD
I B
cv1
q1
p1
A
F
E
p2
cv2
I
q2
cv2
GH
HC
D
[Mulmuley ’90, Seidel’91]
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 5 / 45
![Page 13: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/13.jpg)
The Basic RIC Point Location Algorithm
Description: Builds the trapezoidal-map using a randomized incrementalconstruction and maintains an auxiliary search-structure (DAG)
B
GA
E
cv1(p1, q1)
cv2(p2, q2)
F
HC HD
I
H
B
cv1
q1
p1
A
F
E
p2
cv2
I
q2
cv2
G
H
HH
C
D
[Mulmuley ’90, Seidel’91]
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 5 / 45
![Page 14: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/14.jpg)
Basic Algorithm [Mulmuley ’90, Seidel ’91] - Complexity
Expected O(log n) query time
Expected O(n) size
Expected O(n log n) preprocessing time
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 6 / 45
![Page 15: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/15.jpg)
Guaranteed O(log n) Query Time and O(n) SizeS - the size of the DAG
L - the length of the longest query path
The main idea:Construct the DAG using the basic algorithm with some randominsertion order
I Verify S on the fly (S can be accessed in O(1) time)I Abort and rebuild if S ≥ c1n
Verify that L ≤ c2 log n, rebuild otherwise
Only a constant number of rebuilds is expected
I The probability that L is bad is very smallI The probability that S is bad is very small
[de Berg et al.]
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 7 / 45
![Page 16: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/16.jpg)
Guaranteed O(log n) Query Time and O(n) SizeS - the size of the DAG
L - the length of the longest query path
The main idea:Construct the DAG using the basic algorithm with some randominsertion order
I Verify S on the fly (S can be accessed in O(1) time)I Abort and rebuild if S ≥ c1n
Verify that L ≤ c2 log n, rebuild otherwise
Only a constant number of rebuilds is expected
I The probability that L is bad is very smallI The probability that S is bad is very small
[de Berg et al.]
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 7 / 45
![Page 17: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/17.jpg)
Guaranteed O(log n) Query Time and O(n) SizeS - the size of the DAG
L - the length of the longest query path
The main idea:Construct the DAG using the basic algorithm with some randominsertion order
I Verify S on the fly (S can be accessed in O(1) time)I Abort and rebuild if S ≥ c1n
Verify that L ≤ c2 log n, rebuild otherwise
Only a constant number of rebuilds is expectedI The probability that L is bad is very smallI The probability that S is bad is very small
[de Berg et al.]
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 7 / 45
![Page 18: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/18.jpg)
Guaranteed O(log n) Query Time and O(n) Size
f (n) - Time to verify that L is logarithmic on a DAG of n curves
Overall expected time for construction: O(n log n + f (n))
It is unclear how to efficiently verify L:I Claim that the expected verification time is O(n log2 n)I No concrete proof is given
[de Berg et al.]
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 8 / 45
![Page 19: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/19.jpg)
Can We Efficiently Maintain L On-the-fly?
The best known solution requires Ω(n log n) size
Idea: Maintain the depth D of the DAG instead (easy to maintain)
D represents the length of the longest DAG path
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 9 / 45
![Page 20: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/20.jpg)
Can We Efficiently Maintain L On-the-fly?
The best known solution requires Ω(n log n) size
Idea: Maintain the depth D of the DAG instead (easy to maintain)
D represents the length of the longest DAG path
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 9 / 45
![Page 21: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/21.jpg)
Can We Efficiently Maintain L On-the-fly?
The best known solution requires Ω(n log n) size
Idea: Maintain the depth D of the DAG instead (easy to maintain)
D represents the length of the longest DAG path
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 9 / 45
![Page 22: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/22.jpg)
The Modified Algorithm Using D
The modified algorithm:Observe S and D during construction
Abort and rebuild structure if one of the following occurs:I S ≥ c1nI D ≥ c2 log n
for suitable constants c1, c2 > 0
D is not L
I Can we still expect a constant number of rebuilds?
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 10 / 45
![Page 23: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/23.jpg)
The Modified Algorithm Using D
The modified algorithm:Observe S and D during construction
Abort and rebuild structure if one of the following occurs:I S ≥ c1nI D ≥ c2 log n
for suitable constants c1, c2 > 0
D is not LI Can we still expect a constant number of rebuilds?
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 10 / 45
![Page 24: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/24.jpg)
The Difference between D and L
Reminder: D represents the length of the longest DAG path
Some DAG paths are not search pathsI D is an upper bound on LI D may be significantly larger than L
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 11 / 45
![Page 25: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/25.jpg)
The Difference between D and L
Reminder: D represents the length of the longest DAG path
Some DAG paths are not search pathsI D is an upper bound on LI D may be significantly larger than L
B
GA
E
cv1(p1, q1)
cv2(p2, q2)
F I
H
B
cv1
q1
p1
A
F
E
p2
cv2
I
q2
cv2
G
H
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 11 / 45
![Page 26: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/26.jpg)
The Difference between D and L
Reminder: D represents the length of the longest DAG path
Some DAG paths are not search pathsI D is an upper bound on LI D may be significantly larger than L
B
GA
E
cv1(p1, q1)
cv2(p2, q2)
F I
H
B
cv1
q1
p1
A
F
E
p2
cv2
I
q2
cv2
G
H
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 11 / 45
![Page 27: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/27.jpg)
The Difference between D and L
Reminder: D represents the length of the longest DAG path
Some DAG paths are not search pathsI D is an upper bound on LI D may be significantly larger than L
B
GA
E
cv1(p1, q1)
cv2(p2, q2)
F I
H
B
cv1
q1
p1
A
F
E
p2
cv2
I
q2
cv2
G
H
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 11 / 45
![Page 28: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/28.jpg)
The Difference between D and L
Reminder: D represents the length of the longest DAG path
Some DAG paths are not search pathsI D is an upper bound on LI D may be significantly larger than L
B
GA
E
cv1(p1, q1)
cv2(p2, q2)
F I
Jcv3(p3, q3) M
K
N
B
cv1
q1
p1
A
F
E
p2
cv2
I
q2
cv2
G
K
cv3
q3J
M
N
p3
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 11 / 45
![Page 29: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/29.jpg)
The Difference between D and L
Reminder: D represents the length of the longest DAG path
Some DAG paths are not search pathsI D is an upper bound on LI D may be significantly larger than L
B
GA
E
cv1(p1, q1)
cv2(p2, q2)
F I
Jcv3(p3, q3) M
K
N
B
cv1
q1
p1
A
F
E
p2
cv2
I
q2
cv2
G
K
cv3
q3J
M
N
p3
Longest Query Path - L
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 11 / 45
![Page 30: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/30.jpg)
The Difference between D and L
Reminder: D represents the length of the longest DAG path
Some DAG paths are not search pathsI D is an upper bound on LI D may be significantly larger than L
B
GA
E
cv1(p1, q1)
cv2(p2, q2)
F I
Jcv3(p3, q3) M
K
N
B
cv1
q1
p1
A
F
E
p2
cv2
I
q2
cv2
G
K
cv3
q3J
M
N
p3
Longest DAG Path - D
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 11 / 45
![Page 31: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/31.jpg)
The Difference between D and L
Reminder: D represents the length of the longest DAG path
Some DAG paths are not search pathsI D is an upper bound on LI D may be significantly larger than L
B
GA
E
cv1(p1, q1)
cv2(p2, q2)
F I
Jcv3(p3, q3) M
K
N
B
cv1
q1
p1
A
F
E
p2
cv2
I
q2
cv2
G
K
cv3
q3J
M
N
p3
Longest Query Path - LLongest DAG Path - D
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 11 / 45
![Page 32: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/32.jpg)
Towards a Worst-Case D/L Ratio
Top-to-bottom insertion order√
n blocks√
n segments in each block
D is Ω(n)
L is O(√
n)
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 12 / 45
![Page 33: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/33.jpg)
Towards a Worst-Case D/L Ratio
A
F
cv2(p2, q2)
cv3(p3, q3)
cv4(p4, q4)
M
I’
K BHG
C’ D’ E’
I D
cv1(p1, q1)
C
L
E
B
A
H
L
G
M
cv3
q3
p3
cv2
q2
p2
cv1
q1
p1
I+K
C
D
E+F
D is Ω(n)
L is O(√
n)
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 12 / 45
![Page 34: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/34.jpg)
Towards a Worst-Case D/L Ratio
A
K
cv1(p1, q1)
L
BHGC
cv4(p4, q4)
I
N
D
cv2(p2, q2)
cv3(p3, q3)M
EF
B
A
H
L
G
M
F
EI
D
C
q4
cv4
cv3
q3
p3
cv2
q2
p2
cv4
cv1
cv4cv4
p4
q1
p1
N
K I’
C’
D’
E’
D is Ω(n)
L is O(√
n)
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 12 / 45
![Page 35: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/35.jpg)
Towards a Worst-Case D/L Ratio
This construction ensures that each newly inserted segment intersectsthe trapezoid with the largest depth
A query can skip an entire block using only one comparison
Within the relevant block there are at most O(√
n) comparisons
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 12 / 45
![Page 36: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/36.jpg)
Worst-Case D/L Ratio
Top-to-bottom insertion order
D is Ω(n)
L is O(log n)I Achieved due to the recursive structure
n2
n4
n8
O(log n)
Theorem 1The worst-case ratio between D and L is Ω(n/log n)and this bound is tight.
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 13 / 45
![Page 37: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/37.jpg)
Worst-Case D/L Ratio
Top-to-bottom insertion order
D is Ω(n)
L is O(log n)I Achieved due to the recursive structure
n2
n4
n8
O(log n)
Theorem 1The worst-case ratio between D and L is Ω(n/log n)and this bound is tight.
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 13 / 45
![Page 38: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/38.jpg)
An Open Problem
Suppose that the structure is rebuilt whenever either the depth D orthe size S exceed some thresholds.
Can we still expect a constant number of rebuilds?
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 14 / 45
![Page 39: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/39.jpg)
Guaranteed logarithmic PL
In [Hemmer et al.] it is shown that:
LemmaThe length L in a linear size DAG can be verified in O(n log n) time.
Theorem 2A point location data structure for a planar subdivision with n edges,which has O(n) size and O(log n) query time in the worst case, can bebuilt in expected O(n log n) time.
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 15 / 45
![Page 40: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/40.jpg)
Outline
Optimal point locationNearest-neighbor search using kd-treesA glimpse of nearest-neighbor search in robot motion planning
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 16 / 45
![Page 41: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/41.jpg)
Outline
Optimal point locationNearest-neighbor search using kd-treesA glimpse of nearest-neighbor search in robot motion planning
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 16 / 45
![Page 42: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/42.jpg)
NN search problem using kd-tree
Given:I a kd-tree whose root node is rootI a query point q
Find the closest point to q among all points kept in the tree leaves
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 17 / 45
![Page 43: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/43.jpg)
We use slides from CSE373 course, 2002, University of Washingtonhttps://courses.cs.washington.edu/courses/cse373/02au/
lectures/lecture22l.pdf
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 18 / 45
![Page 44: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/44.jpg)
Outline
Optimal point locationNearest-neighbor search using kd-treesA glimpse of nearest-neighbor search in robot motion planning
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 19 / 45
![Page 45: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/45.jpg)
Outline
Optimal point locationNearest-neighbor search using kd-treesA glimpse of nearest-neighbor search in robot motion planning
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 19 / 45
![Page 46: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/46.jpg)
A robot
A mechanical device, equipped with actuators and sensors, that iscontrolled by a computing systemOperates in a real-world workspace, populated by physical objectsPerforms tasks by executing motions in the workspaceAn autonomous robot is required to plan its own motionsautomatically in order to achieve a given task
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 20 / 45
![Page 47: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/47.jpg)
Some examples
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 21 / 45
![Page 48: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/48.jpg)
The motion-planning problem
Given:A robot RA workspace W (with obstacles)Initial and final positions
Goal:Plan a collision-free continuous path forthe robot from the initial position to thefinal position
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 22 / 45
![Page 49: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/49.jpg)
A configuration of the robotA configuration of the robot is represented by a set of parameters, e.g.,(x , y ,Θ1,Θ2,Θ3)
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 23 / 45
![Page 50: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/50.jpg)
The dimensionThe dimension of the motion-planning problem is defined by the length ofeach configuration
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 24 / 45
![Page 51: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/51.jpg)
An alternative formulation of the MP problem
Given:A point robotA d-dimensional configuration space X (C-space)C-obstacles (often not explicitly given) Cforb
Free space Cfree = X \ Cforb
Initial and final configurations (d-dimensional points)Goal:
Plan a continuous path in the free space from the initial configurationto the final configuration
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 25 / 45
![Page 52: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/52.jpg)
Challenges
High-dimensional problems are “hard” tosolveFinding an optimal path is harder thanfinding a path
I minimal path lengthI maximal distance from obstaclesI smoothness
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 26 / 45
![Page 53: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/53.jpg)
Sampling-based methods for solving the problem
Attempt to capture the structure of the C-space by constructing agraph (called a roadmap)
I The nodes are collision-free configurations sampled at randomI Two nearby nodes are connected by an edge if the path between them
(usually a straight line) is collision-freeAre often probabilistically completeNovel methods also ensure asymptotic optimality
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 27 / 45
![Page 54: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/54.jpg)
Primitive operations in sampling-based methods
Collision detection (CD)I Determines whether a configuration or a C-space path between two
configurations is collision-free. The latter is termed local planning (LP)I Complexity usually depends on both the complexity of the workspace
obstacles and the complexity of the robotNearest-neighbor search (NN)
I Returns the nearest neighbor (or neighbors) of a given configurationI Complexity depends on the number n of nodes and the dimension d
The main practical computational bottleneck is typically considered to beCD (including LP)
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 28 / 45
![Page 55: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/55.jpg)
An example: s-PRM* [Karaman and Frazzoli, 11]
The Probabilistic Roadmap Method (PRM) - Multi-query algorithm
Query: Givenstart and goal configurations, find the shortest path betweenthe two configurations
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 29 / 45
![Page 56: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/56.jpg)
An example: s-PRM* [Karaman and Frazzoli, 11]
The Probabilistic Roadmap Method (PRM) - Multi-query algorithm
Query: Givenstart and goal configurations, find the shortest path betweenthe two configurations
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 29 / 45
![Page 57: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/57.jpg)
An example: s-PRM* [Karaman and Frazzoli, 11]
The Probabilistic Roadmap Method (PRM) - Multi-query algorithm
Involves CD operationQuery: Given configurations, find the shortest path h
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 29 / 45
![Page 58: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/58.jpg)
An example: s-PRM* [Karaman and Frazzoli, 11]
The Probabilistic Roadmap Method (PRM) - Multi-query algorithm
Query: Givenstart and goal configurations, find the shortest path betweenthe two configurations
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 29 / 45
![Page 59: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/59.jpg)
An example: s-PRM* [Karaman and Frazzoli, 11]
The Probabilistic Roadmap Method (PRM) - Multi-query algorithm
r
Involves NN operation (r -nearest neighbors or k-nearest neighbors)rPRM∗ (n) = 2
[(1 + 1
d
)·(µ(Cfree)ζd
)·(
log nn
)]1/d
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 29 / 45
![Page 60: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/60.jpg)
An example: s-PRM* [Karaman and Frazzoli, 11]
The Probabilistic Roadmap Method (PRM) - Multi-query algorithm
k = O(log n)
Involves NN operation (r -nearest neighbors or k-nearest neighbors)kPRM∗(n) = 2e log n
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 29 / 45
![Page 61: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/61.jpg)
An example: s-PRM* [Karaman and Frazzoli, 11]
The Probabilistic Roadmap Method (PRM) - Multi-query algorithm
Involves CD operation (as an LP sub-procedure)Query: Given configurations, find the shortest path h
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 29 / 45
![Page 62: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/62.jpg)
An example: s-PRM* [Karaman and Frazzoli, 11]
The Probabilistic Roadmap Method (PRM) - Multi-query algorithm
Involves CD operation (as an LP sub-procedure)Query: Given configurations, find the shortest path h
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 29 / 45
![Page 63: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/63.jpg)
An example: s-PRM* [Karaman and Frazzoli, 11]
The Probabilistic Roadmap Method (PRM) - Multi-query algorithm
Query: Givenstart and goal configurations, find the shortest path betweenthe two configurations
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 29 / 45
![Page 64: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/64.jpg)
An example: s-PRM* [Karaman and Frazzoli, 11]
The Probabilistic Roadmap Method (PRM) - Multi-query algorithm
Query: Givenstart and goal configurations, find the shortest path betweenthe two configurations
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 29 / 45
![Page 65: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/65.jpg)
An example: s-PRM* [Karaman and Frazzoli, 11]
The Probabilistic Roadmap Method (PRM) - Multi-query algorithm
Query: Given start and goal configurations, find the shortest path betweenthe two configurations
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 29 / 45
![Page 66: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/66.jpg)
An example: s-PRM* [Karaman and Frazzoli, 11]
The Probabilistic Roadmap Method (PRM) - Multi-query algorithm
Query: Given start and goal configurations, find the shortest path betweenthe two configurations
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 29 / 45
![Page 67: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/67.jpg)
Sampling-based planners
single-robot planners
LBT-RRT MPLB
FMT*RRG
PRM
BTT
dRRT dRRT*M*
multi-robot planners
length cost
bottleneckcost
BFMT*
SPARS2RSEC
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 30 / 45
![Page 68: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/68.jpg)
Our results [K., Salzman and Halperin ’15, ’16]
We formally prove that the complexity of NN search dominates theasymptotic running time of several AO algorithms
We characterize settings in which the role of NN is far from negligibleand show experimentally that NN may dominate CD after finite time
We use an efficient, specifically-tailored NN data structure in suchsettings to reduce the overall time of motion-planning algorithms
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 31 / 45
![Page 69: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/69.jpg)
Our results [K., Salzman and Halperin ’15, ’16]
We formally prove that the complexity of NN search dominates theasymptotic running time of several AO algorithmsWe characterize settings in which the role of NN is far from negligibleand show experimentally that NN may dominate CD after finite time
We use an efficient, specifically-tailored NN data structure in suchsettings to reduce the overall time of motion-planning algorithms
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 31 / 45
![Page 70: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/70.jpg)
NN-sensitive settings
Can be of the following types:Algorithms: Planners that algorithmically shift some of thecomputational weight from CD to NNScenarios: Scenarios in which the computational cost of certainplanners is mostly due to NN searchParameters: Parameters’ values for which the computational cost ofcertain planners is mostly due to NN search
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 32 / 45
![Page 71: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/71.jpg)
NN-sensitive algorithmsWe measure the ratio χALG(N) between the overall time spent on NN andthe time spent on CD, after N configurations were sampled, whenalgorithm ALG is used
0.00.20.40.60.81.01.21.41.6
MPL
B(N
)
0 5 10 15 20 25 30Number of samples (in thousands)
Using NN-sensitive algorithms (e.g., Lazy-PRM* [Hauser ’15],MPLB [Salzman and Halperin ’15] etc.), the ratio χALG(N) significantlyincreases as a function of N, obtaining values greater than 1, namely, NNtakes more time than CD
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 33 / 45
![Page 72: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/72.jpg)
NN-sensitive scenarios
Let S = (W,R) denote a scenario, where:I W denotes the workspaceI R denotes the robot system, which is a set of ` single
constant-description complexity robots operating simultaneouslyLet d denote the dimension of S, d = Θ(`)Let m denote the complexity of the workspace obstaclesRobot-robot collisions should be taken into account as well
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 34 / 45
![Page 73: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/73.jpg)
NN-sensitive scenarios - The effect of dsPRM* example:
When d is gradually increased, the ratio χsPRM*(N):I Shows an initial increaseI Then shows a possible decreaseI Finally, tends to some constant value
R-NN
0.0
0.5
1.0
1.5
2.0
2.5
sPR
M*(
N)
5 10 15 20 25 30 35 40 45 50Dimension
rNN, = 0.5rNN, = 0.25rNN, = 0
d-dimensional workspaceµ is the obstacle volume
start end
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 35 / 45
![Page 74: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/74.jpg)
NN-sensitive scenarios - The effect of dsPRM* example:
When d is gradually increased, the ratio χsPRM*(N):I Shows an initial increaseI Then shows a possible decreaseI Finally, tends to some constant value
K-NN: shows a different trend
0
9
18
27
36
45
sPR
M*(
N)
5 10 15 20 25 30 35 40 45 50Dimension
kNN, = 0.5kNN, = 0.25kNN, = 0
d-dimensional workspaceµ is the obstacle volume
start end
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 35 / 45
![Page 75: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/75.jpg)
Adapting all-pairs rNN algorithms for sampling-basedmotion planning
In several planning algorithms “all-pairs” r -NN are used with apredefined value r(n) = O(( log n
n )1/d )Randomly transformed grids (RTG) [Aiger et al., 14] is a novelmethod for approximate all-pairs r -NNWe implemented RTG and used it for certain sampling-basedalgorithmsWe obtain significant speedups improving: the construction time, thetime to find an initial solution, and the time to converge tohigh-quality solutions
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 36 / 45
![Page 76: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/76.jpg)
Randomly transformed grids (RTG) [Aiger et al., 14]Given a set P of n points in Rd and a radius r , RTG reports all-pairsof points p, q ∈ P such that ||p − q||2 ≤ r , with high probabilityThe algorithm:
1 Place a d-dimensional axis-parallel grid of cell size c with a randomshift (chosen uniformly)
2 The points of P are partitioned into the grid cells3 The distance ||p − q||2 between every pair of points p, q ∈ P within the
same cell is computed, and the pair is reported if ||p − q||2 ≤ r4 Repeat steps (1)-(3) m times, producing m distinct grids
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 37 / 45
![Page 77: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/77.jpg)
Randomly transformed grids (RTG) [Aiger et al., 14]Given a set P of n points in Rd and a radius r , RTG reports all-pairsof points p, q ∈ P such that ||p − q||2 ≤ r , with high probabilityThe algorithm:
1 Place a d-dimensional axis-parallel grid of cell size c with a randomshift (chosen uniformly)
2 The points of P are partitioned into the grid cells3 The distance ||p − q||2 between every pair of points p, q ∈ P within the
same cell is computed, and the pair is reported if ||p − q||2 ≤ r4 Repeat steps (1)-(3) m times, producing m distinct grids
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 37 / 45
![Page 78: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/78.jpg)
Randomly transformed grids (RTG) [Aiger et al., 14]Given a set P of n points in Rd and a radius r , RTG reports all-pairsof points p, q ∈ P such that ||p − q||2 ≤ r , with high probabilityThe algorithm:
1 Place a d-dimensional axis-parallel grid of cell size c with a randomshift (chosen uniformly)
2 The points of P are partitioned into the grid cells3 The distance ||p − q||2 between every pair of points p, q ∈ P within the
same cell is computed, and the pair is reported if ||p − q||2 ≤ r4 Repeat steps (1)-(3) m times, producing m distinct grids
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 37 / 45
![Page 79: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/79.jpg)
Randomly transformed grids (RTG) [Aiger et al., 14]Given a set P of n points in Rd and a radius r , RTG reports all-pairsof points p, q ∈ P such that ||p − q||2 ≤ r , with high probabilityThe algorithm:
1 Place a d-dimensional axis-parallel grid of cell size c with a randomshift (chosen uniformly)
2 The points of P are partitioned into the grid cells3 The distance ||p − q||2 between every pair of points p, q ∈ P within the
same cell is computed, and the pair is reported if ||p − q||2 ≤ r4 Repeat steps (1)-(3) m times, producing m distinct grids
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 37 / 45
![Page 80: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/80.jpg)
Randomly transformed grids (RTG) [Aiger et al., 14]Given a set P of n points in Rd and a radius r , RTG reports all-pairsof points p, q ∈ P such that ||p − q||2 ≤ r , with high probabilityThe algorithm:
1 Place a d-dimensional axis-parallel grid of cell size c with a randomshift (chosen uniformly)
2 The points of P are partitioned into the grid cells3 The distance ||p − q||2 between every pair of points p, q ∈ P within the
same cell is computed, and the pair is reported if ||p − q||2 ≤ r4 Repeat steps (1)-(3) m times, producing m distinct grids
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 37 / 45
![Page 81: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/81.jpg)
Factors determining the efficiency
1 The number m of grids:I Increasing m increases the probability of capturing true near neighbors
in the same cellI Increasing m increases the overall running time
2 The cell size c:I Large c increases the probability of capturing true near neighbors in the
same cellI Small c causes the ratio between the overall number of inspected pairs
and the output size to be close to 1 (reduces the portion of irrelevantchecks)
c should be greater than (but very close to) r when a random shift is used
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 38 / 45
![Page 82: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/82.jpg)
Experimental results
Improved construction time (3D Euclidean C-space)
In the above scenario for n = 50K we managed to always find a solution.The number of reported NN pairs was ∼ 400K .
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 39 / 45
![Page 83: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/83.jpg)
Experimental results
Faster convergence to high-quality solutions (6D non-Euclidean C-space)
In the above scenario for n = 50K we managed to always find a solution.The number of reported NN pairs was ∼ 400K .
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 39 / 45
![Page 84: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/84.jpg)
Experimental results
Shorter times for finding an initial solution (6D Euclidean C-space)
In the above scenario for n = 50K we managed to always find a solution.The number of reported NN pairs was ∼ 400K .
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 39 / 45
![Page 85: CG course, Lecture 10 - Computational Geometryacg.cs.tau.ac.il/courses/computational-geometry/spring-2019/main.pdf · cv 2 I q 2 cv 2 G H Michal Kleinbort (TAU) CG Course, Lecture](https://reader033.vdocuments.site/reader033/viewer/2022050220/5f65c6c1deb8c035a342d56f/html5/thumbnails/85.jpg)
The End
Michal Kleinbort (TAU) CG Course, Lecture 10 May, 2019 40 / 45