04 - normal estimation, curvespanozzo/gp/04 - normal estimation, curves.pdfnormal orientation •...

106
CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo 04 - Normal Estimation, Curves Acknowledgements: Olga Sorkine-Hornung

Upload: others

Post on 21-Jul-2020

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

04 - Normal Estimation, Curves

Acknowledgements: Olga Sorkine-Hornung

Page 2: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Normal Estimation

Page 3: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Implicit Surface Reconstruction

• Implicit function from point clouds

• Need consistently oriented normals

< 0 > 00

Page 4: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Normal Estimation

• Assign a normal vector n at each point cloud point x • Estimate the direction by fitting a

local plane • Find consistent global

orientation by propagation (spanning tree)

Page 5: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Normal Estimation

• Assign a normal vector n at each point cloud point x • Estimate the direction by fitting a

local plane • Find consistent global

orientation by propagation (spanning tree)

Page 6: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Normal Estimation

• Assign a normal vector n at each point cloud point x • Estimate the direction by fitting a

local plane • Find consistent global

orientation by propagation (spanning tree)

Page 7: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Normal Estimation

• Assign a normal vector n at each point cloud point x • Estimate the direction by fitting a

local plane • Find consistent global

orientation by propagation (spanning tree)

Page 8: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Normal Estimation

• Assign a normal vector n at each point cloud point x • Estimate the direction by fitting a

local plane • Find consistent global

orientation by propagation (spanning tree)

Page 9: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Normal Estimation

• Assign a normal vector n at each point cloud point x • Estimate the direction by fitting a

local plane • Find consistent global

orientation by propagation (spanning tree)

Page 10: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Normal Estimation

• Assign a normal vector n at each point cloud point x • Estimate the direction by fitting a

local plane • Find consistent global

orientation by propagation (spanning tree)

Page 11: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Normal Estimation

• Assign a normal vector n at each point cloud point x • Estimate the direction by fitting a

local plane • Find consistent global

orientation by propagation (spanning tree)

Page 12: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Normal Estimation

• Assign a normal vector n at each point cloud point x • Estimate the direction by fitting a

local plane • Find consistent global

orientation by propagation (spanning tree)

Page 13: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Normal Estimation

• Assign a normal vector n at each point cloud point x • Estimate the direction by fitting a

local plane • Find consistent global

orientation by propagation (spanning tree)

Page 14: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Normal Estimation

• Assign a normal vector n at each point cloud point x • Estimate the direction by fitting a

local plane • Find consistent global

orientation by propagation (spanning tree)

Page 15: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Normal Estimation

• Assign a normal vector n at each point cloud point x • Estimate the direction by fitting a

local plane • Find consistent global

orientation by propagation (spanning tree)

Page 16: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Normal Estimation

• Assign a normal vector n at each point cloud point x • Estimate the direction by fitting a

local plane • Find consistent global

orientation by propagation (spanning tree)

Page 17: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Normal Estimation

• Assign a normal vector n at each point cloud point x • Estimate the direction by fitting a

local plane • Find consistent global

orientation by propagation (spanning tree)

Page 18: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Normal Estimation

• Assign a normal vector n at each point cloud point x • Estimate the direction by fitting a

local plane • Find consistent global

orientation by propagation (spanning tree)

Page 19: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Local Plane Fitting

• For each point x in the cloud, pick k nearest neighbors or all points in r-ball:

• Find a plane Π that minimizes the sum of square distances:

Page 20: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Local Plane Fitting

• For each point x in the cloud, pick k nearest neighbors or all points in r-ball:

• Find a plane Π that minimizes the sum of square distances:

Page 21: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Linear Least Squares?

x

y

Page 22: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Linear Least Squares?

• Find a line y = ax+b s.t.

x

y

• But we would like true orthogonal distances!

Page 23: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Best Fit with SSD

x

y

SSD = sum of squared distances (or differences)

Page 24: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Principle Component Analysis (PCA)

• PCA finds an orthogonal basis that best represents a given data set

• PCA finds the best approximating line/plane/orientation… (in terms of Σdistances2)

x y

z

x

yxʹ

Page 25: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Notations

• Input points:

• Looking for a (hyper) plane passing through c with normal n s.t.

Page 26: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Notations

• Input points:

• Centroid:

• Vectors from the centroid:

m

Page 27: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Centroid: 0-dim Approximation

• It can be shown that:

• m minimizes SSD • m will be the origin of

the (hyper)-plane • Our problem becomes:

m

Page 28: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Hyperplane Normal

• Minimize!

Page 29: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Hyperplane Normal

• Minimize!

Page 30: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Hyperplane Normal

• Constrained minimization – Lagrange multipliers

Matrix Cookbook! https://archive.org/details/imm3274

Page 31: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Hyperplane Normal

• Constrained minimization – Lagrange multipliers

Page 32: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Hyperplane Normal

• Constrained minimization – Lagrange multipliers

What can be said about n ??

Page 33: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Hyperplane Normal

• Constrained minimization – Lagrange multipliers

n is the eigenvector of S with the smallest eigenvalue

Page 34: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Summary – Best Fitting Plane Recipe

• Input: • Compute centroid = plane origin • Compute scatter matrix

• The plane normal n is the eigenvector of S with the smallest eigenvalue

Page 35: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

What does the Scatter Matrix do?

• Let’s look at a line l through the center of mass m with direction vector v, and project our points xi onto it. The variance of the projected points xʹi is:

Original set Small variance Large variance

l l l l

vm

xi

xʹil

yi

Page 36: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

What does the Scatter Matrix do?

Original set Small variance Large variance

l l l l

vm

xi

xʹil

yi

● The scatter matrix measures the variance of our data points along the direction v

Page 37: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Principal Components

• Eigenvectors of S that correspond to big eigenvalues are the directions in which the data has strong components (= large variance).

• If the eigenvalues are more or less the same – there is no preferable direction.

Page 38: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Principal Components

• There’s no preferable direction • S looks like this:

• Any vector is an eigenvector

● There’s a clear preferable direction

● S looks like this:

▪ µ is close to zero, much smaller than λ

Page 39: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Normal Orientation

• PCA may return arbitrarily oriented eigenvectors

• Wish to orient consistently

• Neighboring points should have similar normals

Page 40: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Normal Orientation

• Build graph connecting neighboring points • Edge (i,j) exists if xi ∈ kNN(xj) or xj ∈ kNN(xi)

• Propagate normal orientation through graph • For neighbors xi, xj : Flip nj if niTnj < 0 • Fails at sharp edges/corners

• Propagate along “safe” paths (parallel tangent planes) • Minimum spanning tree with angle-based edge weights

“Surface reconstruction from unorganized points”, Hoppe et al., SIGGRAPH 1992http://research.microsoft.com/en-us/um/people/hoppe/recon.pdf

Page 41: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Elementary Differential Geometry

Page 42: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Differential Geometry – Motivation

• Describe and analyze geometric characteristics of shapes • e.g. how smooth?

Page 43: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Differential Geometry – Motivation

• Describe and analyze geometric characteristics of shapes • e.g. how smooth? • how shapes deform

Page 44: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Differential Geometry Basics

• Geometry of manifolds

• Things that can be discovered by local observation: point + neighborhood

Page 45: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Differential Geometry Basics

• Geometry of manifolds

• Things that can be discovered by local observation: point + neighborhood

manifold point

Page 46: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Differential Geometry Basics

• Geometry of manifolds

• Things that can be discovered by local observation: point + neighborhood

manifold point

Page 47: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Differential Geometry Basics

• Geometry of manifolds

• Things that can be discovered by local observation: point + neighborhood

manifold pointcontinuous 1-1 mapping

Page 48: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Differential Geometry Basics

• Geometry of manifolds

• Things that can be discovered by local observation: point + neighborhood

manifold pointcontinuous 1-1 mapping non-manifold point

Page 49: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Differential Geometry Basics

• Geometry of manifolds

• Things that can be discovered by local observation: point + neighborhood

manifold pointcontinuous 1-1 mapping non-manifold point

x

Page 50: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Differential Geometry Basics

• Geometry of manifolds

• Things that can be discovered by local observation: point + neighborhood

Page 51: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Differential Geometry Basics

• Geometry of manifolds

• Things that can be discovered by local observation: point + neighborhood

continuous 1-1 mapping

Page 52: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Differential Geometry Basics

• Geometry of manifolds

• Things that can be discovered by local observation: point + neighborhood

continuous 1-1 mapping

u

v

If a sufficiently smooth mapping can be constructed, we can look at its first and second derivatives

Tangents, normals, curvatures, curve angles

Distances, topology

Page 53: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Curves

Page 54: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

How do we model shapes?

Delcam Plc. [CC BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0) or GFDL (http://www.gnu.org/copyleft/fdl.html)], via Wikimedia Commons

Page 55: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Building blocks: curves and surfaces

By Wojciech mula at Polish Wikipedia, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=9853555

Page 56: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.2270-001 - Computer Graphics - Daniele Panozzo

Keynote Demo

Page 57: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.2270-001 - Computer Graphics - Daniele Panozzo

Blender Demo

Page 58: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Modeling curves• We need mathematical concepts to characterize the desired curve

properties

• Notions from curve geometry help with designing user interfaces for curve creation and editing

Page 59: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

2D parametric curve• must be continuous

Page 60: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

A curve can be parameterized in many different ways

Page 61: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Tangent vector

Parametrizat

ion-indepen

dent!

Page 62: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Arc length• How long is the curve between and ? How far does the particle

travel?

• Speed is , so:

• Speed is nonnegative, so is non-decreasing

Page 63: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Arc length parameterization• Every curve has a natural parameterization:

Page 64: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Arc length parameterization• Every curve has a natural parameterization:

• Isometry between parameter domain and curve

• Tangent vector is unit-length:

Page 65: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Curvature• How much does the curve turn per unit ?

Page 66: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Curvature• How much does the curve turn per unit ?

Page 67: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Curvature profile

• Given , we can get up to a constant by integration. Integrating

reconstructs the curve up to rigid motion.

Page 68: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Curvature of a circle• Curvature of a circle:

Osculating circle

= Unit Normal

Page 69: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Frenet Frame

Page 70: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Curvature normal• Points inward

• useful for evaluating curve quality

Page 71: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

SmoothnessTwo kinds, parametric and geometric:

Parametrization-Independent

Page 72: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Smoothness example

Page 73: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Recap on parametric curves

Page 74: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Turning• Angle from start tangent to end tangent:

• If curve is closed, the tangent at the beginning is the same as the tangent at the end

Page 75: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Turning numbers

• measures how many full turns the tangent makes.

1 –1 2 0

Page 76: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Gauss map

• Point on curve maps to point on unit circle.

Page 77: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Space curves (3D)• In 3D, many vectors are orthogonal to T

• are the “Frenet frame”

• is torsion: non-planarity

N

T

B

Page 78: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Discrete Differential Geometry of Curves

Some references: see http://ddg.cs.columbia.edu/

Page 79: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Discrete Planar Curves

Page 80: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Discrete Planar Curves

• Piecewise linear curves • Not smooth at vertices • Can’t take derivatives

• Generalize notions fromthe smooth world forthe discrete case!

• There is no one single way

Page 81: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Tangents, Normals

• For any point on the edge, the tangent is simply the unit vector along the edge and the normal is the perpendicular vector

Page 82: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Tangents, Normals

• For vertices, we have many options

Page 83: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Tangents, Normals

• Can choose to average the adjacent edge normals

Page 84: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Tangents, Normals

• Weight by edge lengths

Page 85: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Inscribed Polygon, p• Connection between discrete and smooth

• Finite number of verticeseach lying on the curve, connected by straight edges.

Page 86: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

p1

p2p3

p4

The Length of a Discrete Curve

• Sum of edge lengths

Page 87: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

The Length of a Continuous Curve

• Take limit over a refinement sequence

h = max edge length

Page 88: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Curvature of a Discrete Curve

• Curvature is the change in normal direction as we travel along the curve

no change along each edge – curvature is zero along edges

Page 89: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Curvature of a Discrete Curve

• Curvature is the change in normal direction as we travel along the curve

normal changes at vertices – record the turning angle!

Page 90: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Curvature of a Discrete Curve

• Curvature is the change in normal direction as we travel along the curve

normal changes at vertices – record the turning angle!

Page 91: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Curvature of a Discrete Curve

• Curvature is the change in normal direction as we travel along the curve

same as the turning anglebetween the edges

Page 92: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Curvature of a Discrete Curve

• Zero along the edges

• Turning angle at the vertices = the change in normal direction

α1, α2 > 0, α3 < 0

α1 α2

α3

Page 93: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Total Signed Curvature

• Sum of turning angles

α1 α2

α3

Page 94: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Discrete Gauss Map

• Edges map to points, vertices map to arcs.

Page 95: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Discrete Gauss Map

• Turning number well-defined for discrete curves.

Page 96: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Discrete Turning Number Theorem

• For a closed curve, the total signed curvature is an integer multiple of 2π. • proof: sum of exterior angles

Page 97: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Turning Number TheoremContinuous world Discrete world

k:

Page 98: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Curvature is scale dependent

is scale-independent

Page 99: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Discrete Curvature – Integrated Quantity!

• Cannot view αi as pointwise curvature

• It is integrated curvature over a local area associated with vertex i

α1 α2

Page 100: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Discrete Curvature – Integrated Quantity!

• Integrated over a local area associated with vertex i α1 α2

A1

Page 101: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Discrete Curvature – Integrated Quantity!

• Integrated over a local area associated with vertex i α1 α2

A1 A2

Page 102: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Discrete Curvature – Integrated Quantity!

• Integrated over a local area associated with vertex i α1 α2

A1 A2

The vertex areas Ai form a covering of the curve.They are pairwise disjoint (except endpoints).

Page 103: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Structure Preservation

• Arbitrary discrete curve • total signed curvature obeys

discrete turning number theorem • even coarse mesh (curve) • which continuous theorems to preserve?

• that depends on the application…

discrete analogue of continuous theorem

Page 104: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Convergence

• Consider refinement sequence • length of inscribed polygon approaches length of smooth curve • in general, discrete measure approaches continuous analogue • which refinement sequence?

• depends on discrete operator • pathological sequences may exist

• in what sense does the operator converge? (pointwise, L2; linear, quadratic)

Page 105: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Recap

ConvergenceStructure- preservation

In the limit of a refinement sequence, discrete measures of length and curvature agree with continuous measures.

For an arbitrary (even coarse) discrete curve, the discrete measure of curvature obeys the discrete turning number theorem.

Page 106: 04 - Normal Estimation, Curvespanozzo/gp/04 - Normal Estimation, Curves.pdfNormal Orientation • Build graph connecting neighboring points • Edge (i,j) exists if x i ∈ kNN(x j)

CSCI-GA.3033-018 - Geometric Modeling - Daniele Panozzo

Thank you