2D Computer Graphics Diego Nehab Summer 2020 IMPA 1 Differential - - PowerPoint PPT Presentation

2d computer graphics
SMART_READER_LITE
LIVE PREVIEW

2D Computer Graphics Diego Nehab Summer 2020 IMPA 1 Differential - - PowerPoint PPT Presentation

2D Computer Graphics Diego Nehab Summer 2020 IMPA 1 Differential geometry A.k.a. characteristic function p 1 p Alternatively, using the Iverson bracket , p 1 p , where true 1 and false 0 Inside-outside test Ideal model is implicit Given


slide-1
SLIDE 1

2D Computer Graphics

Diego Nehab Summer 2020

IMPA 1

slide-2
SLIDE 2

Differential geometry

slide-3
SLIDE 3

Inside-outside test

Ideal model is implicit Given a region Ω ⊂ R2, defjne the indicator function 1Ω : R2 → {0, 1} 1Ω(p) =    1, p ∈ Ω 0, p ∈ Ω A.k.a. characteristic function p 1 p Alternatively, using the Iverson bracket, p 1 p , where true 1 and false

2

slide-4
SLIDE 4

Inside-outside test

Ideal model is implicit Given a region Ω ⊂ R2, defjne the indicator function 1Ω : R2 → {0, 1} 1Ω(p) =    1, p ∈ Ω 0, p ∈ Ω A.k.a. characteristic function χΩ(p) = 1Ω(p) Alternatively, using the Iverson bracket, p 1 p , where true 1 and false

2

slide-5
SLIDE 5

Inside-outside test

Ideal model is implicit Given a region Ω ⊂ R2, defjne the indicator function 1Ω : R2 → {0, 1} 1Ω(p) =    1, p ∈ Ω 0, p ∈ Ω A.k.a. characteristic function χΩ(p) = 1Ω(p) Alternatively, using the Iverson bracket, [p ∈ Ω] = 1Ω(p), where [true] = 1 and [false] = 0

2

slide-6
SLIDE 6

Inside-outside test

Simple shapes can be defjned as primitives

  • p, r < 0
  • ,

p, r ∈ RP2 f x y f R x y p c r p c R2 p s p1 t p2 1 s t p3 s t 1 s t R pi R2 Complex shapes can be defjned by logical expressions p r p c r Basis of CSG (constructive solid geometry)

3

slide-7
SLIDE 7

Inside-outside test

Simple shapes can be defjned as primitives

  • p, r < 0
  • ,

p, r ∈ RP2

  • f(x, y) < 0
  • ,

f ∈ R[x, y] p c r p c R2 p s p1 t p2 1 s t p3 s t 1 s t R pi R2 Complex shapes can be defjned by logical expressions p r p c r Basis of CSG (constructive solid geometry)

3

slide-8
SLIDE 8

Inside-outside test

Simple shapes can be defjned as primitives

  • p, r < 0
  • ,

p, r ∈ RP2

  • f(x, y) < 0
  • ,

f ∈ R[x, y]

  • |p − c| < r
  • ,

p, c ∈ R2 p s p1 t p2 1 s t p3 s t 1 s t R pi R2 Complex shapes can be defjned by logical expressions p r p c r Basis of CSG (constructive solid geometry)

3

slide-9
SLIDE 9

Inside-outside test

Simple shapes can be defjned as primitives

  • p, r < 0
  • ,

p, r ∈ RP2

  • f(x, y) < 0
  • ,

f ∈ R[x, y]

  • |p − c| < r
  • ,

p, c ∈ R2

  • p = s p1 + t p2 + (1 − s − t) p3 ∧ 0 ≤ s, t ≤ 1
  • ,

s, t ∈ R, pi ∈ R2 Complex shapes can be defjned by logical expressions p r p c r Basis of CSG (constructive solid geometry)

3

slide-10
SLIDE 10

Inside-outside test

Simple shapes can be defjned as primitives

  • p, r < 0
  • ,

p, r ∈ RP2

  • f(x, y) < 0
  • ,

f ∈ R[x, y]

  • |p − c| < r
  • ,

p, c ∈ R2

  • p = s p1 + t p2 + (1 − s − t) p3 ∧ 0 ≤ s, t ≤ 1
  • ,

s, t ∈ R, pi ∈ R2 Complex shapes can be defjned by logical expressions

  • p, r < 0
  • ∧ ¬
  • |p − c| < r
  • Basis of CSG (constructive solid geometry)

3

slide-11
SLIDE 11

Inside-outside test

Simple shapes can be defjned as primitives

  • p, r < 0
  • ,

p, r ∈ RP2

  • f(x, y) < 0
  • ,

f ∈ R[x, y]

  • |p − c| < r
  • ,

p, c ∈ R2

  • p = s p1 + t p2 + (1 − s − t) p3 ∧ 0 ≤ s, t ≤ 1
  • ,

s, t ∈ R, pi ∈ R2 Complex shapes can be defjned by logical expressions

  • p, r < 0
  • ∧ ¬
  • |p − c| < r
  • Basis of CSG (constructive solid geometry)

3

slide-12
SLIDE 12

Inside-outside test

More common to defjne interior by boundary (Jordan curve theorem) Let denote the boundary of region Let w p count the number of signed intersections with boundary when we move from p to infjnity in any direction w p is the winding number of the boundary around point p Defjne interior by odd or non-zero winding numbers w p 1 2

  • r

w p In a sense, the defjnition is still implicit But the “function” involves a complicated decision procedure How do we defjne the boundary?

4

slide-13
SLIDE 13

Inside-outside test

More common to defjne interior by boundary (Jordan curve theorem) Let ∂Ω denote the boundary of region Ω Let w p count the number of signed intersections with boundary when we move from p to infjnity in any direction w p is the winding number of the boundary around point p Defjne interior by odd or non-zero winding numbers w p 1 2

  • r

w p In a sense, the defjnition is still implicit But the “function” involves a complicated decision procedure How do we defjne the boundary?

4

slide-14
SLIDE 14

Inside-outside test

More common to defjne interior by boundary (Jordan curve theorem) Let ∂Ω denote the boundary of region Ω Let w(∂Ω, p) count the number of signed intersections with boundary ∂Ω when we move from p to infjnity in any direction w p is the winding number of the boundary around point p Defjne interior by odd or non-zero winding numbers w p 1 2

  • r

w p In a sense, the defjnition is still implicit But the “function” involves a complicated decision procedure How do we defjne the boundary?

4

slide-15
SLIDE 15

Inside-outside test

More common to defjne interior by boundary (Jordan curve theorem) Let ∂Ω denote the boundary of region Ω Let w(∂Ω, p) count the number of signed intersections with boundary ∂Ω when we move from p to infjnity in any direction w(∂Ω, p) is the winding number of the boundary ∂Ω around point p Defjne interior by odd or non-zero winding numbers w p 1 2

  • r

w p In a sense, the defjnition is still implicit But the “function” involves a complicated decision procedure How do we defjne the boundary?

4

slide-16
SLIDE 16

Inside-outside test

More common to defjne interior by boundary (Jordan curve theorem) Let ∂Ω denote the boundary of region Ω Let w(∂Ω, p) count the number of signed intersections with boundary ∂Ω when we move from p to infjnity in any direction w(∂Ω, p) is the winding number of the boundary ∂Ω around point p Defjne interior by odd or non-zero winding numbers

  • w(∂Ω, p) = 1 (mod 2)
  • r
  • w(∂Ω, p) = 0]

In a sense, the defjnition is still implicit But the “function” involves a complicated decision procedure How do we defjne the boundary?

4

slide-17
SLIDE 17

Inside-outside test

More common to defjne interior by boundary (Jordan curve theorem) Let ∂Ω denote the boundary of region Ω Let w(∂Ω, p) count the number of signed intersections with boundary ∂Ω when we move from p to infjnity in any direction w(∂Ω, p) is the winding number of the boundary ∂Ω around point p Defjne interior by odd or non-zero winding numbers

  • w(∂Ω, p) = 1 (mod 2)
  • r
  • w(∂Ω, p) = 0]

In a sense, the defjnition is still implicit But the “function” involves a complicated decision procedure How do we defjne the boundary?

4

slide-18
SLIDE 18

Inside-outside test

More common to defjne interior by boundary (Jordan curve theorem) Let ∂Ω denote the boundary of region Ω Let w(∂Ω, p) count the number of signed intersections with boundary ∂Ω when we move from p to infjnity in any direction w(∂Ω, p) is the winding number of the boundary ∂Ω around point p Defjne interior by odd or non-zero winding numbers

  • w(∂Ω, p) = 1 (mod 2)
  • r
  • w(∂Ω, p) = 0]

In a sense, the defjnition is still implicit But the “function” involves a complicated decision procedure How do we defjne the boundary?

4

slide-19
SLIDE 19

Inside-outside test

More common to defjne interior by boundary (Jordan curve theorem) Let ∂Ω denote the boundary of region Ω Let w(∂Ω, p) count the number of signed intersections with boundary ∂Ω when we move from p to infjnity in any direction w(∂Ω, p) is the winding number of the boundary ∂Ω around point p Defjne interior by odd or non-zero winding numbers

  • w(∂Ω, p) = 1 (mod 2)
  • r
  • w(∂Ω, p) = 0]

In a sense, the defjnition is still implicit But the “function” involves a complicated decision procedure How do we defjne the boundary?

4

slide-20
SLIDE 20

Planar parametric curve

Piecewise differentiable function α : I ⊂ R → R2 from an interval I to R2 t → α(t) =

  • x(t), y(t)
  • x y are the coordinate functions of

When I a b , we say the curve is closed if a b 0 2 R2 t r t r t The trace I is image of I through . It is the trace that we care about A subset S R2 is parametrized by if there is I R such that I S A subset S R2 can be parametrized in many different ways a b R2 t r t r t b a 2

5

slide-21
SLIDE 21

Planar parametric curve

Piecewise differentiable function α : I ⊂ R → R2 from an interval I to R2 t → α(t) =

  • x(t), y(t)
  • x, y are the coordinate functions of α

When I a b , we say the curve is closed if a b 0 2 R2 t r t r t The trace I is image of I through . It is the trace that we care about A subset S R2 is parametrized by if there is I R such that I S A subset S R2 can be parametrized in many different ways a b R2 t r t r t b a 2

5

slide-22
SLIDE 22

Planar parametric curve

Piecewise differentiable function α : I ⊂ R → R2 from an interval I to R2 t → α(t) =

  • x(t), y(t)
  • x, y are the coordinate functions of α

When I = [a, b], we say the curve α is closed if α(a) = α(b) α: [0, 2π] → R2 α(t) = (r cos t, r sin t) The trace I is image of I through . It is the trace that we care about A subset S R2 is parametrized by if there is I R such that I S A subset S R2 can be parametrized in many different ways a b R2 t r t r t b a 2

5

slide-23
SLIDE 23

Planar parametric curve

Piecewise differentiable function α : I ⊂ R → R2 from an interval I to R2 t → α(t) =

  • x(t), y(t)
  • x, y are the coordinate functions of α

When I = [a, b], we say the curve α is closed if α(a) = α(b) α: [0, 2π] → R2 α(t) = (r cos t, r sin t) The trace α(I) is image of I through α. It is the trace that we care about A subset S R2 is parametrized by if there is I R such that I S A subset S R2 can be parametrized in many different ways a b R2 t r t r t b a 2

5

slide-24
SLIDE 24

Planar parametric curve

Piecewise differentiable function α : I ⊂ R → R2 from an interval I to R2 t → α(t) =

  • x(t), y(t)
  • x, y are the coordinate functions of α

When I = [a, b], we say the curve α is closed if α(a) = α(b) α: [0, 2π] → R2 α(t) = (r cos t, r sin t) The trace α(I) is image of I through α. It is the trace that we care about A subset S ⊂ R2 is parametrized by α if there is I ⊂ R such that α(I) = S A subset S R2 can be parametrized in many different ways a b R2 t r t r t b a 2

5

slide-25
SLIDE 25

Planar parametric curve

Piecewise differentiable function α : I ⊂ R → R2 from an interval I to R2 t → α(t) =

  • x(t), y(t)
  • x, y are the coordinate functions of α

When I = [a, b], we say the curve α is closed if α(a) = α(b) α: [0, 2π] → R2 α(t) = (r cos t, r sin t) The trace α(I) is image of I through α. It is the trace that we care about A subset S ⊂ R2 is parametrized by α if there is I ⊂ R such that α(I) = S A subset S ⊂ R2 can be parametrized in many different ways β : [a, b] → R2 β(t) =

  • r cos(ωt + φ), r sin(ωt + φ)
  • ,

b − a ≥ 2π ω

5

slide-26
SLIDE 26

Regularity, velocity, and tangent

Let α : I → R2 be a parameterization of S ⊂ R2. The velocity vector is t x t y t A regular point t is a point where t exists and t

  • What if

t 0? A is curve is regular in J I if all points in J are regular The speed is given by v t t If t is regular, T t t v t is the unit tangent to Are SVG paths regular? Are individual SVG segments regular?

6

slide-27
SLIDE 27

Regularity, velocity, and tangent

Let α : I → R2 be a parameterization of S ⊂ R2. The velocity vector is α′(t) =

  • x′(t), y′(t)
  • A regular point

t is a point where t exists and t

  • What if

t 0? A is curve is regular in J I if all points in J are regular The speed is given by v t t If t is regular, T t t v t is the unit tangent to Are SVG paths regular? Are individual SVG segments regular?

6

slide-28
SLIDE 28

Regularity, velocity, and tangent

Let α : I → R2 be a parameterization of S ⊂ R2. The velocity vector is α′(t) =

  • x′(t), y′(t)
  • A regular point α(t) is a point where α′(t) exists and α′(t) = 0
  • What if α′(t) = 0?

A is curve is regular in J I if all points in J are regular The speed is given by v t t If t is regular, T t t v t is the unit tangent to Are SVG paths regular? Are individual SVG segments regular?

6

slide-29
SLIDE 29

Regularity, velocity, and tangent

Let α : I → R2 be a parameterization of S ⊂ R2. The velocity vector is α′(t) =

  • x′(t), y′(t)
  • A regular point α(t) is a point where α′(t) exists and α′(t) = 0
  • What if α′(t) = 0?

A is curve α is regular in J ⊂ I if all points in α(J) are regular The speed is given by v t t If t is regular, T t t v t is the unit tangent to Are SVG paths regular? Are individual SVG segments regular?

6

slide-30
SLIDE 30

Regularity, velocity, and tangent

Let α : I → R2 be a parameterization of S ⊂ R2. The velocity vector is α′(t) =

  • x′(t), y′(t)
  • A regular point α(t) is a point where α′(t) exists and α′(t) = 0
  • What if α′(t) = 0?

A is curve α is regular in J ⊂ I if all points in α(J) are regular The speed is given by v(t) = α′(t) If t is regular, T t t v t is the unit tangent to Are SVG paths regular? Are individual SVG segments regular?

6

slide-31
SLIDE 31

Regularity, velocity, and tangent

Let α : I → R2 be a parameterization of S ⊂ R2. The velocity vector is α′(t) =

  • x′(t), y′(t)
  • A regular point α(t) is a point where α′(t) exists and α′(t) = 0
  • What if α′(t) = 0?

A is curve α is regular in J ⊂ I if all points in α(J) are regular The speed is given by v(t) = α′(t) If α(t) is regular, T(t) = α′(t)/v(t) is the unit tangent to α Are SVG paths regular? Are individual SVG segments regular?

6

slide-32
SLIDE 32

Regularity, velocity, and tangent

Let α : I → R2 be a parameterization of S ⊂ R2. The velocity vector is α′(t) =

  • x′(t), y′(t)
  • A regular point α(t) is a point where α′(t) exists and α′(t) = 0
  • What if α′(t) = 0?

A is curve α is regular in J ⊂ I if all points in α(J) are regular The speed is given by v(t) = α′(t) If α(t) is regular, T(t) = α′(t)/v(t) is the unit tangent to α Are SVG paths regular? Are individual SVG segments regular?

6

slide-33
SLIDE 33

Regularity, velocity, and tangent

Let α : I → R2 be a parameterization of S ⊂ R2. The velocity vector is α′(t) =

  • x′(t), y′(t)
  • A regular point α(t) is a point where α′(t) exists and α′(t) = 0
  • What if α′(t) = 0?

A is curve α is regular in J ⊂ I if all points in α(J) are regular The speed is given by v(t) = α′(t) If α(t) is regular, T(t) = α′(t)/v(t) is the unit tangent to α Are SVG paths regular? Are individual SVG segments regular?

6

slide-34
SLIDE 34

Arc length

The arc-length of a curve segment α : [a, b] → R2 is s = b

a

  • α′(t)
  • dt
  • Makes sense from physics’ time integral of speed
  • Also makes sense from rectifjcation

Not all curves have a length

  • E.g.

t t 1 t t 0 1

  • Koch snowfmake

7

slide-35
SLIDE 35

Arc length

The arc-length of a curve segment α : [a, b] → R2 is s = b

a

  • α′(t)
  • dt
  • Makes sense from physics’ time integral of speed
  • Also makes sense from rectifjcation

Not all curves have a length

  • E.g. α(t) = t sin(1/t),

t ∈ [0, 1]

  • Koch snowfmake

7

slide-36
SLIDE 36

Arc length

The arc-length of a curve segment α : [a, b] → R2 is s = b

a

  • α′(t)
  • dt
  • Makes sense from physics’ time integral of speed
  • Also makes sense from rectifjcation

Not all curves have a length

  • E.g. α(t) = t sin(1/t),

t ∈ [0, 1]

  • Koch snowfmake

7

slide-37
SLIDE 37

Reparameterization

A curve β : J → R2 is a reparameterization of α if there is a monotonic differentiable function h : J → I such that β = α ◦ h

  • A positive reparameterization has h′(J) ⊂ R>0
  • A negative reparameterization has h′(J) ⊂ R<0

The arc-length is invariant to reparameterizations c d R2

d c

t dt

d c

h t h t dt

b a

u du u h t

8

slide-38
SLIDE 38

Reparameterization

A curve β : J → R2 is a reparameterization of α if there is a monotonic differentiable function h : J → I such that β = α ◦ h

  • A positive reparameterization has h′(J) ⊂ R>0
  • A negative reparameterization has h′(J) ⊂ R<0

The arc-length is invariant to reparameterizations β : [c, d] → R2 d

c

  • β′(t)
  • dt

d c

h t h t dt

b a

u du u h t

8

slide-39
SLIDE 39

Reparameterization

A curve β : J → R2 is a reparameterization of α if there is a monotonic differentiable function h : J → I such that β = α ◦ h

  • A positive reparameterization has h′(J) ⊂ R>0
  • A negative reparameterization has h′(J) ⊂ R<0

The arc-length is invariant to reparameterizations β : [c, d] → R2 d

c

  • β′(t)
  • dt =

d

c

|α′(h(t))| h′(t) dt

b a

u du u h t

8

slide-40
SLIDE 40

Reparameterization

A curve β : J → R2 is a reparameterization of α if there is a monotonic differentiable function h : J → I such that β = α ◦ h

  • A positive reparameterization has h′(J) ⊂ R>0
  • A negative reparameterization has h′(J) ⊂ R<0

The arc-length is invariant to reparameterizations β : [c, d] → R2 d

c

  • β′(t)
  • dt =

d

c

|α′(h(t))| h′(t) dt = b

a

|α′(u)| du

  • u = h(t)
  • 8
slide-41
SLIDE 41

Arc-length reparameterization

Let α : (a, b) → R2 be a curve. The arc-length function of α is defjned by s(t) = t

a

  • α′(t)
  • dt

Every regular curve admits an arc-length reparameterization Regularity means s t t 0, which means s t is strictly increasing, which means s has a differentiable inverse u with u t 1 s u t 1 u t Consider u t u t u t u t u t 1 We get s t

t c

t dt t c

9

slide-42
SLIDE 42

Arc-length reparameterization

Let α : (a, b) → R2 be a curve. The arc-length function of α is defjned by s(t) = t

a

  • α′(t)
  • dt

Every regular curve admits an arc-length reparameterization Regularity means s t t 0, which means s t is strictly increasing, which means s has a differentiable inverse u with u t 1 s u t 1 u t Consider u t u t u t u t u t 1 We get s t

t c

t dt t c

9

slide-43
SLIDE 43

Arc-length reparameterization

Let α : (a, b) → R2 be a curve. The arc-length function of α is defjned by s(t) = t

a

  • α′(t)
  • dt

Every regular curve admits an arc-length reparameterization Regularity means s′(t) = |α′(t)| > 0, which means s(t) is strictly increasing, which means s has a differentiable inverse u with u′(t) = 1 s′ u(t) = 1

  • α′

u(t)

  • Consider

u t u t u t u t u t 1 We get s t

t c

t dt t c

9

slide-44
SLIDE 44

Arc-length reparameterization

Let α : (a, b) → R2 be a curve. The arc-length function of α is defjned by s(t) = t

a

  • α′(t)
  • dt

Every regular curve admits an arc-length reparameterization Regularity means s′(t) = |α′(t)| > 0, which means s(t) is strictly increasing, which means s has a differentiable inverse u with u′(t) = 1 s′ u(t) = 1

  • α′

u(t)

  • Consider β = α ◦ u

|β′(t)| u t u t u t u t 1 We get s t

t c

t dt t c

9

slide-45
SLIDE 45

Arc-length reparameterization

Let α : (a, b) → R2 be a curve. The arc-length function of α is defjned by s(t) = t

a

  • α′(t)
  • dt

Every regular curve admits an arc-length reparameterization Regularity means s′(t) = |α′(t)| > 0, which means s(t) is strictly increasing, which means s has a differentiable inverse u with u′(t) = 1 s′ u(t) = 1

  • α′

u(t)

  • Consider β = α ◦ u

|β′(t)| =

  • α′

u(t)

  • u′(t)
  • u t

u t 1 We get s t

t c

t dt t c

9

slide-46
SLIDE 46

Arc-length reparameterization

Let α : (a, b) → R2 be a curve. The arc-length function of α is defjned by s(t) = t

a

  • α′(t)
  • dt

Every regular curve admits an arc-length reparameterization Regularity means s′(t) = |α′(t)| > 0, which means s(t) is strictly increasing, which means s has a differentiable inverse u with u′(t) = 1 s′ u(t) = 1

  • α′

u(t)

  • Consider β = α ◦ u

|β′(t)| =

  • α′

u(t)

  • u′(t)
  • =
  • α′

u(t)

  • α′

u(t)

  • = 1

We get s t

t c

t dt t c

9

slide-47
SLIDE 47

Arc-length reparameterization

Let α : (a, b) → R2 be a curve. The arc-length function of α is defjned by s(t) = t

a

  • α′(t)
  • dt

Every regular curve admits an arc-length reparameterization Regularity means s′(t) = |α′(t)| > 0, which means s(t) is strictly increasing, which means s has a differentiable inverse u with u′(t) = 1 s′ u(t) = 1

  • α′

u(t)

  • Consider β = α ◦ u

|β′(t)| =

  • α′

u(t)

  • u′(t)
  • =
  • α′

u(t)

  • α′

u(t)

  • = 1

We get s(t) = t

c

  • β′(t)
  • dt = t − c

9

slide-48
SLIDE 48

Arc-length reparameterization

This is easier said than done Canonic parabola y2 4ax with focus at a 0 and directrix x a t at2 2at t 2a 1 t2

t

t dt at t2 1 a t2 1 t Standard ellipse t a t b t t b 1 m

2 t

m 1

a2 b2 t

t dt Elliptic integral of the second kind

10

slide-49
SLIDE 49

Arc-length reparameterization

This is easier said than done Canonic parabola y2 = 4ax with focus at (a, 0) and directrix x = −a α(t) = (at2, 2at) ⇒

  • α′(t)
  • = 2a
  • 1 + t2

t

  • α′(t)
  • dt = at
  • t2 + 1 + a log
  • t2 + 1 + t
  • Standard ellipse

t a t b t t b 1 m

2 t

m 1

a2 b2 t

t dt Elliptic integral of the second kind

10

slide-50
SLIDE 50

Arc-length reparameterization

This is easier said than done Canonic parabola y2 = 4ax with focus at (a, 0) and directrix x = −a α(t) = (at2, 2at) ⇒

  • α′(t)
  • = 2a
  • 1 + t2

t

  • α′(t)
  • dt = at
  • t2 + 1 + a log
  • t2 + 1 + t
  • Standard ellipse

β(t) = (a cos t, b sin t) ⇒

  • β′(t)
  • = b
  • 1 − m sin2(t),

m = 1 − a2

b2

t

  • β′(t)
  • dt = Elliptic integral of the second kind

10

slide-51
SLIDE 51

Curvature

Let β(t) be an arc-length parameterization T(t) = β′(t) is the unit tangent to β T t t is normal to T t T t 1 T t T t t T t is the curvature of t 1 t is the radius of curvature of t and t measure the way curve is turning N t T t T t is the unit normal to

11

slide-52
SLIDE 52

Curvature

Let β(t) be an arc-length parameterization T(t) = β′(t) is the unit tangent to β T′(t) = β′′(t) is normal to β

  • T(t), T(t)
  • = 1

  • T′(t), T(t)
  • = 0

t T t is the curvature of t 1 t is the radius of curvature of t and t measure the way curve is turning N t T t T t is the unit normal to

11

slide-53
SLIDE 53

Curvature

Let β(t) be an arc-length parameterization T(t) = β′(t) is the unit tangent to β T′(t) = β′′(t) is normal to β

  • T(t), T(t)
  • = 1

  • T′(t), T(t)
  • = 0

κ(t) =

  • T′(t)
  • is the curvature of β

t 1 t is the radius of curvature of t and t measure the way curve is turning N t T t T t is the unit normal to

11

slide-54
SLIDE 54

Curvature

Let β(t) be an arc-length parameterization T(t) = β′(t) is the unit tangent to β T′(t) = β′′(t) is normal to β

  • T(t), T(t)
  • = 1

  • T′(t), T(t)
  • = 0

κ(t) =

  • T′(t)
  • is the curvature of β

ρ(t) = 1/κ(t) is the radius of curvature of β t and t measure the way curve is turning N t T t T t is the unit normal to

11

slide-55
SLIDE 55

Curvature

Let β(t) be an arc-length parameterization T(t) = β′(t) is the unit tangent to β T′(t) = β′′(t) is normal to β

  • T(t), T(t)
  • = 1

  • T′(t), T(t)
  • = 0

κ(t) =

  • T′(t)
  • is the curvature of β

ρ(t) = 1/κ(t) is the radius of curvature of β κ(t) and ρ(t) measure the way curve β is turning N t T t T t is the unit normal to

11

slide-56
SLIDE 56

Curvature

Let β(t) be an arc-length parameterization T(t) = β′(t) is the unit tangent to β T′(t) = β′′(t) is normal to β

  • T(t), T(t)
  • = 1

  • T′(t), T(t)
  • = 0

κ(t) =

  • T′(t)
  • is the curvature of β

ρ(t) = 1/κ(t) is the radius of curvature of β κ(t) and ρ(t) measure the way curve β is turning N(t) = T′(t)/

  • T′(t)
  • is the unit normal to β

11

slide-57
SLIDE 57

Curvature

If β is an arc-length parameterization,

  • β′(t) × β′′(t)
  • =
  • T(t) × κ(t)N(t)
  • = κ(t)

If is a general parameterization with u, we obtain t u u u u u u

2

u u u u u u

2

u u u 3 u u u

3 12

slide-58
SLIDE 58

Curvature

If β is an arc-length parameterization,

  • β′(t) × β′′(t)
  • =
  • T(t) × κ(t)N(t)
  • = κ(t)

If α is a general parameterization with β = α ◦ u, we obtain κ(t) =

  • α(u)′ × α(u)′′
  • u u

u u

2

u u u u u u

2

u u u 3 u u u

3 12

slide-59
SLIDE 59

Curvature

If β is an arc-length parameterization,

  • β′(t) × β′′(t)
  • =
  • T(t) × κ(t)N(t)
  • = κ(t)

If α is a general parameterization with β = α ◦ u, we obtain κ(t) =

  • α(u)′ × α(u)′′
  • =
  • α′(u) u′ ×
  • α′′(u)(u′)2 + α′(u) u′′
  • u u

u u

2

u u u 3 u u u

3 12

slide-60
SLIDE 60

Curvature

If β is an arc-length parameterization,

  • β′(t) × β′′(t)
  • =
  • T(t) × κ(t)N(t)
  • = κ(t)

If α is a general parameterization with β = α ◦ u, we obtain κ(t) =

  • α(u)′ × α(u)′′
  • =
  • α′(u) u′ ×
  • α′′(u)(u′)2 + α′(u) u′′
  • =
  • α′(u) u′ × α′′(u) (u′)2
  • u

u u 3 u u u

3 12

slide-61
SLIDE 61

Curvature

If β is an arc-length parameterization,

  • β′(t) × β′′(t)
  • =
  • T(t) × κ(t)N(t)
  • = κ(t)

If α is a general parameterization with β = α ◦ u, we obtain κ(t) =

  • α(u)′ × α(u)′′
  • =
  • α′(u) u′ ×
  • α′′(u)(u′)2 + α′(u) u′′
  • =
  • α′(u) u′ × α′′(u) (u′)2
  • =
  • α′(u) × α′′(u)
  • |u′|3

u u u

3 12

slide-62
SLIDE 62

Curvature

If β is an arc-length parameterization,

  • β′(t) × β′′(t)
  • =
  • T(t) × κ(t)N(t)
  • = κ(t)

If α is a general parameterization with β = α ◦ u, we obtain κ(t) =

  • α(u)′ × α(u)′′
  • =
  • α′(u) u′ ×
  • α′′(u)(u′)2 + α′(u) u′′
  • =
  • α′(u) u′ × α′′(u) (u′)2
  • =
  • α′(u) × α′′(u)
  • |u′|3

=

  • α′(u) × α′′(u)
  • α′(u)
  • 3

12

slide-63
SLIDE 63

Curvature

For planar curves, the normal N(t) as the right-hand rotation of T(t) Then defjne the signed curvature t u u u

3

Either way, the center of curvature for a curve is at t t N t The osculating circle has the center and radius of curvature An infmection is a point where the curvature vanishes I.e. where the 1st and 2nd derivatives are collinear

13

slide-64
SLIDE 64

Curvature

For planar curves, the normal N(t) as the right-hand rotation of T(t) Then defjne the signed curvature κ(t) = α′(u) × α′′(u)

  • α′(u)
  • 3

Either way, the center of curvature for a curve is at t t N t The osculating circle has the center and radius of curvature An infmection is a point where the curvature vanishes I.e. where the 1st and 2nd derivatives are collinear

13

slide-65
SLIDE 65

Curvature

For planar curves, the normal N(t) as the right-hand rotation of T(t) Then defjne the signed curvature κ(t) = α′(u) × α′′(u)

  • α′(u)
  • 3

Either way, the center of curvature for a curve α is at α(t) + ρ(t)N(t) The osculating circle has the center and radius of curvature An infmection is a point where the curvature vanishes I.e. where the 1st and 2nd derivatives are collinear

13

slide-66
SLIDE 66

Curvature

For planar curves, the normal N(t) as the right-hand rotation of T(t) Then defjne the signed curvature κ(t) = α′(u) × α′′(u)

  • α′(u)
  • 3

Either way, the center of curvature for a curve α is at α(t) + ρ(t)N(t) The osculating circle has the center and radius of curvature An infmection is a point where the curvature vanishes I.e. where the 1st and 2nd derivatives are collinear

13

slide-67
SLIDE 67

Curvature

For planar curves, the normal N(t) as the right-hand rotation of T(t) Then defjne the signed curvature κ(t) = α′(u) × α′′(u)

  • α′(u)
  • 3

Either way, the center of curvature for a curve α is at α(t) + ρ(t)N(t) The osculating circle has the center and radius of curvature An infmection is a point where the curvature vanishes I.e. where the 1st and 2nd derivatives are collinear

13

slide-68
SLIDE 68

Stroking

A different way of specifying the interior Given a curve I R2 and a stroke width w R, we can defjne endpoints p1 p2 R2 p1 t t

w 2 N t

and p2 t t

w 2 N t

We can then defjne the line segment t 1 u p1 t u p2 t u 1 (1) The stroked region is p t t I How to decide if point p belongs to the stroked curve segment? Dashing requires the arc length

14

slide-69
SLIDE 69

Stroking

A different way of specifying the interior Given a curve α : I → R2 and a stroke width w ∈ R, we can defjne endpoints p1, p2 ∈ R2 p1(t) = α(t) + w

2 N(t)

and p2(t) = α(t) − w

2 N(t)

We can then defjne the line segment t 1 u p1 t u p2 t u 1 (1) The stroked region is p t t I How to decide if point p belongs to the stroked curve segment? Dashing requires the arc length

14

slide-70
SLIDE 70

Stroking

A different way of specifying the interior Given a curve α : I → R2 and a stroke width w ∈ R, we can defjne endpoints p1, p2 ∈ R2 p1(t) = α(t) + w

2 N(t)

and p2(t) = α(t) − w

2 N(t)

We can then defjne the line segment ℓ(t) =

  • (1 − u) p1(t) + u p2(t), 0 < u < 1
  • (1)

The stroked region is p t t I How to decide if point p belongs to the stroked curve segment? Dashing requires the arc length

14

slide-71
SLIDE 71

Stroking

A different way of specifying the interior Given a curve α : I → R2 and a stroke width w ∈ R, we can defjne endpoints p1, p2 ∈ R2 p1(t) = α(t) + w

2 N(t)

and p2(t) = α(t) − w

2 N(t)

We can then defjne the line segment ℓ(t) =

  • (1 − u) p1(t) + u p2(t), 0 < u < 1
  • (1)

The stroked region is

  • p ∈ ℓ(t), t ∈ I
  • How to decide if point p belongs to the stroked curve segment?

Dashing requires the arc length

14

slide-72
SLIDE 72

Stroking

A different way of specifying the interior Given a curve α : I → R2 and a stroke width w ∈ R, we can defjne endpoints p1, p2 ∈ R2 p1(t) = α(t) + w

2 N(t)

and p2(t) = α(t) − w

2 N(t)

We can then defjne the line segment ℓ(t) =

  • (1 − u) p1(t) + u p2(t), 0 < u < 1
  • (1)

The stroked region is

  • p ∈ ℓ(t), t ∈ I
  • How to decide if point p belongs to the stroked curve segment?

Dashing requires the arc length

14

slide-73
SLIDE 73

Stroking

A different way of specifying the interior Given a curve α : I → R2 and a stroke width w ∈ R, we can defjne endpoints p1, p2 ∈ R2 p1(t) = α(t) + w

2 N(t)

and p2(t) = α(t) − w

2 N(t)

We can then defjne the line segment ℓ(t) =

  • (1 − u) p1(t) + u p2(t), 0 < u < 1
  • (1)

The stroked region is

  • p ∈ ℓ(t), t ∈ I
  • How to decide if point p belongs to the stroked curve segment?

Dashing requires the arc length

14

slide-74
SLIDE 74

Bézier curves

Find a simple formula for the curvature at t = 0 Let curve t have endpoints p0 p1 p2 pn n p1 p0 and n 1 n p2 p1 p1 p0

3

n 1 n p1 p0 p2 p1 p1 p0 3 n 1 n h a2 How would you compute the arc length? [Jüttler, 1997] Show offset and evolute curves

15

slide-75
SLIDE 75

Bézier curves

Find a simple formula for the curvature at t = 0 Let curve α(t) have endpoints p0, p1, p2, . . . , pn α′(0) = n(p1 − p0) and α′′(0) = (n − 1)n

  • (p2 − p1) − (p1 − p0)
  • 3

n 1 n p1 p0 p2 p1 p1 p0 3 n 1 n h a2 How would you compute the arc length? [Jüttler, 1997] Show offset and evolute curves

15

slide-76
SLIDE 76

Bézier curves

Find a simple formula for the curvature at t = 0 Let curve α(t) have endpoints p0, p1, p2, . . . , pn α′(0) = n(p1 − p0) and α′′(0) = (n − 1)n

  • (p2 − p1) − (p1 − p0)
  • κ(0) = α′(0) × α′′(0)
  • α′(0)
  • 3

n 1 n p1 p0 p2 p1 p1 p0 3 n 1 n h a2 How would you compute the arc length? [Jüttler, 1997] Show offset and evolute curves

15

slide-77
SLIDE 77

Bézier curves

Find a simple formula for the curvature at t = 0 Let curve α(t) have endpoints p0, p1, p2, . . . , pn α′(0) = n(p1 − p0) and α′′(0) = (n − 1)n

  • (p2 − p1) − (p1 − p0)
  • κ(0) = α′(0) × α′′(0)
  • α′(0)
  • 3

= n − 1 n (p1 − p0) × (p2 − p1) |p1 − p0|3 n 1 n h a2 How would you compute the arc length? [Jüttler, 1997] Show offset and evolute curves

15

slide-78
SLIDE 78

Bézier curves

Find a simple formula for the curvature at t = 0 Let curve α(t) have endpoints p0, p1, p2, . . . , pn α′(0) = n(p1 − p0) and α′′(0) = (n − 1)n

  • (p2 − p1) − (p1 − p0)
  • κ(0) = α′(0) × α′′(0)
  • α′(0)
  • 3

= n − 1 n (p1 − p0) × (p2 − p1) |p1 − p0|3 = n − 1 n h a2 How would you compute the arc length? [Jüttler, 1997] Show offset and evolute curves

15

slide-79
SLIDE 79

Bézier curves

Find a simple formula for the curvature at t = 0 Let curve α(t) have endpoints p0, p1, p2, . . . , pn α′(0) = n(p1 − p0) and α′′(0) = (n − 1)n

  • (p2 − p1) − (p1 − p0)
  • κ(0) = α′(0) × α′′(0)
  • α′(0)
  • 3

= n − 1 n (p1 − p0) × (p2 − p1) |p1 − p0|3 = n − 1 n h a2 How would you compute the arc length? [Jüttler, 1997] Show offset and evolute curves

15

slide-80
SLIDE 80

Bézier curves

Find a simple formula for the curvature at t = 0 Let curve α(t) have endpoints p0, p1, p2, . . . , pn α′(0) = n(p1 − p0) and α′′(0) = (n − 1)n

  • (p2 − p1) − (p1 − p0)
  • κ(0) = α′(0) × α′′(0)
  • α′(0)
  • 3

= n − 1 n (p1 − p0) × (p2 − p1) |p1 − p0|3 = n − 1 n h a2 How would you compute the arc length? [Jüttler, 1997] Show offset and evolute curves

15

slide-81
SLIDE 81

References

  • B. Jüttler. A vegetarian approach to optimal parameterizations.

Computer Aided Geometric Design, 14(9):887–890, 1997.

  • E. Kreyszig. Differential Geometry. Dover, 1991.
  • B. O’Neill. Elementary Differential Geometry. Academic Press, revised

2nd edition, 2006.

16