parametric spline curves 1 curves used in many contexts fonts - - PowerPoint PPT Presentation

parametric spline curves
SMART_READER_LITE
LIVE PREVIEW

parametric spline curves 1 curves used in many contexts fonts - - PowerPoint PPT Presentation

parametric spline curves 1 curves used in many contexts fonts (2D) animation paths (3D) shape modeling (3D) different representation implicit curves parametric curves (mostly used) 2D and 3D curves are mostly the same use vector notation


slide-1
SLIDE 1

parametric spline curves

1

slide-2
SLIDE 2

curves

used in many contexts fonts (2D) animation paths (3D) shape modeling (3D) different representation implicit curves parametric curves (mostly used) 2D and 3D curves are mostly the same use vector notation to simplify treatment

2

slide-3
SLIDE 3

implicit representation

implicit curve representation e.g. XY circle:

f(P) = 0 f(P) = 0 → + − = 0 x2 y2 r2

3

slide-4
SLIDE 4

parametric representation

parametric curve representation e.g. XY circle:

P(u) = ( (u), (u), (u)) fx fy fz P(u) = (rcos θ,rsinθ,0)

4

slide-5
SLIDE 5

parametric representation

goals when defining smoothness efficiency local control curve controls only affect a piece of the curve predictable behaviour easy to use for designers

f

5

slide-6
SLIDE 6

splines

6

slide-7
SLIDE 7

splines

splines: piecewise parametric polynomials split curve into segments at intervals uniform splines: split at integer intervals each segment is a polynomial: smooth and efficient piecewise curve, i.e. splitting: local control

P(t) N (t − ) Ps ts ts ∈ 0,1,2 ⋯ ts Ps P(t) = (t − ) with t ∈ [0,N),t − ∈ [0,1) Ps ts ts

7

slide-8
SLIDE 8

splines

intuition: define segment by "blending" control points intuition: join segments to from a curve

8

slide-9
SLIDE 9

splines

approximating: guided by control points interpolating: pass through control points

9

slide-10
SLIDE 10

defining splines

pick segment interpolating function smoothness pick segment control points local control impose constraints to define segments join segments together ensure smoothness

10

slide-11
SLIDE 11

defining splines

smoothness described by degree of continuity : same position at each side of joints : same tangent at each side of joints : same curvature at each side of joints : -th derivative defined at joints

C 0 C 1 C 2 C n n

11

slide-12
SLIDE 12

defining splines

local control: control points affects the curve locally easy to control, true for all splines

12

slide-13
SLIDE 13

defining splines

convex hull: smallest convex region enclosing all points convex hull property: curve lies in control points convex hull predictable and efficient, but only some splines

13

slide-14
SLIDE 14

defining splines

affine invariance: transform controls equiv. transform spline efficient, all splines

14

slide-15
SLIDE 15

linear splines

15

slide-16
SLIDE 16

linear splines

segment: linear function control points: end points and

P(t) = ta + b with t ∈ [0,1) P(0) = P0 P(1) = P1 P(t) = (1 − t) + t P0 P1

16

slide-17
SLIDE 17

linear splines

blending functions: interpret as blending control points

P(t) = (t) + (t) b0 P0 b1 P1 (t) b0 (t) b1 = (1 − t) = t

17

slide-18
SLIDE 18

linear splines

joining segments: impose continuity segments share endpoints continuity only for straight lines

C 0 C 1 (1) = (0) → = P0 P1 P0

1

P1

18

slide-19
SLIDE 19

bezier cubic splines

19

slide-20
SLIDE 20

bezier cubic splines

segment: cubic function control points: end points and tangents and

P(t) = a + b + tc + d with t ∈ [0,1) t3 t2 , P0 P3 (0) ∝ − P′ P1 P0 (1) ∝ − P′ P2 P3

20

slide-21
SLIDE 21

bezier cubic splines

blending functions: Bernstein polynomials

P(t) = (t) + (t) + (t) + (t) b0 P0 b1 P1 b2 P2 b3 P3 (t) b0 (t) b1 (t) b2 (t) b3 = (1 − t)3 = 3t(1 − t)2 = 3 (1 − t) t2 = t3

21

slide-22
SLIDE 22

bezier cubic splines

joining segments: impose continuity segments share endpoints continuity by collinear tangents

C 0 C 1 (1) = (0) → = P0 P1 P0

1

P1

22

slide-23
SLIDE 23

bezier cubic splines

properties: local control comes from the formulation by segments for each segment, curve defined by 4 control points

23

slide-24
SLIDE 24

bezier cubic splines

properties: convex hull each segment is convex sum of control points since and

(t) ≥ 0 bi (t) = 1 ∑i bi

24

slide-25
SLIDE 25

bezier cubic splines

properties: affine invariance

X(P(t)) = MP(t) + t = = M( (t) ) + t = ∑

i

bi Pi = (t)M + ( (t))t = ∑

i

bi Pi ∑

i

bi = (t)(M + t) = (t)X( ) ∑

i

bi Pi ∑

i

bi Pi

25

slide-26
SLIDE 26

rendering splines

26

slide-27
SLIDE 27

rendering splines

tesselation: approximate splines with line segments segments are efficient to draw in hardware and software more segments to provide better approximation uniform tesselation: split interval uniformly fast to compute and simple to implement generates many segments adaptive tesselation: split recursively until good enough more complex to implement less segments with guaranteed approximation

t

27

slide-28
SLIDE 28

uniform tesselation

split in segments uniformly at

K = 1/k tk

28

slide-29
SLIDE 29

adaptive tesselation

De Casteljau algorithm: recurdively split to small splines if flat enough: draw control segments, otherwise split each control segment:

= ( + )/2 Qi Pi Pi+1

29

slide-30
SLIDE 30

adaptive tesselation

De Casteljau algorithm: recurdively split to small splines split new segments: split again:

= ( + )/2 Ri Qi Qi+1 S = ( + )/2 Ri Ri+1

30

slide-31
SLIDE 31

adaptive tesselation

De Casteljau algorithm: recurdively split to small splines two Bezier splines: , recurse algorithm as above

{ , , ,S} P0 Q0 R0 {S, , , } R1 Q2 P3

31

slide-32
SLIDE 32
  • ther splines

32

slide-33
SLIDE 33
  • ther cubic splines types

Bezier splines most used today (2D APIs, PDF, fonts) Hermite splines: approximating control: end points and tangents Catmull-Rom splines: interpolating used very little B-splines: continuity at joints impose 3 continuity constraints cubic splines can be converted into one another by changing control points

C 2

33

slide-34
SLIDE 34
  • ther spline degree

linear and cubic most used can define splines for other polynomial degree e.g. Beziers use Bernestein polynomials of degree n

34

slide-35
SLIDE 35
  • ther spline functions

uniform splines: split segments at integers non-uniform splines: split segments at arbitrary points non-uniform rational B-splines (NURBS) ratios of B-splines invariance under perspective can represent conic sections exactly

  • ften used in 3D

35