The Essentials of CAGD Chapter 2: Lines and Planes Gerald Farin - - PowerPoint PPT Presentation

the essentials of cagd
SMART_READER_LITE
LIVE PREVIEW

The Essentials of CAGD Chapter 2: Lines and Planes Gerald Farin - - PowerPoint PPT Presentation

The Essentials of CAGD Chapter 2: Lines and Planes 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 2: Lines and Planes 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 / 27

slide-2
SLIDE 2

Outline

1

Introduction to Lines and Planes

2

Linear Interpolation

3

Line Forms

4

Planes

5

Linear Pieces: Polygons

6

Linear Pieces: Triangulations

7

Working with Triangulations

Farin & Hansford The Essentials of CAGD 2 / 27

slide-3
SLIDE 3

Introduction to Lines and Planes

Triangulation of the “Stanford bunny” Building blocks of polygons and triangles Fundamental operation: Linear interpolation

Farin & Hansford The Essentials of CAGD 3 / 27

slide-4
SLIDE 4

Linear Interpolation

Points p and q define a line How can we describe all points on this line? Imagine a particle x traversing the line Where is x(t) at any given time t? Want x(0) = p and x(1) = q x(t) = (1 − t)p + tq This is the parametric form of a line with parameter t What is t corresponds to the midpoint of the line segment?

Farin & Hansford The Essentials of CAGD 4 / 27

slide-5
SLIDE 5

Linear Interpolation

Example p = 20 2

  • q =

−10 −10

  • At t = 1

3:

x(1 3) = 2 3p + 1 3q = 10 −2

  • Domain is real numbers

Range of the map is x(t) Also: preimage, image

Farin & Hansford The Essentials of CAGD 5 / 27

slide-6
SLIDE 6

Linear Interpolation

Linear interpolation is an affine map – Ratios preserved ratio(0, t, 1) = t 1 − t and ratio(p, x(t), q) = t 1 − t

Farin & Hansford The Essentials of CAGD 6 / 27

slide-7
SLIDE 7

Linear Interpolation

3D parametric line Parameter t not restricted to [0, 1] Example p =   1 1 −1   q =   −1 1 2   At t = −1: x(−1) = 2p − q =   3 1 −4  

Farin & Hansford The Essentials of CAGD 7 / 27

slide-8
SLIDE 8

Linear Interpolation

Line segment between p and q over parameter interval [a, b] Parameter transformation: affine map taking u ∈ [a, b] to t ∈ [0, 1] t = u − a b − a and 1 − t = b − u b − a Global parameter u and Local parameter t

Farin & Hansford The Essentials of CAGD 8 / 27

slide-9
SLIDE 9

Linear Interpolation

Example p = 1900 1K

  • q =

2000 100K

  • What is the data point for the year 1990?

The year 1990 is a global parameter The local parameter for the line through p and q: t = 1990 − 1900 2000 − 1900 = 9 10 The data point for 1990: x( 9 10) = 1 10p + 9 10q = 1990 90100

  • Farin & Hansford

The Essentials of CAGD 9 / 27

slide-10
SLIDE 10

Line Forms

Parametric form: x(t) = (1 − t)p + tq Explicit form: y = ax + b (a is the slope, b is the y-intercept) Parametric form is more general What is explicit form of line through points

  • and

1

  • ?

No explicit 3D line form

Farin & Hansford The Essentials of CAGD 10 / 27

slide-11
SLIDE 11

Line Forms

Convert explicit to parametric: – Choose any two points on the line ... x(t) = x(t) y(t)

  • = (1 − t)

b

  • + t
  • 1

a + b

  • Rewrite parametric form: x(t) = p + t(q − p)

Let v = q − p and v⊥ perpendicular to v Point–normal form: v⊥[x − p] = 0 Let x = x y

  • then point–normal form transformed to

Implicit form: ax + by = c

Farin & Hansford The Essentials of CAGD 11 / 27

slide-12
SLIDE 12

Line Forms

Example Given implicit line 3x − 2y = 1 Are the following points on the line? p1 = 1 1

  • p2 =

−1 1

  • Sketch the implicit line

using parametric form x(t) = p + tv p = p1 v⊥ = 3 −2

  • ⇒ v =

2 3

  • Farin & Hansford

The Essentials of CAGD 12 / 27

slide-13
SLIDE 13

Planes

Plane defined by three noncollinear points p, q, r Point x in plane: x = up + vq + wr where u + v + w = 1 Volume of tetrahedron: vol(p, q, r, x) = 1 6

  • 1

1 1 1 p q r x

  • = 0

Why? Tetrahedron with zero volume is a plane ⇒ x is in the plane spanned by p, q, r

Farin & Hansford The Essentials of CAGD 13 / 27

slide-14
SLIDE 14

Planes

Point–vector form of a plane x = up + vq + wr = r + u(p − r) + v(q − r) Implicit form: Vector orthogonal (normal) to the plane n = [p − r] ∧ [q − r] Point–normal form: for any point x in the plane n[x − r] = 0 Transformed to ax + by + cz = d where x =   x y z   Which form best form for {testing if, calculating} x in the plane?

Farin & Hansford The Essentials of CAGD 14 / 27

slide-15
SLIDE 15

Planes

Example Given: three points

p =   1 1   q =   1 1   r =   1 1  

Find: implicit plane through points n = [p − r] ∧ [q − r] =   −1 −1 −1  

  −1 −1 −1   ·   x − 1 y − 1 z   = 0

x + y + z = 2

Farin & Hansford The Essentials of CAGD 15 / 27

slide-16
SLIDE 16

Linear Pieces: Polygons

Vertices: p1, . . . , pN Edges pi to pi+1 Polygons may be open or closed

Farin & Hansford The Essentials of CAGD 16 / 27

slide-17
SLIDE 17

Linear Pieces: Polygons

Closed polygons classified as convex or nonconvex Convexity tests:

  • 1. “Rubberband” test

Convex hull: area enclosed by rubberband

  • 2. Line segment inclusion test

Farin & Hansford The Essentials of CAGD 17 / 27

slide-18
SLIDE 18

Linear Pieces: Triangulations

Most fundamental entity in computer graphics: triangles Most rendering boils down to determining how a triangular facet interacts with the lighting model CAD/CAM has historically used triangles as a centerpiece geometric entity for computations such as tool paths and finite element analysis (FEM) – The reason: computations are very simple and fast

Farin & Hansford The Essentials of CAGD 18 / 27

slide-19
SLIDE 19

Linear Pieces: Triangulations

Triangulations can be generated through the use of laser digitizers – Scan an object using laser rays – Scanning generates x, y, z coordinates of points – Software creates triangulation Resulting triangulations tend to be large (100K + triangles) – “Digital Michelangelo” Project (2B triangles)

Farin & Hansford The Essentials of CAGD 19 / 27

slide-20
SLIDE 20

Linear Pieces: Triangulations

Triangulation: a set of triangles connecting a set of points in 2D or 3D A triangulation must satisfy the following conditions:

  • 1. Vertices of triangles consist of given points
  • 2. Interiors of any two triangles do not intersect
  • 3. If two triangles not disjoint, then share a vertex or have coinciding

edge

  • 4. All triangles oriented consistently – “outward” normals

Farin & Hansford The Essentials of CAGD 20 / 27

slide-21
SLIDE 21

Linear Pieces: Triangulations

Many possibilities for a data structure – might include

  • A point list
  • A triangle list
  • A neighbor list

Application dictates optimal data structure Bad example: STL (Stereo Lithography Language) – Data points listed multiply – Each triangle is given explicitly by its vertices – No neighbor information is given

Farin & Hansford The Essentials of CAGD 21 / 27

slide-22
SLIDE 22

Linear Pieces: Triangulations

Point list: p0, p1, p2, p3, p4, p5, p6 The triangle and neighbor lists: triangle vertices neighbors 1, 6, 4 5, −1, 2 1 5, 0, 3, −1, 3, −1 2 1, 2, 6 4, 0, −1 3 5, 3, 6 5, 4, 1 4 2, 5, 6 3, 2, −1 5 4, 6, 3 3, −1, 0

Farin & Hansford The Essentials of CAGD 22 / 27

slide-23
SLIDE 23

Working with Triangulations

Problem: Triangulation too dense for efficient representation Decimation: Reduction in size of a triangulation Remove as many triangles as possible while staying as close to the initial triangulation Basic idea: If multiple triangles part of one plane then replace by fewer triangles – Planarity tolerance

Farin & Hansford The Essentials of CAGD 23 / 27

slide-24
SLIDE 24

Working with Triangulations

Edge Collapse Decimation: Reduce the number of triangles by collapsing an edge – See previous Sketch: Marked edge collapsed to midpoint – Number of triangles reduced – Valid triangulation maintained – Repeat ...

Farin & Hansford The Essentials of CAGD 24 / 27

slide-25
SLIDE 25

Working with Triangulations

Star p⋆ of a point p: Set of all triangles having p as a vertex p⋆

6 consists triangles 0, 2, 3, 4, 5

Farin & Hansford The Essentials of CAGD 25 / 27

slide-26
SLIDE 26

Working with Triangulations

Edge collapse with a plane-based flatness test: Triangulation edge p and q Check if all triangles formed by p⋆ ∪ q⋆ are sufficiently planar – Form plane from centroid point and average normal – All points within a given tolerance to this plane? Yes: collapse edge

Farin & Hansford The Essentials of CAGD 26 / 27

slide-27
SLIDE 27

Working with Triangulations

Multiresolution representation: Fine to coarse triangulations Application: transmission through the internet

Farin & Hansford The Essentials of CAGD 27 / 27