geodesics - github pages · all-pairs distances xin, ying, and he. “constant-time all-pairs...

40
Geodesics Instructor: Hao Su

Upload: others

Post on 26-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

GeodesicsInstructor: Hao Su

Page 2: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Geodesic Distances

Extrinsically close

Intrinsically far

Page 3: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Geodesic distance [jee-uh-des-ik dis-tuh-ns]:Length of the shortest path, constrained not to leave the manifold.

Page 4: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Complicated Problem

Local minimaStraightest Geodesics on Polyhedral Surfaces (Polthier and Schmies)

Page 5: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Related Queries

Single source

Multi-source All-pairs

Locally OK

https://www.ceremade.dauphine.fr/~peyre/teaching/manifold/tp3.html http://www.sciencedirect.com/science/article/pii/S0010448511002260

Page 6: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Computer Scientists’ Approach

Meshes are graphshttp://www.cse.ohio-state.edu/~tamaldey/isotopic.html

Approximate geodesics as paths along

edges

Page 7: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Pernicious Test Case

Page 8: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Pernicious Test Case

Page 9: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Pernicious Test Case

Page 10: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Distances

Page 11: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Conclusion 1

Graph shortest-path does not converge to

geodesic distance.Often an acceptable

approximation.

Page 12: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Conclusion 2

Geodesic distances need special discretization.

So, we need to understand the theory!

\begin{math}

Page 13: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Three Possible Definitions• Globally shortest path

• Local minimizer of length

• Locally straight path

Not the same!

Page 14: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Arc LengthRecall:

Page 15: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Energy of a Curve

Easier to work with:

Equality exactly when parameterized by arc length. Proof on board.

Page 16: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field
Page 17: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field
Page 18: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

First Variation of Arc Length

Lemma. Let be a family of curves with fixed endpoints in surface S; assume is parameterized by arc length at t=0. Then,

Corollary. is a geodesic iff

γγ

γ

Page 19: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Intuition• The only acceleration is out of the surface• No steering wheel!

Page 20: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Two Local Perspectives

Page 21: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Instability of Geodesics

http://parametricwood2011.files.wordpress.com/2011/01/cone-with-three-geodesics.png

Locally minimizing distance is not enough to be a

shortest path!

Page 22: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

\end{math}

Page 23: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Starting Point for Algorithms

Graph shortest path algorithms arewell-understood.

Can we use them (carefully) to compute geodesics?

Page 24: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Useful Principles

“Shortest path had to come from somewhere.”

“All pieces of a shortest path are optimal.”

Page 25: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Dijkstra’s Algorithm

Initialization:

Page 26: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Dijkstra’s Algorithm

Iteration k:

Inductive proof:

During each iteration, S remains optimal.

Page 27: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Advancing Fronts

CS 468, 2009

Page 28: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Example

http://www.iekucukcay.com/wp-content/uploads/2011/09/dijkstra.gif

Page 29: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Fast Marching

Dijkstra’s algorithm, modified to approximate geodesic distances.

Page 30: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Problem

Page 31: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Planar Front Approximation

http://research.microsoft.com/en-us/um/people/hoppe/geodesics.pdf

Source point

Front looks flat!

Page 32: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

At Local Scale

Page 33: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Fast Marching vs. Dijkstra•Modified update step

•Update all triangles adjacent to a given vertex

Page 34: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Fast Marching Algorithm

• At and stores the shortest paths and

• Question: shortest path at

x1 x2d1 d2

d3x3

x1 x2

x3

Source point

Page 35: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Fast Marching Algorithm

• Solution:• On the plane containing

, build a “virtual” source point

△ x1x2x3

x1 x2

x3

Virtual source point

d1 d2

d3

Page 36: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Modifying Fast Marching

Grids and parameterized surfacesBronstein, Numerical Geometry of Nonrigid Shapes

Raster scan and/or

parallelize

Page 37: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Tracing Geodesic Curves

Trace gradient of distance function

Page 38: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Practical Implementation

http://code.google.com/p/geodesic/

Page 39: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

All-Pairs Distances

Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012.

Sample points Geodesic field Triangulate (Delaunay) Fix edges

Query (planar embedding)

Page 40: Geodesics - GitHub Pages · All-Pairs Distances Xin, Ying, and He. “Constant-time all-pairs geodesic distance query on triangle meshes.” I3D 2012. Sample points Geodesic field

Geodesic Voronoi & Delaunay

From Geodesic Methods in Computer Vision and Graphics (Peyré et al., FnT 2010)