The Essentials of CAGD Chapter 1: The Bare Basics Gerald Farin - - PowerPoint PPT Presentation

the essentials of cagd
SMART_READER_LITE
LIVE PREVIEW

The Essentials of CAGD Chapter 1: The Bare Basics Gerald Farin - - PowerPoint PPT Presentation

The Essentials of CAGD Chapter 1: The Bare Basics 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 1: The Bare Basics 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 / 24

slide-2
SLIDE 2

Outline

1

Introduction to The Bare Basics

2

Points and Vectors

3

Operations on Points and Vectors

4

Products

5

Affine Maps

6

Triangles and Tetrahedra

Farin & Hansford The Essentials of CAGD 2 / 24

slide-3
SLIDE 3

Introduction to The Bare Basics

A bare basic affine mapping of a vector Goals: – Introduce basic geometry – Notation

Farin & Hansford The Essentials of CAGD 3 / 24

slide-4
SLIDE 4

Points and Vectors

Geometry in two dimensions 2D 0 =

  • e1 =

1

  • e2 =

1

  • For a 3D space ...

Farin & Hansford The Essentials of CAGD 4 / 24

slide-5
SLIDE 5

Points and Vectors

Point – Denotes a 2D or 3D location – Lower case boldface letters p = 1 2

  • – Coordinates

px py

  • r

p1 p2

  • Affine space or Euclidean space E2

Farin & Hansford The Essentials of CAGD 5 / 24

slide-6
SLIDE 6

Points and Vectors

Vector: difference of two points v =   2 2   =   1 2 1   −   −1 1   – Lower case boldface – Components   vx vy vz  

  • r

  v1 v2 v3   Linear space or Real space R3

Farin & Hansford The Essentials of CAGD 6 / 24

slide-7
SLIDE 7

Points and Vectors

Affine/Euclidean and linear/real spaces

Farin & Hansford The Essentials of CAGD 7 / 24

slide-8
SLIDE 8

Operations on Points and Vectors

Translation – Moves the point by a displacement – Displacement defined by a vector ˆ p = p + v No effect on vectors

Farin & Hansford The Essentials of CAGD 8 / 24

slide-9
SLIDE 9

Operations on Points and Vectors

Adding points and vectors For vectors: Linear combination v = α1v1 + α2v2 + . . . + αnvn, α1, . . . , αn ∈ R For points: barycentric combination p = α1p1 + . . . + αnpn, α1 + . . . + αn = 1 What barycentric combination results in the midpoint of two points? x = αp + βq α + β = 1

Farin & Hansford The Essentials of CAGD 9 / 24

slide-10
SLIDE 10

Operations on Points and Vectors

Barycentric coordinates are invariant under translations (αp + βq) + v = α(p + v) + β(q + v) Sketch illustrates midpoint p = 1

  • and

q = 1 1

  • Translation vector v =

2 2

  • Farin & Hansford

The Essentials of CAGD 10 / 24

slide-11
SLIDE 11

Operations on Points and Vectors

The problem with non-barycentric combinations p = 1

  • and

q = 1 1

  • x = 2p + q =

1 3

  • Translation vector v =

2 2

  • ˆ

p = 2 3

  • ,

ˆ q = 3 3

  • ,

x + v = 3 5

  • ˆ

x = 2ˆ p + ˆ q = 7 9

  • = x + v!

Farin & Hansford The Essentials of CAGD 11 / 24

slide-12
SLIDE 12

Operations on Points and Vectors

Ratio of three (ordered) points ratio(p, x, q) = x − p q − x Ratios and barycentric coordinates: x = ap + bq where a + b = 1 ratio(p, x, q) = b : a = b a What if x not between p and q?

Farin & Hansford The Essentials of CAGD 12 / 24

slide-13
SLIDE 13

Products

Dot product or scalar product of vectors v and w 2D: v · w = vxwx + vywy 3D: v · w = vxwx + vywy + vzwz Angle α between v and w: cos(α) = v · w vw Length of a vector: v = √v · v When is v · w = 0?

Farin & Hansford The Essentials of CAGD 13 / 24

slide-14
SLIDE 14

Products

Cross product or vector product v ∧ w =   vywz − vzwy vzwx − vxwz vxwy − vywx   Cross product of two vectors is perpendicular to both of them

Farin & Hansford The Essentials of CAGD 14 / 24

slide-15
SLIDE 15

Products

Area of parallelogram spanned by v and w v ∧ w = vw sin(α) Application: area of a triangle When is v ∧ w = 0 ? Cross products are antisymmetric v ∧ w = −w ∧ v

Farin & Hansford The Essentials of CAGD 15 / 24

slide-16
SLIDE 16

Affine Maps

Used to move or modify a geometric figure Given: p ∈ E2 and affine map defined by 2 × 2 matrix A and v ∈ R2 ˆ p = Ap + v ∈ E2 (with help of origin point) A represents a linear map scale: 2 2

  • reflection:

1 −1

  • projection:

1

  • rotation:

cos(α) − sin(α) sin(α) cos(α)

  • shear:

1 3 1

  • How would you define a 3D affine map?

Farin & Hansford The Essentials of CAGD 16 / 24

slide-17
SLIDE 17

Affine Maps

Example Three collinear 2D points −1

  • 1
  • 2

1

  • Affine map

ˆ x = 1 1 1

  • x +

1

  • Images of points

−1

  • 1

1

  • 3

2

  • Midpoint mapped to midpoint!

Farin & Hansford The Essentials of CAGD 17 / 24

slide-18
SLIDE 18

Affine Maps

Properties:

  • Map points to points, lines to lines, and planes to planes
  • Leave the ratio of three collinear points unchanged
  • Parallel lines to parallel lines

– Two parallel lines mapped to ... – Two non-intersecting lines mapped to ...

  • Planes ...

Farin & Hansford The Essentials of CAGD 18 / 24

slide-19
SLIDE 19

Triangles and Tetrahedra

2D triangle T formed by three noncollinear points a, b, c Triangle area computed using a 3 × 3 determinant: area(a, b, c) = 1 2

  • 1

1 1 a b c

  • = 1

2

  • 1

1 1 ax bx cx ay by cy

  • Farin & Hansford

The Essentials of CAGD 19 / 24

slide-20
SLIDE 20

Triangles and Tetrahedra

Given p inside T Write p as a combination of the triangle vertices p = ua + vb + wc Combination of points ⇒ barycentric combination Find u, v, w by solving 3 equations in 3 unknowns

Farin & Hansford The Essentials of CAGD 20 / 24

slide-21
SLIDE 21

Triangles and Tetrahedra

u = area(p, b, c) area(a, b, c) v = area(p, c, a) area(a, b, c) w = area(p, a, b) area(a, b, c) barycentric coordinates u = (u, v, w)

Farin & Hansford The Essentials of CAGD 21 / 24

slide-22
SLIDE 22

Triangles and Tetrahedra

Barycentric coordinates not independent of each other – e.g., w = 1 − u − v Behave much like “normal” coordinates: – If p is given, can find u – If u is given, can find p Not necessary that p be inside T – Need signed area 3 vertices of the triangle have barycentric coordinates a ∼ = (1, 0, 0) b ∼ = (0, 1, 0) c ∼ = (0, 0, 1) A triangle may also be defined in 3D area(a, b, c) = 1 2[b − a] ∧ [c − a]

Farin & Hansford The Essentials of CAGD 22 / 24

slide-23
SLIDE 23

Triangles and Tetrahedra

Example: a =   −1   b =   2   c =   1 3   b − a =   −2 1   c − a =   1 4   v = (b − a) ∧ (c − a) =   8 1 −2   area(a, b, c) = √ 69 2

Farin & Hansford The Essentials of CAGD 23 / 24

slide-24
SLIDE 24

Triangles and Tetrahedra

Tetrahedron: four 3D points p1, p2, p3, p4

vol(p1, p2, p3, p4) = 1 6

  • 1

1 1 1 p1 p2 p3 p4

  • Example:

p1 =     p2 =   2   p3 =   3 3   p4 =   1 1 2  

vol = 1 6

  • 1

1 1 1 2 3 1 3 1 2

  • = 2

Farin & Hansford The Essentials of CAGD 24 / 24