300 likes | 435 Views
Sven.Bergmann@unil.ch www.unil.ch/cbg. Alex Alon. How do you connect smoothly between two points?. Cubic Bezier Splines. Smooth Connection Functions can be computed analytically using fundamental notions of theoretical physics. How do you connect smoothly between two points?.
E N D
Smooth Connection Functions can be computed analytically using fundamental notions of theoretical physics
How do you connect smoothly between two points? Large curvature radius (small curvature) Small curvature radius (high curvature)
A cost function sums up the curvature along the curve ds The parameter determines the importance of having small curvature =1/r
The cost function can be determined for any given function y(x) describing the curve:
The Smooth Connection Function mimimizes the cost function for a given and a set of boundary conditions = 0 [ ] Euler-Lagrange E. Noether
Playing Join-the-dots http://www.meridiangames.net/game.asp?GID=292
Contours can be defined as interpolation curves through a list of points
B-spline interpolation Example 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 - d0d1 + 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.
How to use SCFs for joining the dots? S01 α α P0 P1 P2 S12 S = S01(α)+ S12(α) The total cost is the sum of the cost from each segment.
New optimization problem + ... P3 S3 S1 P0 P1 P2 S2 The slope at each point affects the cost of the two neighboring segments Finding that minimizes corresponds to the best interpolation!
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)
Connecting points by SCFsDoes it work? Using ‘Gaussian adaptation’ for optimization reduces the cost function
Connecting points by SCFsDoes it work? The curves evolve differently for each !
But there are some subtle differences Higher promotes round shapes!
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)
Alex Alon Thanks! Sven.Bergmann@unil.chwww.unil.ch/cbg