stanford09 discrete geometry -...

32
Discrete geometry Lecture 2 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book Numerical geometry of non-rigid shapes Stanford University, Winter 2009

Upload: others

Post on 13-Jul-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

Discrete geometry

Lecture 2

© Alexander & Michael Bronstein

tosca.cs.technion.ac.il/book

Numerical geometry of non-rigid shapes

Stanford University, Winter 2009

Page 2: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

The world is continuous,

but the mind is discrete

David Mumford

‘‘‘‘

Page 3: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

3Numerical geometry of non-rigid shapes Discrete geometry

Discretization

� Surface

� Metric

� Topology

� Sampling

� Discrete metric (matrix of

distances)

� Discrete topology (connectivity)

Continuous world Discrete world

Page 4: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

4Numerical geometry of non-rigid shapes Discrete geometry

How good is a sampling?

Page 5: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

5Numerical geometry of non-rigid shapes Discrete geometry

Sampling density

� How to quantify density of sampling?

� is an -covering of if

Alternatively:

for all , where

is the point-to-set distance.

Page 6: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

6Numerical geometry of non-rigid shapes Discrete geometry

Sampling efficiency

Also an r-covering!

� Are all points necessary?

� An -covering may be unnecessarily

dense (may even not be a discrete set).

� Quantify how well the

samples are separated.

� is -separated if

for all .

� For , an -separated

set is finite if is compact.

Page 7: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

7Numerical geometry of non-rigid shapes Discrete geometry

Farthest point sampling

� Good sampling has to be dense and efficient at the same time.

� Find and -separated -covering of .

� Achieved using farthest point sampling.

� We defer the discussion on

� How to select ?

� How to compute ?

Page 8: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

8Numerical geometry of non-rigid shapes Discrete geometry

Farthest point sampling

Farthest point

Page 9: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

9Numerical geometry of non-rigid shapes Discrete geometry

Farthest point sampling

� Start with some .

� Determine sampling radius

� If stop.

� Find the farthest point from

� Add to

Page 10: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

10Numerical geometry of non-rigid shapes Discrete geometry

Farthest point sampling

� Outcome: -separated -covering of .

� Produces sampling with progressively increasing density.

� A greedy algorithm: previously added points remain in .

� There might be another -separated -covering containing less points.

� In practice used to sub-sample a densely sampled shape.

� Straightforward time complexity:

number of points in dense sampling, number of points in .

� Using efficient data structures can be reduced to .

Page 11: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

11Numerical geometry of non-rigid shapes Discrete geometry

Sampling as representation

� Sampling represents a region on as a single point .

� Region of points on closer to than to any other

� Voronoi region (a.k.a. Dirichlet or Voronoi-Dirichlet region, Thiessen

polytope or polygon, Wigner-Seitz zone, domain of action).

� To avoid degenerate cases, assume points in in general position:

� No three points lie on the same geodesic.

(Euclidean case: no three collinear points).

� No four points lie on the boundary of the same metric ball.

(Euclidean case: no four cocircular points).

Page 12: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

12Numerical geometry of non-rigid shapes Discrete geometry

Voronoi decomposition

� A point can belong to one of the following

� Voronoi region ( is closer to than to any other ).

� Voronoi edge ( is equidistant from and ).

� Voronoi vertex ( is equidistant from

three points ).

Voronoi region Voronoi edge Voronoi vertex

Page 13: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

13Numerical geometry of non-rigid shapes Discrete geometry

Voronoi decomposition

Page 14: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

14Numerical geometry of non-rigid shapes Discrete geometry

Voronoi decomposition

� Voronoi regions are disjoint.

� Their closure

covers the entire .

� Cutting along Voronoi edges produces

a collection of tiles .

� In the Euclidean case, the tiles are

convex polygons.

� Hence, the tiles are topological disks

(are homeomorphic to a disk).

Page 15: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

15Numerical geometry of non-rigid shapes Discrete geometry

Voronoi tesellation

� Tessellation of (a.k.a. cell complex):

a finite collection of disjoint open topological

disks, whose closure cover the entire .

� In the Euclidean case, Voronoi

decomposition is always a tessellation.

� In the general case, Voronoi regions might

not be topological disks.

� A valid tessellation is obtained is the

sampling is sufficiently dense.

Page 16: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

16Numerical geometry of non-rigid shapes Discrete geometry

Non-Euclidean Voronoi tessellations

� Convexity radius at a point is the largest for which the

closed ball is convex in , i.e., minimal geodesics between

every lie in .

� Convexity radius of = infimum of convexity radii over all .

� Theorem (Leibon & Letscher, 2000):

An -separated -covering of with convexity radius of

is guaranteed to produce a valid Voronoi tessellation.

� Gives sufficient sampling density conditions.

Page 17: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

17Numerical geometry of non-rigid shapes Discrete geometry

Sufficient sampling density conditions

Invalid tessellation Valid tessellation

Page 18: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

18Numerical geometry of non-rigid shapes Discrete geometry

Voronoi tessellations in Nature

Page 19: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

19Numerical geometry of non-rigid shapes Discrete geometry

Farthest point sampling

and Voronoi decomposition

MATLAB® intermezzo

Page 20: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

20Numerical geometry of non-rigid shapes Discrete geometry

Representation error

� Voronoi decomposition replaces with the closest point .

� Mapping copying each into .

� Quantify the representation error introduced by .

� Let be picked randomly with uniform distribution on .

� Representation error = variance of

Page 21: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

21Numerical geometry of non-rigid shapes Discrete geometry

Optimal sampling

� In the Euclidean case:

(mean squared error).

� Optimal sampling: given a fixed sampling size , minimize error

Alternatively: Given a fixed representation error , minimize sampling

size

Page 22: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

22Numerical geometry of non-rigid shapes Discrete geometry

Centroidal Voronoi tessellation

� In a sampling minimizing , each has to satisfy

(intrinsic centroid)

� In the Euclidean case – center of mass

� In general case: intrinsic centroid of .

� Centroidal Voronoi tessellation (CVT): Voronoi tessellation generated

by in which each is the intrinsic centroid of .

Page 23: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

23Numerical geometry of non-rigid shapes Discrete geometry

Lloyd-Max algorithm

� Start with some sampling (e.g., produced by FPS)

� Construct Voronoi decomposition

� For each , compute intrinsic centroids

� Update

� In the limit , approaches the hexagonal

honeycomb shape – the densest possible tessellation.

� Lloyd-Max algorithms is known under many other names: vector

quantization, k-means, etc.

Page 24: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

24Numerical geometry of non-rigid shapes Discrete geometry

Sampling as clustering

Partition the space into clusters with centers

to minimize some cost function

� Maximum cluster radius

� Average cluster radius

In the discrete setting, both problems are NP-hard

Lloyd-Max algorithm, a.k.a. k-means is a heuristic, sometimes minimizing

average cluster radius (if converges globally – not guaranteed)

Page 25: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

25Numerical geometry of non-rigid shapes Discrete geometry

Farthest point sampling encore

� Start with some ,

� For

� Find the farthest point

� Compute the sampling radius

Lemma

� .

Page 26: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

26Numerical geometry of non-rigid shapes Discrete geometry

Proof

For any

Page 27: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

27Numerical geometry of non-rigid shapes Discrete geometry

Proof (cont)

Since , we have

Page 28: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

28Numerical geometry of non-rigid shapes Discrete geometry

Almost optimal sampling

Theorem (Hochbaum & Shmoys, 1985)

Let be the result of the FPS algorithm. Then

In other words: FPS is worse than optimal sampling by at most 2.

Page 29: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

29Numerical geometry of non-rigid shapes Discrete geometry

Idea of the proof

Let denote the optimal clusters, with centers

Distinguish between two cases

One of the clusters contains two

or more of the points

Each cluster contains exactly

one of the points

Page 30: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

30Numerical geometry of non-rigid shapes Discrete geometry

Proof (first case)

Assume one of the clusters contains

two or more of the points ,

e.g.

triangle inequality

Hence:

Page 31: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

31Numerical geometry of non-rigid shapes Discrete geometry

Proof (second case)

Assume each of the clusters

contains exactly one of the points

, e.g.

triangle inequality

Then, for any point

Page 32: Stanford09 discrete geometry - Techniontosca.cs.technion.ac.il/.../Stanford09_discrete_geometry.pdf · 2009-01-17 · Numerical geometry of non-rigid shapes Discrete geometry 16 Non-Euclidean

32Numerical geometry of non-rigid shapes Discrete geometry

Proof (second case, cont)

We have: for any , for any point

In particular, for