Outline Building Parametrizations The Users Perspective Results - - PDF document

outline
SMART_READER_LITE
LIVE PREVIEW

Outline Building Parametrizations The Users Perspective Results - - PDF document

A Manifold-Based Construction for Surface Fitting Lecture 6 - February 5, 2009 - 2-3 PM Outline Building Parametrizations The Users Perspective Results Conclusions Suggested Readings 2 Building Parametrizations Recall


slide-1
SLIDE 1

A Manifold-Based Construction for Surface Fitting

Lecture 6 - February 5, 2009 - 2-3 PM

Outline

  • Building Parametrizations
  • The User’s Perspective
  • Results
  • Conclusions
  • Suggested Readings

2

Building Parametrizations

M ⊆ Rm Ω2 Rn Ω1 θ2 θ1 ϕ12 ϕ21 Ω12 Ω21

Recall the big picture...

3

slide-2
SLIDE 2

GIVEN

Building Parametrizations

M ⊆ Rm Ω2 Rn Ω1 θ2 θ1 ϕ12 ϕ21 Ω12 Ω21

Our goal now is to define a family, (θv)v∈I, of parametriza- tions.

4

Building Parametrizations

To define (θv)v∈I, we specify a family of shape functions and a family of weight functions, both of which are described as follows:

5

Building Parametrizations

For each u ∈ I, we define the shape function, ψu : u ⊂ R2 → R3 , associated with Ωu, as the B´ ezier surface patch of bi-degree (m, n), ψu(p) =

  • 0≤j≤m
  • 0≤k≤n

bu

j,k · Bm j (x) · Bn k (y) ,

where

6

slide-3
SLIDE 3
  • u = [−L + 2 · l(u), −L] × [L + 2 · l(u), L], with L =

cos(π/mu), (x, y) are the coordinates of p, ψu(p) =

  • 0≤j≤m
  • 0≤k≤n

bu

j,k · Bm j (x) · Bn k (y)

Building Parametrizations

Ωu

L = cos(π/mu) (2 · l(u), 0) [−L + 2 · l(u), −L] [L + 2 · l(u), −L] [L + 2 · l(u), L] [−L + 2 · l(u), L]

p = (x, y)

7

Building Parametrizations

  • (bu

j,k) ⊂ R3 are the control points, with 0 ≤ j ≤ m and

0 ≤ k ≤ n, R3

b0,0 b1,0 b2,0 b0,1 b1,1 b2,1 b0,2 b1,2 b2,2

Ex: m = 2 and n = 2

p1,0 p2,0 p0,1 p1,1 p2,1 p0,2 p1,2 p2,2 = (L + 2 · l(u), L) p0,0 = (−L + 2 · l(u), L)

R2 ψu(p) =

  • 0≤j≤m
  • 0≤k≤n

bu

j,k · Bm j (x) · Bn k (y)

8

Building Parametrizations

ψu(p) =

  • 0≤j≤m
  • 0≤k≤n

bu

j,k · Bm j (x) · Bn k (y)

  • and

Bl

i(t) =

l i

  • ·

r − t r − s l−i · t − s r − s i is the i-th Bernstein polynomial of degree l over the affine frame [s, r], where [s, r] = [−L+2·l(u), L+2·l(u)] (or [s, r] = [−L, L]), for every i ∈ {0, . . . , l}. Note that Bl

i is a scalar function, and recall that the following

holds:

  • 0≤j≤m
  • 0≤k≤n

Bm

j (x) · Bn k (y) = 1, ∀x, y ∈ [0, 1] .

9

slide-4
SLIDE 4

Building Parametrizations

So, the convex hull property holds for p ∈ u.

p1,0 p2,0 p0,1 p2,1 p0,2 p1,2

R2

p1,1 p0,0 p2,2 1 2 3 4 x 0.5 1 1.5 2 y 1 2 3 4 z 1 1 2 3 4 z

b00 b01 b10 b20 b11 b21 b22

ψu(p1,1) = ψu((2 · l(u), 0))

R3 u

10

Building Parametrizations

Very nice, but how do we pick the control points? We use a least squares fitting procedure. The idea is to create a large collection, (pj, p

j)j∈J, of pairs

  • f parameter points and sample points, where pj ∈ R2 and

p

j ∈ R3.

We can think of p

j as the image of pj under an unknown

function, f : R2 → R3, we wish to locally approximate using

  • ur ψu’s.

11

Building Parametrizations

We can create (pj, p

j)j∈J by placing the pj’s in the Tu’s and

the p

j’s in ST .

But, since ST is piecewise linear, it is better (for the sake of visual quality) to place the p

j’s on a “curved” surface that

approximates |ST |. Which “curved” surface?

12

slide-5
SLIDE 5

Building Parametrizations

Good choices:

  • PN triangle surfaces
  • Subdivision surfaces

PN triangle surfaces are cheap to construct and evaluate, while subdivision approaches usually yield pretty good-looking sur- faces. We now describe the computation of the parameter and sam- ple points in a way that is (almost) independent of the choice

  • f surface.

13

Building Parametrizations

The idea is to assume that we have a surface, S ⊂ R3, which is the union of finitely many parametric patches, bσ : R2 → R3, each of which is associated with a triangle, σ, of ST , and all of them are the defined in the same affine frame, say ⊂ R2: S =

  • σ∈ST

bσ() .

σ bσ()

  • R2

bσ()

R3

14

Building Parametrizations

S |ST | It is desirable to define S continuous (at least!)

15

slide-6
SLIDE 6

Building Parametrizations

How can we compute the control points? First, sample the affine frame of ψu in a uniform manner: We choose m = n = mu + 1 and sample the above frame with 4 · m2 points, where mu is the degree of vertex u in ST . HEURISTIC!

16

su(σ)

Building Parametrizations

Second, for each triangle su(σ) of Tu, map the sample points in su(σ) to . st(u, ST )

σ u

  • R2

17

Building Parametrizations

To map from su(σ) to , we simply use a barycentric map- ping: Choose an order, a, b, c, for the vertices, a, b, and c of su(σ). Now, every point p ∈ su(σ) can be expressed as p = λ · a + µ · b + ν · c , where λ, µ, and ν are the barycentric coordinates of p with respect to su(σ) and associated with the vertices a, b, and c, respectively.

18

slide-7
SLIDE 7

Building Parametrizations

Finally, the point q ∈ corresponding to p ∈ su(σ) is given by q = λ · a + µ · b + ν · c , where a = (0, 0), b = (1, 0), and c = (1/2, √ 3/2) are the vertices of . Assume that = [(0, 0), (1, 0), (1/2, √ 3/2)].

su(σ) a b

c

  • a

b c

p q

19

Building Parametrizations

Third, we compute p = bσ(q).

  • a

b c

q

σ bσ()

p = bσ(q)

20

Building Parametrizations

su(σ) a b

c

p

Sampling su(σ)

  • a

b c

q

Barycentric Mapping Evaluation of bσ

σ bσ()

p = bσ(q)

21

slide-8
SLIDE 8

Building Parametrizations

Now, we have a collection of pairs, (p, p), of parameter and sample points associated with each vertex, u, of ST , as shown below:

22

Building Parametrizations

Let M be the number of elements of the collection of pairs, (p, p), associated with u. We assume that M is larger than m × n = (mu + 1)2. We can assemble three linear equation systems, AX = Bl, with l = 1, 2, 3, each of which has exactly M × (mu + 1)2

  • equations. The l-th system is derived from the equations of

the form ψu(p) = p

l =

  • 0≤j≤m
  • 0≤k≤n

bu

j,k · Bm j (x) · Bn k (y) = p l ,

where p

l the l-th coordinate of p. Since M m, the systems

are overdetermined!

23

Building Parametrizations

The unknows are the m×n = (mu+1)2 control points, (bu

j,k),

  • f ψu.

We have a typical setup for using least squares, and that’s what we do! Once we compute the control points, we have ψu.

24

slide-9
SLIDE 9

Building Parametrizations

Ultimately, we want to compute θu: GIVEN

M ⊆ Rm Ω2 Rn Ω1 θ2 θ1 ϕ12 ϕ21 Ω12 Ω21

25

Building Parametrizations

Why not let θu = ψu? First, the domain of θu is Ωu, while the domain of ψu is R2.

26

Building Parametrizations

Second, θu(p) and θv(q) must be the same point in R3 if q = ϕvu(p). GIVEN

M ⊆ Rm Ω2 Rn Ω1 θ2 θ1 ϕ12 ϕ21 Ω12 Ω21

27

slide-10
SLIDE 10

Building Parametrizations

It is EXTREMELY unlikely that ψu fullfils the second condi- tion. So, what can we do? Answer: use cutoff functions!

28

Building Parametrizations

Ωu

(2 · l(u), 0)

p p − (2 · l(u), 0)

For each u ∈ I, we define a weight function, γu : R2 → R , associated with Ωu is given by γu(p) = ξ(p − (2 · l(u), 0)) , for every p ∈ R2, where · denotes Euclidean distance, and

29

Building Parametrizations

ξ : R → R is such that, for every t ∈ R, ξ(t) =    1 if t ≤ H1 if t ≥ H2 1/(1 + e2·s)

  • therwise ,

where H1, H2 are constant, with 0 < H1 < H2 < 1, and s =

  • 1

√ 1 − H

  • 1

√ 1 − H

  • and

H = t − H1 H2 − H1

  • .

30

slide-11
SLIDE 11

Building Parametrizations

0.2 0.4 0.6 0.8 1 t 0.2 0.4 0.6 0.8 1 G1

ξ(t) L1 = 0.2 and L2 = 0.8

31

Building Parametrizations

L2 = cos(π/mu) L1 = 0.25 · L2

Ωu

HEURISTIC!

32

Building Parametrizations

“θu(p) and θv(q) must be the same point in R3 if q = ϕvu(p)” The problem can be solved by defining θu as θu(p) = ψu(p) · γu(p) , but the above does not solve the problem “the domain of θu is Ωu, while the domain of ψu is u”

33

slide-12
SLIDE 12

Building Parametrizations

Well, let us use another trick: θu(p) =

  • w∈Ju(p)[ψw ◦ ϕwu(p)] · [γw ◦ ϕwu(p)]
  • z∈Ju(p) γz ◦ ϕzu(p)

, where Ju(p) = {v ∈ I | p ∈ Ωuv} . Ju(p) has at least one vertex (i.e., u) and at most three.

34

Building Parametrizations

rv,σ Tw Tv rv,σ Tu p

ψu(p)

ϕvu(p) ϕwu(p)

ψv ◦ ϕwu(p) ψw ◦ ϕwu(p)

Ju(p) = {u, v, w}

u v w

θu(p)

35

Building Parametrizations

The θu’s are all C∞! In θu(p) =

  • w∈Ju(p)[ψw ◦ ϕwu(p)] · [γw ◦ ϕwu(p)]
  • z∈Ju(p) γz ◦ ϕzu(p)

, the term ψw ◦ ϕwu(p) can be viewed as the contribution of Ωw to θu(p), which is weighted by γw ◦ ϕwu(p) .

36

slide-13
SLIDE 13

Building Parametrizations

We can show that θu(p) = θv ◦ ϕvu(p) = θw ◦ ϕwu(p) . A key observation for proving the above fact is Ju(p) = Jv(ϕvu(p)) = Jw(ϕwu(p)) . Later, to convince yourself, take a look at the formulas for θv ◦ ϕvu(p) and θw ◦ ϕwu(p) .

37

Building Parametrizations

FINALLY, our surface is given by S =

  • u∈I

θu(Ωu) . How can we evaluate S? Is the “user” supposed to know about sets of gluing data and parametrizations?

38

Let t be a triangle in ST and p be any point in t: t p

User’s Perspective

39

slide-14
SLIDE 14

Map p to an equilateral triangle in R2. We can do that by using barycentric coordinates.

User’s Perspective

u v w p

(0, 0) (1, 0)

  • 1

2, √ 3 2

  • q

40

q

(0, 0) (1, 0)

  • 1

2, √ 3 2

  • p

u v w

rv,σ Tw Tv rv,σ Tu

User’s Perspective

R−1

(v,u) ◦ g−1 v

41

User’s Perspective

It might very well be the case that R−1

(v,u) ◦ g−1 v

is not in Ωv! This can be easily tested... If R−1

(v,u) ◦ g−1 v

∈ Ωv then we consider Ωu (and maybe Ωw). But, there is a subtle detail... The barycentric mapping from t to the canonical triangle changes!

42

slide-15
SLIDE 15

(0, 0) (1, 0)

q

  • 1

2, √ 3 2

  • rv,σ

Tw Tv rv,σ Tu

User’s Perspective

p u v w

R−1

(u,w) ◦ g−1 u

43

rv,σ Tw Tv rv,σ Tu

User’s Perspective

p u v w

R−1

(w,v) ◦ g−1 w

(0, 0) (1, 0)

q

  • 1

2, √ 3 2

  • 44

q

Tu rv,σ Tw Tv rv,σ

p u v w

User’s Perspective

R−1

(v,u) ◦ g−1 v

p

ϕuv ϕwv

ϕwv = ϕwu ◦ ϕuv

ϕwu

45

slide-16
SLIDE 16

Building Parametrizations

Is the “user” supposed to know about sets of gluing data and parametrizations? DEFINITELY NOT! This is because we created an explicit homeomorphism be- tween |ST | and S.

46

Building Parametrizations

This homeomorphism hides the differentiable structure of S from the user! The user just needs to know about ST , and then provide “us” with the barycentric coordinates of a point p in a triangle σ

  • f ST .

47

Building Parametrizations

Demo the code!

48

slide-17
SLIDE 17

Results (AT LAST!)

49

Results

50

Results

51

slide-18
SLIDE 18

Results

52

Results

53

Results

54

slide-19
SLIDE 19

Results

55

Results

56

Results

57

slide-20
SLIDE 20

Results

58

Results

59

Results

60

slide-21
SLIDE 21

OPEN PROBLEM: Can we make it polynomial?

Conclusions

Unfortunately, the map θv is NOT polynomial.

61

Conclusions

We can easily make γv a Ck polynomial, for any finite k. The difficulty really lies in making ϕvu (rational) polynomial. A solution for this problem would make a PPS as simple to evaluate as any polynomial surface (such as B´ ezier and Splines surfaces).

62

For a good survey on the existing constructions, see

  • Cindy M. Grimm and Denis Zorin. Surface Modeling and

Parametrization with Manifolds. In ACM SIGGRAPH 2006 Courses (SIGGRAPH’06), pages 1-81, New York, NY, USA, 2006. ACM Press.

Conclusions

63

slide-22
SLIDE 22

Conclusions

There are many extensions of this work. If you are interested, please talk to Luiz or myself. We will be glad to discuss some

  • f them with you.

64

Suggested Reading

  • Siqueira, M;, Xu, D;, Gallier, J.; Morera, D;, Nonato,
  • L. G.; Velho, L.; A New Construction of Smooth

Surfaces from Triangle Meshes Using Parametric Pseudo-Manifolds, preprint submitted to Computer & Graphics. Download a PDF from the course web page:

http://w3.impa.br/∼lvelho/ppm09

65