The Essentials of CAGD Chapter 7: Working with Polynomial Patches - - PowerPoint PPT Presentation

the essentials of cagd
SMART_READER_LITE
LIVE PREVIEW

The Essentials of CAGD Chapter 7: Working with Polynomial Patches - - PowerPoint PPT Presentation

The Essentials of CAGD Chapter 7: Working with Polynomial Patches 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


slide-1
SLIDE 1

The Essentials of CAGD

Chapter 7: Working with Polynomial Patches 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 / 33

slide-2
SLIDE 2

Outline

1

Introduction to Working with Polynomial Patches

2

Bicubic Interpolation

3

Interpolation using Higher Degrees

4

Coons Patches

5

Bicubic Hermite Interpolation

6

Trimmed Patches

7

Least Squares Approximation

Farin & Hansford The Essentials of CAGD 2 / 33

slide-3
SLIDE 3

Introduction to Working with Polynomial Patches

Basic surface theory ⇒ several applications A B´ ezier surface trimmed by a ConS (Curve on a Surface)

Farin & Hansford The Essentials of CAGD 3 / 33

slide-4
SLIDE 4

Bicubic Interpolation

Given: 16 points pi,j and associated parameter values (ui, vj) Find: Interpolating bicubic patch x(u, v) such that

P =     p0,0 p0,1 p0,2 p0,3 p1,0 p1,1 p1,2 p1,3 p2,0 p2,1 p2,2 p2,3 p3,0 p3,1 p3,2 p3,3     =     x(u0, v0) x(u0, v1) x(u0, v2) x(u0, v3) x(u1, v0) x(u1, v1) x(u1, v2) x(u1, v3) x(u2, v0) x(u2, v1) x(u2, v2) x(u2, v3) x(u3, v0) x(u3, v1) x(u3, v2) x(u3, v3)    

Farin & Hansford The Essentials of CAGD 4 / 33

slide-5
SLIDE 5

Bicubic Interpolation

Recall that

x(u1, v2) =

  • B3

0(u1)

B3

1(u1)

B3

2(u1)

B3

3(u1)

   b0,0 b0,1 b0,2 b0,3 b1,0 b1,1 b1,2 b1,3 b2,0 b2,1 b2,2 b2,3 b3,0 b3,1 b3,2 b3,3         B3

0(v2)

B3

1(v2)

B3

2(v2)

B3

3(v2)

   

Farin & Hansford The Essentials of CAGD 5 / 33

slide-6
SLIDE 6

Bicubic Interpolation

Interpolation problem written as P = MTBN MT =     B3

0(u0)

B3

1(u0)

B3

2(u0)

B3

3(u0)

B3

0(u1)

B3

1(u1)

B3

2(u1)

B3

3(u1)

B3

0(u2)

B3

1(u2)

B3

2(u2)

B3

3(u2)

B3

0(u3)

B3

1(u3)

B3

2(u3)

B3

3(u3)

    N =     B3

0(v0)

B3

0(v1)

B3

0(v2)

B3

0(v3)

B3

1(v0)

B3

1(v1)

B3

1(v2)

B3

1(v3)

B3

2(v0)

B3

2(v1)

B3

2(v2)

B3

2(v3)

B3

3(v0)

B3

3(v1)

B3

3(v2)

B3

3(v3)

   

Farin & Hansford The Essentials of CAGD 6 / 33

slide-7
SLIDE 7

Bicubic Interpolation

P = MTBN Tensor Product Approach: Decompose into a sequence of linear systems P = CN then C = MTB Solve two sets of four systems – Example from each:

  • p1,0

p1,1 p1,2 p1,3

  • =
  • c1,0

c1,1 c1,2 c1,3

  • N

    c0,1 c1,1 c2,1 c3,1     = MT     b0,1 b1,1 b2,1 b3,1    

Farin & Hansford The Essentials of CAGD 7 / 33

slide-8
SLIDE 8

Bicubic Interpolation

Given pi,j depicted as triangles Step 1: P = CN Step 2: C = MTB Sketch error: the u- and v- parameter directions need to be reversed.

Farin & Hansford The Essentials of CAGD 8 / 33

slide-9
SLIDE 9

Bicubic Interpolation

Direct approach: B = (MT)−1PN−1 The tensor product approach is more efficient – Important for larger problems

Farin & Hansford The Essentials of CAGD 9 / 33

slide-10
SLIDE 10

Bicubic Interpolation

Standard parameter selection: (u0, u1, u2, u3) = (v0, v1, v2, v3) = (0, 1/3, 2/3, 1) Different values might improve the result – Requires effort – Must define improve

Farin & Hansford The Essentials of CAGD 10 / 33

slide-11
SLIDE 11

Interpolation using Higher Degrees

Given: array of points with associated parameter values (ui, vj) P =    p0,0 . . . p0,n . . . . . . pm,0 . . . pm,n    Find: a B´ ezier patch x(u, v) = MTBN such that x(ui, vj) = pi,j B =    b0,0 . . . b0,n . . . . . . bm,0 . . . bm,n   

Farin & Hansford The Essentials of CAGD 11 / 33

slide-12
SLIDE 12

Interpolation using Higher Degrees

P = MTBN Tensor product approach: P = CN ⇒ C = MTB – m + 1 linear systems for the rows of C – n + 1 linear systems for the columns of B Could use polynomials other than the Bernstein polynomials – Obtain the same interpolating surface High degree polynomials tend to oscillate – Just as in the curve case

Farin & Hansford The Essentials of CAGD 12 / 33

slide-13
SLIDE 13

Coons Patches

A common practical situation: – Four boundary curves of a surface designed – Whole surface must be constructed

  • S. Coons developed most widely used technique in the 1960s for Ford

– Here: Boundary curves are B´ ezier curves

Farin & Hansford The Essentials of CAGD 13 / 33

slide-14
SLIDE 14

Coons Patches

Given: Four boundary polygons As an array of points bi,j i = 0 . . . m, j = 0 . . . n Example: m = n = 3 b0,0 b0,1 b0,2 b0,3 b1,0 b1,3 b2,0 b2,3 b3,0 b3,1 b3,2 b3,3 Find: Missing (four) interior points –Depicted by squares

Farin & Hansford The Essentials of CAGD 14 / 33

slide-15
SLIDE 15

Coons Patches

General Coons formula: Blend of two linear interpolations and one bilinear interpolation: bi,j = (1 − i m)b0,j + i mbm,j + (1 − j n)bi,0 + j nbi,n −

  • 1 − i

m i m

b0,0 b0,n bm,0 bm,n 1 − j

n j n

  • for

i = 1 . . . m − 1 and j = 1 . . . n − 1

Farin & Hansford The Essentials of CAGD 15 / 33

slide-16
SLIDE 16

Coons Patches

Three building blocks for a Coons patch

Farin & Hansford The Essentials of CAGD 16 / 33

slide-17
SLIDE 17

Bicubic Hermite Interpolation

Given: points, partials, and mixed partials     x(0, 0) xv(0, 0) xv(0, 1) x(0, 1) xu(0, 0) xuv(0, 0) xuv(0, 1) xu(0, 1) xu(1, 0) xuv(1, 0) xuv(1, 1) xu(1, 1) x(1, 0) xv(1, 0) xv(1, 1) x(1, 1)     Find: Interpolating cubic B´ ezier patch

Farin & Hansford The Essentials of CAGD 17 / 33

slide-18
SLIDE 18

Bicubic Hermite Interpolation

4 patch boundaries ⇒ 4 cubic Hermite curve interpolation problems b0,0 = x(0, 0) b3,0 = x(1, 0) b0,1 = b0,0 + 1 3xv(0, 0) b3,1 = b3,0 + 1 3xv(1, 0) b1,0 = b0,0 + 1 3xu(0, 0) b2,0 = b3,0 − 1 3xu(1, 0) b0,3 = x(0, 1) b3,3 = x(1, 1) b0,2 = b0,3 − 1 3xv(0, 1) b3,2 = b3,3 − 1 3xv(1, 1) b1,3 = b0,3 + 1 3xu(0, 1) b2,3 = b3,3 − 1 3xu(1, 1)

Farin & Hansford The Essentials of CAGD 18 / 33

slide-19
SLIDE 19

Bicubic Hermite Interpolation

Interior control points found using the twist vector data xuv(0, 0) = 9[b1,1 − b1,0 − b0,1 + b0,0] Solve for b1,1: b1,1 = 1 9xuv(0, 0) + b0,1 + b1,0 − b0,0 At other corners: b2,1 = −1 9xuv(1, 0) + b3,1 − b3,0 + b2,0 b1,2 = −1 9xuv(0, 1) + b1,3 − b0,3 + b0,2 b2,2 = 1 9xuv(1, 1) − b3,3 + b2,3 + b3,2

Farin & Hansford The Essentials of CAGD 19 / 33

slide-20
SLIDE 20

Bicubic Hermite Interpolation

A bicubic B´ ezier patch with zero twists Twist data can be difficult to create – Coons solution to given boundary data easier construction

Farin & Hansford The Essentials of CAGD 20 / 33

slide-21
SLIDE 21

Trimmed Patches

Parametric curve (u(t), v(t)) in the domain of surface x(u, v) Mapped to a curve on the surface ConS x(u(t), v(t))

Farin & Hansford The Essentials of CAGD 21 / 33

slide-22
SLIDE 22

Trimmed Patches

ConS application: trimmed surfaces Areas marked as “invalid” or “invisible” Example: – Given two planes – Blending surface between them – Dashed parts of planes “invisible”

Farin & Hansford The Essentials of CAGD 22 / 33

slide-23
SLIDE 23

Trimmed Patches

Degree p domain curve mapped onto a degree m × n surface x(u, v) ⇒ Degree (m + n)p ConS (in general) Isoparametric line in domain ⇒ Degree m or n isoparametric ConS

Farin & Hansford The Essentials of CAGD 23 / 33

slide-24
SLIDE 24

Trimmed Patches

Closed domain curve divides domain into two parts Closed ConS divides the surface into two parts Problem: Is domain point (u, v) inside the domain curve? Solution: – Construct arbitrary ray emanating from (u, v) – Count number intersections with all domain curves and boundary (Tangencies count as 2 intersections) – Even: outside Odd : inside

Farin & Hansford The Essentials of CAGD 24 / 33

slide-25
SLIDE 25

Trimmed Patches

Orientation of trim curves – Inside trim curves clockwise – Outer-boundary is counterclockwise

Farin & Hansford The Essentials of CAGD 25 / 33

slide-26
SLIDE 26

Trimmed Patches

Trimmed surfaces are a bread-and-butter tool in all CAD/CAM systems Arise in many applications Most common: intersection between two surfaces – Resulting intersection curve is a ConS on either of the two surfaces

Farin & Hansford The Essentials of CAGD 26 / 33

slide-27
SLIDE 27

Least Squares Approximation

Given: set of points pk k = 0, . . . K − 1 – Not on a rectangular grid aligned with patch boundaries Example: points from laser digitizer – Number of points can be large For each pk need corresponding parameter pair (uk, vk)

Farin & Hansford The Essentials of CAGD 27 / 33

slide-28
SLIDE 28

Least Squares Approximation

Find a B´ ezier patch that fits the data as “good” as possible – Control net coefficients bi,j with i = 0, . . . , m and j = 0, . . . , n Use a linearized notation to solve the problem – Traverse the control net row by row x(u, v) =

  • Bm

0 (u)Bn 0 (v), . . . , Bm m(u)Bn n(v)

  b0,0 . . . bm,n    Best case: each data point lies on the approximating surface pk = x(uk, vk) =

  • Bm

0 (uk)Bn 0 (vk), . . . , Bm m(uk)Bn n(vk)

  b0,0 . . . bm,n   

Farin & Hansford The Essentials of CAGD 28 / 33

slide-29
SLIDE 29

Least Squares Approximation

Combining all K of these equations          p0 . . . . . . . . . pK          =          Bm

0 (u0)Bn 0 (v0)

. . . Bm

m(u0)Bn n(v0)

. . . . . . . . . Bm

0 (uK)Bn 0 (vK)

. . . Bm

m(uK)Bn n(vK)

            b0,0 . . . bm,n    P = MB K equations in (m + 1)(n + 1) unknowns Example: m = n = 3 bicubic case and K = several hundred ⇒ 16 unknowns ⇒ Linear system is overdetermined

Farin & Hansford The Essentials of CAGD 29 / 33

slide-30
SLIDE 30

Least Squares Approximation

Overdetermined linear system P = MB In general no exact solution Good approximation found by forming normal equations MTP = MTMB (Same procedure as for curve problem) Example: bicubic case 16 equations in 16 unknowns B is the least squares approximation to the given data in B´ ezier form Least squares solution minimizes the sum of the squared distances of each data point to the resulting surface

Farin & Hansford The Essentials of CAGD 30 / 33

slide-31
SLIDE 31

Least Squares Approximation

If # data points = # control points ⇒ interpolation (No need to form normal equations)

Farin & Hansford The Essentials of CAGD 31 / 33

slide-32
SLIDE 32

Least Squares Approximation

Finding parameter values If data points can be projected into a plane: – Example: project into (x, y)−plane – Drop z−coordinate (uk, vk) = (xk, yk) – Scale to unit square

Farin & Hansford The Essentials of CAGD 32 / 33

slide-33
SLIDE 33

Least Squares Approximation

Finding parameter values con’t If data cannot be projected into a plane: Look for a basic surface with a known parametrization that mimics the shape of the data Example: a cylinder or a sphere – Projected each point onto a cylinder – Generates a (θ, z) parameter pair – Scale parameters to unit square

Farin & Hansford The Essentials of CAGD 33 / 33