Transcript
Page 2: Sven.Bergmann@unil.ch unil.ch/cbg

Alex Alon

Page 3: Sven.Bergmann@unil.ch unil.ch/cbg

How do you connect smoothly between two points?

Page 4: Sven.Bergmann@unil.ch unil.ch/cbg

Cubic Bezier Splines

Page 5: Sven.Bergmann@unil.ch unil.ch/cbg

Smooth Connection Functions can be computed analytically using fundamental notions of theoretical physics

Page 6: Sven.Bergmann@unil.ch unil.ch/cbg

How do you connect smoothly between two points?

Small curvature radius(high curvature)

Large curvature radius(small curvature)

Page 7: Sven.Bergmann@unil.ch unil.ch/cbg

A cost function sums up the curvature along the curve

ds

The parameter determines the importance of having small curvature =1/r

Page 8: Sven.Bergmann@unil.ch unil.ch/cbg

The cost function can be determined for any given function y(x) describing the curve:

Page 9: Sven.Bergmann@unil.ch unil.ch/cbg

The Smooth Connection Function mimimizes the cost function for a given

and a set of boundary conditions

= 0 [ ]Euler-Lagrange

E. Noether

Page 10: Sven.Bergmann@unil.ch unil.ch/cbg

Examples for Smooth Connection functions

Page 11: Sven.Bergmann@unil.ch unil.ch/cbg

So how do Smooth Connection Functions relate to Shapes?

Page 12: Sven.Bergmann@unil.ch unil.ch/cbg

Many shapes can be approximated

Page 13: Sven.Bergmann@unil.ch unil.ch/cbg

Playing Join-the-dots

http://www.meridiangames.net/game.asp?GID=292

Page 14: Sven.Bergmann@unil.ch unil.ch/cbg

Contours can be defined as interpolation curves through a list of points

Page 15: Sven.Bergmann@unil.ch unil.ch/cbg

Different interpolation schemes lead to different shapes

Page 16: Sven.Bergmann@unil.ch unil.ch/cbg

B-spline interpolationExample for three points: P0 , P1 , P2

For each segment control points are chosen as Pi ± di

By construction this matches the slopes at each point.

From C2 continuity (equal curvatures) it follows that

P1 - 2(P1 - d1) + (P0 + d0) = (P2 - d2) - 2(P1 + d1) + P1 , d0 + 4d1 + d2 = P2 - P0 .

In general case we get banded 3-diagonals linear equations 4d1 + d2 = P2 - P0 - d0 d1 + 4d2 + d3 = P3 - P1 ... ... di + 4di+1 + di+2 = Pi+2 - Pi ... ... dn-2 + 4dn-1 = Pn - Pn-2 - dn

Which can be solved for di.

Page 17: Sven.Bergmann@unil.ch unil.ch/cbg

How to use SCFs for joining the dots?

P0 P1 P2

S01

S12

S = S01(α)+ S12(α)

The total cost is the sum of the cost from each segment.

αα

Page 18: Sven.Bergmann@unil.ch unil.ch/cbg

New optimization problem

𝑆 Σ (α )=∑𝑖=1

𝑛

𝑆𝑖 (α 𝑖 , α 𝑖+1)

The slope at each point affects the cost of the two neighboring segments

P0 P1 P2

S1

S2

P3S3

+ ...

Finding that minimizes corresponds to the best interpolation!

Page 19: Sven.Bergmann@unil.ch unil.ch/cbg

Connecting points by SCFsPro vs Con

Main advantage: • Single tunable parameter controls behavior of

all segment curves (while B-splines have only one solution)

Main disadvantage: • Minimization procedure is computationally

costly (while B-splines require only solving linear equations)

Page 20: Sven.Bergmann@unil.ch unil.ch/cbg

0 20 400.99

0.995

1

1.005

N=3

=1.3

0 20 400.9

0.95

1

=3

0 20 400.4

0.6

0.8

1=10

0 20 400.9

0.95

1

N=4

0 20 400.7

0.8

0.9

1

0 20 400

0.5

1

0 50 1000.7

0.8

0.9

1

N=10

Iteration0 50 1000

0.5

1

Iteration0 50 1000

0.5

1

Iteration

Connecting points by SCFsDoes it work?

Using ‘Gaussian adaptation’ for optimization reduces the cost function

Page 21: Sven.Bergmann@unil.ch unil.ch/cbg

Connecting points by SCFsDoes it work?

0 20 400.99

0.995

1

1.005

N=3

=1.3

0 20 400.9

0.95

1

=3

0 20 400.4

0.6

0.8

1=10

0 20 400.9

0.95

1

N=4

0 20 400.7

0.8

0.9

1

0 20 400

0.5

1

0 50 1000.7

0.8

0.9

1

N=10

Iteration0 50 1000

0.5

1

Iteration0 50 1000

0.5

1

Iteration

The curves evolve differently for each !

Page 22: Sven.Bergmann@unil.ch unil.ch/cbg

Connecting 10 points by SCFs

0 20 400.99

0.995

1

1.005N=3

=1.3

0 20 400.9

0.95

1=3

0 20 400.4

0.6

0.8

1=10

0 20 400.9

0.95

1

N=4

0 20 400.7

0.8

0.9

1

0 20 400

0.5

1

0 50 1000.7

0.8

0.9

1

N=10

Iteration0 50 1000

0.5

1

Iteration0 50 1000

0.5

1

Iteration

Page 23: Sven.Bergmann@unil.ch unil.ch/cbg

And the Octopus?

Page 24: Sven.Bergmann@unil.ch unil.ch/cbg

Not much adaptation with 95 points on the curve …

Page 25: Sven.Bergmann@unil.ch unil.ch/cbg

But there are some subtle differences

Higher promotes round shapes!

Page 26: Sven.Bergmann@unil.ch unil.ch/cbg

Less points introduce more freedom for adaptation

Page 27: Sven.Bergmann@unil.ch unil.ch/cbg

Less points introduce more freedom for adaptation

Page 28: Sven.Bergmann@unil.ch unil.ch/cbg

… and sometimes too much freedom!

Page 29: Sven.Bergmann@unil.ch unil.ch/cbg

Outlook

New ways to define shapes:• Optimal trajectories in transport• Curves in Computer Aided Geometrical Design

New way to analyze shapes• Assigning a typical ν to a shape or a part of it

(e.g. for handwritten letters)

Page 30: Sven.Bergmann@unil.ch unil.ch/cbg

Alex Alon

Thanks! [email protected]/cbg