+ All Categories
Home > Documents > Parametric Curves

Parametric Curves

Date post: 31-Jan-2016
Category:
Upload: nimrod
View: 38 times
Download: 0 times
Share this document with a friend
Description:
Parametric Curves. Ref: 1 , 2. Outline. Hermite curves Bezier curves Catmull-Rom splines Frames along the curve. Hermite Curves. 3D curve of polynomial bases Geometrically defined by position and tangents of end points Able to construct C 1 composite curve - PowerPoint PPT Presentation
Popular Tags:
28
Parametric Curves Ref: 1 , 2
Transcript
Page 1: Parametric Curves

Parametric Curves

Ref: 1, 2

Page 2: Parametric Curves

Outline

Hermite curvesBezier curvesCatmull-Rom splinesFrames along the curve

Page 3: Parametric Curves

Hermite Curves

3D curve of polynomial basesGeometrically defined by position and tangents of end pointsAble to construct C1 composite curveIn CG, often used as the trace for camera with Frenet frame, or rotation-minimizing frame

Page 4: Parametric Curves

Math …

h1(s) = 2s3 - 3s2 + 1h2(s) = -2s3 + 3s2

h3(s) = s3 - 2s2 + s h4(s) = s3 - s2

P(s) = P1h1(s) + P2h2(s) + T1h3(s) + T2h4(s)

P’(s)=P1h1’(s) + P2h2’(s) + T1h3’(s) + T2h4’(s) h1’ = 6s2-6s h2’ = -6s2+6s h3’= 3s2-4s+1 h4’= 3s2 – 2s

P(0)= P1, P(1)=P2; P’(0)=T1, P’(1)=T2

Page 5: Parametric Curves

Blending Functions

At s = 0: h1 = 1, h2 = h3 = h4 = 0 h1’ = h2’ = h4’ = 0, h3’ = 1

At s = 1: h1 = h3 = h4 = 0, h2 = 1 h1’ = h2’ = h3’ = 0, h4’ = 1

h1(s) h2(s) h3(s) h4(s)

P(0) = P1P’(0) = T1

P(1) = P2P’(1) = T2

Page 6: Parametric Curves

C1 Composite Curve

P(t)

Q(t) R(t)

More on Continuity

Page 7: Parametric Curves

Composite Curve

P(t)

Q(t) R(t)

t0

t1

t2

t3

Each subcurve is defined in [0,1].The whole curve (PQR) can be defined from [0,3]

To evaluate the position (and tangent)

Page 8: Parametric Curves

Close Relatives

Bezier curvesCatmull-Rom splines

Page 9: Parametric Curves

Bezier Curve (cubic, ref)

Defined by four control pointsde Casteljau algorithm (engineer at Citroën)

Page 10: Parametric Curves

Bezier Curve (cont)

Also invented by Pierre Bézier (engineer of Renault) Blending function: Bernstein polynomialCan be of any degree

Degree n has (n+1) control points

Page 11: Parametric Curves

First Derivative of Bezier Curves (ref)

Degree-n Bezier curveBernstein polynomialDerivative of Bernstein polynomialFirst derivative of Bezier curve

Hodograph

iii PPnQ 1

Page 12: Parametric Curves

Ex: cubic Bezier curve

22312

201

2

012,

312313

3)()(

tPPttPPtPP

PPtBtPdt

d

iiii

23

01

3)1(

3)0(

PPP

PPP

Hence, to convert to/from Hermite curve:

23

01

3

0

3)1(

3)0(

)1(

)0(

PPP

PPP

PP

PP

3

2

1

0

1

0

1

0

3300

0033

1000

0001

P

P

P

P

p

p

p

p

1

0

1

0

31

31

3

2

1

0

0010

010

001

0001

p

p

p

p

P

P

P

P

Page 13: Parametric Curves

C1 Composite Bezier Curves

Page 14: Parametric Curves

Bezier Curve Fitting

From GraphicsGemsInput: digitized data points in R2

Output: composite Bezier curves in specified error

Page 15: Parametric Curves

Bezier Marching

A path made of composite Bezier curvesGenerate a sequence of points along the path with nearly constant step sizeAdjust the parametric increment according to (approximated) arc length

Page 16: Parametric Curves

Catmull-Rom spline (1974, ref)

Given n+1 control points {P0,…,Pn}, we wish to find a curve that interpolates these control points (i.e. passes through them all), and is local in nature (i.e. if one of the control points is moved, it only affects the curve locally). We define the curve on each segment [Pi,Pi+1] by using the two control points, and specifying the tangent to the curve at each control point to be (Pi+1–Pi-1)/2 and (Pi+2–Pi)/2Tangents in first and last segments are defined differently

Page 17: Parametric Curves

PowerPoint Line Tool …

Gives you a Catmull-Rom spline, open or close.

Page 18: Parametric Curves

Ex: Catmull-Rom Curves

Page 19: Parametric Curves

Reference Frames Along the Curve

Applications generalized cylinder Cinematography

Frenet framesRotation minimizing frame

Page 20: Parametric Curves

Generalized Cylinder

Page 21: Parametric Curves

Frenet Frame (Farin)

tangent vector

binormal vector

main normal vector

: cross productUnit vectors

Page 22: Parametric Curves

Frenet Frame (arc-length parameterization)

Page 23: Parametric Curves

Frenet-Serret Formula

Orthonormal expansion

Express T’N’B’ (change rate of TNB)in terms of TNB

In this notation, the curve is r(s)

Page 24: Parametric Curves

Frenet-Serret Formula (cont)

In general parameterization r(t)

Curvature and torsion

r(t)=(x(t),y(t))

Page 25: Parametric Curves

(s)

Geometric Meaning of and

x(s+s)

: angle between t(s) and t(s+s): angle between b(s) and b(s+s)

curvature torsion

More result on this reference

Page 26: Parametric Curves

Frenet Frame Problem

Problem: vanishing second derivative at inflection points

(vanishing normal)

Page 27: Parametric Curves

Rotation Minimizing Frame (ref)

Use the second derivative to define the first frame (if zero, set N0 to any vector T0)

Compute all subsequent Ti; find a rotation from Ti-1 to Ti; rotate Ni and Bi accordingly

If no rotation, use the same frame

Page 28: Parametric Curves

ContinuityGeometric Continuity

A curve can be described as having Gn continuity, n being the increasing measure of smoothness. G0: The curves touch at the join point.G1: The curves also share a common tangent direction at the join point.G2: The curves also share a common center of curvature at the join point.

Parametric ContinuityC0: curves are joinedC1: first derivatives are equalC2: first and second derivatives are equalCn: first through nth derivatives are equal

BACK


Recommended