67
IFT 6112 17 - GEODESICS http://www-labs.iro.umontreal.ca/~bmpix/teaching/6112/2018/ Mikhail Bessmeltsev

17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

IFT 611217 - GEODESICS

http://www-labs.iro.umontreal.ca/~bmpix/teaching/6112/2018/

Mikhail Bessmeltsev

Page 2: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Geodesic Distance

Extrinsically closeIntrinsically far

Page 3: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Geodesic Distance

Small Euclidean distanceLarge geodesic distance

Length of a shortest path on a surface

Page 4: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Geodesics

Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies)

Locally shortestNon-unique!

Page 5: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Possible questions

Single source

Multi-source All-pairshttps://www.ceremade.dauphine.fr/~peyre/teaching/manifold/tp3.html http://www.sciencedirect.com/science/article/pii/S0010448511002260

Locally shortest

Page 6: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Mesh ~ Graphfind shortest path?

http://www.cse.ohio-state.edu/~tamaldey/isotopic.html

Page 7: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Mesh ~ Graphfind shortest path?

Page 8: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Mesh ~ Graphfind shortest path?

Page 9: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Mesh ~ Graphfind shortest path?

Page 10: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Mesh ~ Graphfind shortest path?

May not convergeunder refinement

Page 11: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Mesh ~ Graphfind shortest path?

Page 12: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Mesh ~ Graphfind shortest path?

http://www.cse.ohio-state.edu/~tamaldey/isotopic.html

No, but for a good mesh, it may

be a good approximation

Page 13: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

How to discretize geodesic distance?

Page 14: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Euclidean Space

• Globally shortest path

• Local minimizer of length

• Locally straight path

Page 15: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Surfaces: choose one

• Globally shortest path

• Local minimizer of length

• Locally straight path

Page 16: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Surfaces: choose one

• Globally shortest path

• Local minimizer of length

• Locally straight path

Let’s find

Page 17: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Arc Length

�𝑎𝑎

𝑏𝑏‖𝛾𝛾′ 𝑡𝑡 ‖𝑑𝑑𝑡𝑡

Page 18: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Wouldn’t it be nice?

�𝑎𝑎

𝑏𝑏𝛾𝛾′ 𝑡𝑡 2𝑑𝑑𝑡𝑡

Page 19: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Energy of a Curve

= when parameterized by arc length.

Not the length, but turns out we can optimize it instead!

𝐿𝐿 = �𝑎𝑎

𝑏𝑏‖𝛾𝛾′ 𝑡𝑡 ‖𝑑𝑑𝑡𝑡

Note: we do not assume arclength parameterization

𝐸𝐸 =12�𝑎𝑎

𝑏𝑏𝛾𝛾′ 𝑡𝑡 2𝑑𝑑𝑡𝑡

Page 20: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

First Variation of Arc Length

Lemma. Let 𝛾𝛾𝑡𝑡: a, b → 𝑆𝑆 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 21: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Intuition

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

Page 22: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Intuition

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

Page 23: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Two Local Perspectives

• Boundary value problem– Given: 𝜸𝜸 𝟎𝟎 ,𝜸𝜸(𝟏𝟏)

• Initial value problem (ODE)– Given: 𝜸𝜸 𝟎𝟎 ,𝜸𝜸𝜸(𝟎𝟎)

Page 24: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Exponential Map

𝜸𝜸𝒗𝒗 𝟏𝟏 where 𝜸𝜸𝒗𝒗 is (unique) geodesic

from p with velocity v.

https://en.wikipedia.org/wiki/Exponential_map_(Riemannian_geometry)

Page 25: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

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 26: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Eikonal Equation

https://www.mathworks.com/matlabcentral/fileexchange/24827-hamilton-jacobi-solver-on-unstructured-triangular-grids/content/HJB_Solver_Package/@SolveEikonal/SolveEikonal.m

Page 27: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

\end{math}

Page 28: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Starting Point for Algorithms

Graph shortest path algorithms arewell-understood.

Can we use them (carefully) to compute geodesics?

Page 29: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Useful Principles

“Shortest path had to come from somewhere.”

“All pieces of a shortest path are optimal.”

Page 30: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Dijkstra’s Algorithm

Initialization:

Page 31: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Dijkstra’s Algorithm

Iteration k:

During each iteration, Sremains optimal.

Page 32: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Advancing Fronts

CS 468, 2009

Page 33: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Example

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

Page 34: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Example

(Wikipedia)

Page 35: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Fast Marching

Approximately solving Eikonalequation with a (modified)

Dijkstra algorithm

Page 36: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Problem

Page 37: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Planar Front Approximation

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

Page 38: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

At Local Scale

Page 39: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Fast Marching: Update Step

Vertex 𝑥𝑥 updated from triangle ∋ 𝑥𝑥

Distance computed from the other triangles vertices

Image from Bronstein et al., Numerical Geometry of Nonrigid Shapes

Page 40: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Planar Calculations

Given:

Find:

Derivation from Bronstein et al., Numerical Geometry of Nonrigid Shapes

𝑥𝑥2

𝑥𝑥1

𝑛𝑛

𝑑𝑑 = 𝑋𝑋𝑇𝑇𝑛𝑛 + 𝑝𝑝𝟏𝟏2×1

Page 41: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Planar Calculations

Page 42: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Planar Calculations

Quadratic equation for p

Find:

Page 43: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Two Roots

Bronstein et al., Numerical Geometry of Nonrigid Shapes

Two orientations for the normal

Page 44: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Larger Root: Consistent

Two orientations for the normalBronstein et al., Numerical Geometry of Nonrigid S

Page 45: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Additional Issue

Front from outside the triangle

Update should be from a different

triangle!

Bronstein et al., Numerical Geometry of Nonrigid S

Page 46: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Condition for Front Direction

Front from outside the triangleBronstein et al., Numerical Geometry of Nonrigid S

Page 47: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Obtuse Triangles

Must reach x3 after x1 and x2

Bronstein et al., Numerical Geometry of Nonrigid S

Page 48: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Fixing the Issues

• Alternative edge-based update:

• Add connections as needed[Kimmel and Sethian 1998]

Page 49: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Summary: Update Step

Bronstein, Numerical Geometry of Nonrigid S

Page 50: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Fast Marching vs. Dijkstra

• Modified update step

• Update all triangles adjacent to a given vertex

Page 51: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Eikonal Equation

Greek: “Image”

Solutions are geodesic distance

Page 52: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

STILL AN APPROXIMATION

Page 53: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Modifying Fast Marching

[Novotni and Klein 2002]:Circular wavefront

Page 54: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Modifying Fast Marching

Grids and parameterized surfacesBronstein, Numerical Geometry of Nonrigid Shapes

Raster scan

and/or parallelize

Page 55: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Alternative to Eikonal Equation

Crane, Weischedel, and Wardetzky. “Geodesics in Heat.” TOG 2013.

Page 56: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Tracing Geodesic Curves

Trace gradient of distance function

Page 57: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Initial Value Problem

Trace a single geodesic exactly

Equal left and right angles

Polthier and Schmies. “Shortest Geodesics on Polyhedral Surfaces.” SIGGRAPH course notes 2006.

Page 58: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Exact Geodesics

Page 59: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

MMP Algorithm: Big Idea

Surazhsky et al. “Fast Exact and Approximate Geodesics on Meshes.” SIGGRAPH 2005.

Dijkstra-style front with windows

explaining source.

Page 60: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Practical Implementation

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

Page 61: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Fuzzy Geodesics

Stable version of geodesic distance

Function on surface expressing difference in triangle inequality

“Intersection” by pointwise multiplication

Sun, Chen, Funkhouser. “Fuzzy geodesics and consistent sparse correspondences for deformable

shapes.” CGF2010.

Page 62: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Stable Measurement

Campen and Kobbelt. “Walking On Broken Mesh: Defect-Tolerant Geodesic Distances and Parameterizations.” Eurographics 2011.

Morphological operators to fill holes rather than remeshing

Page 63: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

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 64: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

Geodesic Voronoi & Delaunay

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

Page 65: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

High-Dimensional Problems

Heeren et al. Time-discrete geodesics in the space of shells. SGP 2012.

Page 66: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

In ML: Be Careful!

Page 67: 17 - GEODESICSbmpix/teaching/6112/2018/lectures/17... · Geodesics Straightest Geodesics on Polyhedral Surfaces (Polthier and Schmies) Locally shortest

In ML: Be Careful!