The Essentials of CAGD Chapter 9: Composite Curves Gerald Farin - - PowerPoint PPT Presentation

the essentials of cagd
SMART_READER_LITE
LIVE PREVIEW

The Essentials of CAGD Chapter 9: Composite Curves Gerald Farin - - PowerPoint PPT Presentation

The Essentials of CAGD Chapter 9: Composite Curves Gerald Farin & Dianne Hansford CRC Press, Taylor & Francis Group, An A K Peters Book www.farinhansford.com/books/essentials-cagd 2000 c Farin & Hansford The Essentials of CAGD


slide-1
SLIDE 1

The Essentials of CAGD

Chapter 9: Composite Curves Gerald Farin & Dianne Hansford

CRC Press, Taylor & Francis Group, An A K Peters Book www.farinhansford.com/books/essentials-cagd

c 2000

Farin & Hansford The Essentials of CAGD 1 / 17

slide-2
SLIDE 2

Outline

1

Introduction to Composite Curves

2

Piecewise B´ ezier Curves

3

C 1 and G 1 Continuity

4

C 2 and G 2 Continuity

5

Working with Piecewise B´ ezier Curves

6

Point-Normal Interpolation

Farin & Hansford The Essentials of CAGD 2 / 17

slide-3
SLIDE 3

Introduction to Composite Curves

B´ ezier curves are a powerful tool One curve not suitable for modeling complex shape Composite curves: composed of pieces Also called piecewise curves or splines Examine piecewise B´ ezier curves – Conditions for smoothness

Farin & Hansford The Essentials of CAGD 3 / 17

slide-4
SLIDE 4

Piecewise B´ ezier Curves

knot sequence u0, u1, . . . Each B´ ezier curve is defined

  • ver an interval [ui, ui+1]

∆i = ui+1 − ui spline curve: piecewise curve defined

  • ver a knot sequence

Farin & Hansford The Essentials of CAGD 4 / 17

slide-5
SLIDE 5

Piecewise B´ ezier Curves

Spline curve s(u) u: Global parameter within the knot vector ith B´ ezier curve si – Defined over [ui, ui+1] – Local parameter t ∈ [0, 1] t = u − ui ∆i Junction point: curve segment end points: s(ui) = si(0) = si−1(1)

Farin & Hansford The Essentials of CAGD 5 / 17

slide-6
SLIDE 6

Piecewise B´ ezier Curves

Derivative of a spline curve at u when u ∈ [ui, ui+1] ds(u) du = dsi(t) dt dt du = 1 ∆i dsi(t) dt At junction points of B´ ezier curves 1 ∆0 ˙ s0(1) = 3 ∆0 ∆b2 and 1 ∆1 ˙ s1(0) = 3 ∆1 ∆b3 Second derivatives follow similarly: 1 ∆2 ¨ s0(1) = 6 ∆2 ∆2b1 and 1 ∆2

1

¨ s1(0) = 6 ∆2

1

∆2b3

Farin & Hansford The Essentials of CAGD 6 / 17

slide-7
SLIDE 7

C 1 and G 1 Continuity

(Note sketch error: not in ratio 3:1)

Conditions for two segments to form a differentiable or C 1 curve over the interval [u0, u2]: b3 = ∆1 ∆ b2 + ∆0 ∆ b4 where ∆ = ∆1 + ∆2 = u2 − u0 Geometric interpretation: ratio(b2, b3, b4) = ∆0 ∆1

Farin & Hansford The Essentials of CAGD 7 / 17

slide-8
SLIDE 8

C 1 and G 1 Continuity

Example: C 1 condition requires b3 = 2 3b2 + 1 3b4 = 2 2

  • Farin & Hansford

The Essentials of CAGD 8 / 17

slide-9
SLIDE 9

C 1 and G 1 Continuity

Interpret parameter interval [u0, u2] as a time interval C 1 motion ⇒ point’s velocity must change continuously Point must travel faster over “long” parameter intervals and slower over “short” ones Shape only concern? Then knot sequence not needed G 1 continuity: Tangent line varies continuously – Example: two cubic B´ ezier curves: b2, b3, and b4 collinear

Farin & Hansford The Essentials of CAGD 9 / 17

slide-10
SLIDE 10

C 2 and G 2 Continuity

Assume C 1 Compare second derivatives at parameter value u1 −∆1 ∆0 b1 + ∆ ∆0 b2 = ∆ ∆1 b4 − ∆0 ∆1 b5 Geometric interpretation: d− = −∆1 ∆0 b1 + ∆ ∆0 b2 d+ = ∆ ∆1 b4 − ∆0 ∆1 b5 C 2 condition: d− = d+ ≡ d

Farin & Hansford The Essentials of CAGD 10 / 17

slide-11
SLIDE 11

C 2 and G 2 Continuity

C 2 curves: b2 = ∆1 ∆ b1 + ∆0 ∆ d b4 = ∆1 ∆ d + ∆0 ∆ b5 ratio(b1, b2, d) = ratio(d, b4, b5) = ∆0 ∆1

Farin & Hansford The Essentials of CAGD 11 / 17

slide-12
SLIDE 12

C 2 and G 2 Continuity

G 2 continuity ⇒ curvature continuity ρ2 = ρ0ρ1 where ρ0 = ratio(b1, b2, c) ρ1 = ratio(c, b4, b5) ρ = ratio(b2, b3, b4)

Farin & Hansford The Essentials of CAGD 12 / 17

slide-13
SLIDE 13

C 2 and G 2 Continuity

A curve that is G 2 but not C 2 ρ0 = 1 3 ρ1 = 3 4 ρ = 1 2 (1 2)2 = 1 3 × 3 4

Farin & Hansford The Essentials of CAGD 13 / 17

slide-14
SLIDE 14

Working with Piecewise B´ ezier Curves

Left: Points and tangent lines Right: Piecewise B´ ezier polygon Given: – Points that correspond to significant changes in geometry – Tangent lines at points where the character is smooth Find: Piecewise B´ ezier representation – One tangent line ⇒ Use G 1 smoothness conditions for B´ ezier curves

Farin & Hansford The Essentials of CAGD 14 / 17

slide-15
SLIDE 15

Working with Piecewise B´ ezier Curves

1

Order the points as pi

2

Convert tangent lines to unit vectors vi

3

For one cubic segment set b3i = pi and b3i+3 = pi+1

4

Interior control points b3i+1 = b3i + 0.4b3i+3 − b3ivi b3i+2 = b3i+3 − 0.4b3i+3 − b3ivi+1 Characters or fonts often stored as piecewise B´ ezier curves – Allows for easy rescaling – Pixel maps of fonts can result in aliasing effects – Each letter in this book is created by evaluating a piecewise B´ ezier curve

Farin & Hansford The Essentials of CAGD 15 / 17

slide-16
SLIDE 16

Point-Normal Interpolation

Given: – A pair of 3D points p0, p1 – Normal vectors n0, n1 at each pi Find: – Cubic connecting p0 and p1 – Curve is tangent to the planes defined normal vectors ⇒ Curve’s tangents lie planes

Farin & Hansford The Essentials of CAGD 16 / 17

slide-17
SLIDE 17

Point-Normal Interpolation

In B´ ezier form: b0 = p0 and b3 = p1 Infinitely many solutions for b1 and b2 One solution:

1

Project b3 into the plane defined by b0 and n0 This defines a tangent line at b0

2

Place b1 anywhere on this tangent Could use method in previous section

3

b2 obtained analogously Application: robotics – Path of a robot arm described as a piecewise curve – Point-normal pairs extracted from a surface – Desired curve intended to lie on the surface

Farin & Hansford The Essentials of CAGD 17 / 17