Top Banner
Interpolating Splines: Which is the fairest of them all? Raph Levien, Google Carlo Séquin, UC Berkeley
21

Interpolating Splines: Which is the fairest of them all? Raph Levien, Google Carlo Séquin, UC Berkeley.

Dec 21, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Interpolating Splines: Which is the fairest of them all? Raph Levien, Google Carlo Séquin, UC Berkeley.

Interpolating Splines:

Which is the fairest of them all?

Raph Levien, Google

Carlo Séquin, UC Berkeley

Page 2: Interpolating Splines: Which is the fairest of them all? Raph Levien, Google Carlo Séquin, UC Berkeley.

Approaches to 2D Curve Design

• Bézier curves

• Approximating splines

– Useful if noisy data

Interpolating splines

Page 3: Interpolating Splines: Which is the fairest of them all? Raph Levien, Google Carlo Séquin, UC Berkeley.

What is the best interpolating spline?

• How do you define “best”?

– Fairness (smoothness)

– Locality (ripples and wiggles)

– Robustness (does it always converge?)

– Stability (perturbation small change)

– NOT: Compute cost !

Page 4: Interpolating Splines: Which is the fairest of them all? Raph Levien, Google Carlo Séquin, UC Berkeley.

• Idealized thin elastic strip that goes through the data points;

• The curve that minimizes bending energy:

Minimal Energy Curve

EMEC = κ 2ds∫

Page 5: Interpolating Splines: Which is the fairest of them all? Raph Levien, Google Carlo Séquin, UC Berkeley.

Problems with MEC

• Lack of roundness • Lack of convergence

Page 6: Interpolating Splines: Which is the fairest of them all? Raph Levien, Google Carlo Séquin, UC Berkeley.

Does MEC optimize the wrong functional?

• Is there a better functional?

• Tweaks to fix roundness:– Scale-Invariant MEC

– MVC

• Space of all possible functionals is a pretty big zoo;– How to choose one?

Page 7: Interpolating Splines: Which is the fairest of them all? Raph Levien, Google Carlo Séquin, UC Berkeley.

Properties of MEC worth preserving:

These hold for any sane variational spline:

• Extensionality

– Adding an on-curve point preserves shape.

– Direct consequence of variational definition.

• G2-continuity

– Known splines with higher continuity have worse locality.

– G2 is “fair enough” (for drawn curves).

Page 8: Interpolating Splines: Which is the fairest of them all? Raph Levien, Google Carlo Séquin, UC Berkeley.

2-Parameter Splines

• Each curve segment determined by a2-dimensional parameter space,

– Modulo scaling, rotation, translation

– Two parameters are tangent angles

Page 9: Interpolating Splines: Which is the fairest of them all? Raph Levien, Google Carlo Séquin, UC Berkeley.

MEC is cut piecewise from a fixed curve

• Known as the “rectangular elastica”

Page 10: Interpolating Splines: Which is the fairest of them all? Raph Levien, Google Carlo Séquin, UC Berkeley.

A Major New Result:

• All 2-parameter, extensible splines have segments cut from a generator curve!

(With scaling, rotation, translation to fit)

Page 11: Interpolating Splines: Which is the fairest of them all? Raph Levien, Google Carlo Séquin, UC Berkeley.

Generator Extensional Spline

• Conversely, start with a curve and use it to generate a spline.

• Relationship between ’/2 and ’’/3 must be single-valued.

• Preserve G2-continuity across points.

Page 12: Interpolating Splines: Which is the fairest of them all? Raph Levien, Google Carlo Séquin, UC Berkeley.

Euler Spiral

• Curvature is linear in arc-length

• Aka: Cornu spiral, Fresnel integrals, Clothoid, Railroad transition curve . . .

Page 13: Interpolating Splines: Which is the fairest of them all? Raph Levien, Google Carlo Séquin, UC Berkeley.

Euler Spiral Spline

• A really good curve: Euler spiral

– Fixes roundness problem

– Far more robust

• Some solution always seems to exist.

• Mentioned by Birkhoff & de Boor, 1965

• Implemented by Mehlum, ’70s

• Why is it not more popular?

Page 14: Interpolating Splines: Which is the fairest of them all? Raph Levien, Google Carlo Séquin, UC Berkeley.

Which generating curve looks best?

• Much simpler than: Which functional is best?

• We can employ empirical testing.

• Log-aesthetic curve family is promising.

Page 15: Interpolating Splines: Which is the fairest of them all? Raph Levien, Google Carlo Séquin, UC Berkeley.

Empirical Study: Aesthetic Curves

MECminimum

popularvotes

Exponent of Aesthetic Curve

Page 16: Interpolating Splines: Which is the fairest of them all? Raph Levien, Google Carlo Séquin, UC Berkeley.

4-Parameter Splines (MVC)

• G4-continuity; roundness

• Locality is poorer

• 2-parameter is sparser (experience from font design)

Exponentialfalloff

Page 17: Interpolating Splines: Which is the fairest of them all? Raph Levien, Google Carlo Séquin, UC Berkeley.

Fairness/Locality Tradeoff

Exponent of Aesthetic Curve

Exponential falloff factor

Page 18: Interpolating Splines: Which is the fairest of them all? Raph Levien, Google Carlo Séquin, UC Berkeley.

Applications for Font Design

• Euler spiral spline

• Sparse control points

• Interactive editing

• G2 straight-to-curve transitions

• Several fonts drawn– Inconsolata

Page 19: Interpolating Splines: Which is the fairest of them all? Raph Levien, Google Carlo Séquin, UC Berkeley.

Efficient Implementation

• Can just use 2-D LUT to compute curvature from tangent angles.

• Newton solver to enforce G2 globally.

• Drawing is not much more expensive than de Casteljau.

• Can convert to concise Bézier curves.

Page 20: Interpolating Splines: Which is the fairest of them all? Raph Levien, Google Carlo Séquin, UC Berkeley.

Bézier Representation of Font

• Euler spiral master

• Optimized conversion to Béziers

• Error tolerance < 10-3

• Compatible with industry standard font formats

Page 21: Interpolating Splines: Which is the fairest of them all? Raph Levien, Google Carlo Séquin, UC Berkeley.

Conclusions

• Best 2D spline is cut piecewise from some generating curve.

• Euler spiral is a very good choice.

• Aesthetic curves may be slightly better.

• Efficient and practical implementations.