- Surface Representations
Leif Kobbelt RWTH Aachen University
1
Surface Representations Leif Kobbelt RWTH Aachen University 1 - - PowerPoint PPT Presentation
Leif Kobbelt RWTH Aachen University
1Leif Kobbelt RWTH Aachen University
Outline
– parametric vs. implicit
– distance queries – evaluation – modification / deformation
2
2Leif Kobbelt RWTH Aachen University
– parametric vs. implicit
– distance queries – evaluation – modification / deformation
Outline
3
3Leif Kobbelt RWTH Aachen University
Mathematical Representations
– range of a function – surface patch
– kernel of a function – level set
4
f : R2 → R3, SΩ = f(Ω) F : R3 → R, Sc = {p : F(p) = c}
4Leif Kobbelt RWTH Aachen University
2D-Example: Circle
5
f : t → r cos(t) r sin(t)
S = f([0, 2π]) F(x, y) = x2 + y2 − r2 S = {(x, y) : F(x, y) = 0}
5Leif Kobbelt RWTH Aachen University
2D-Example: Island
6
f : t → r cos(t) r sin(t)
S = f([0, 2π]) F(x, y) = x2 + y2 − r2 S = {(x, y) : F(x, y) = 0} ??? ??? ???
6Leif Kobbelt RWTH Aachen University
Approximation Quality
7
f : t → r cos(t) r sin(t)
S = f([0, 2π]) F(x, y) = x2 + y2 − r2 S = {(x, y) : F(x, y) = 0} ??? ??? ???
7Leif Kobbelt RWTH Aachen University
Approximation Quality
8
f : t → r cos(t) r sin(t)
S = f([0, 2π]) F(x, y) = x2 + y2 − r2 S = {(x, y) : F(x, y) = 0} ??? ??? ???
8Leif Kobbelt RWTH Aachen University
Requirements / Properties
– interpolation / approximation
– manifold-ness
– C0, C1, C2, ... Ck
– curvature distribution
9
f(ui, vi) ≈ pi
9Leif Kobbelt RWTH Aachen University
– interpolation / approximation
– manifold-ness
– C0, C1, C2, ... Ck
– curvature distribution
Requirements / Properties
10
f(ui, vi) ≈ pi
10Leif Kobbelt RWTH Aachen University
Requirements / Properties
– interpolation / approximation
– manifold-ness
– C0, C1, C2, ... Ck
– curvature distribution
11
f(ui, vi) ≈ pi
11Leif Kobbelt RWTH Aachen University
– interpolation / approximation
– manifold-ness
– C0, C1, C2, ... Ck
– curvature distribution
Requirements / Properties
12
f(ui, vi) ≈ pi
12Leif Kobbelt RWTH Aachen University
– interpolation / approximation
– manifold-ness
– C0, C1, C2, ... Ck
– curvature distribution
Requirements / Properties
13
f(ui, vi) ≈ pi
13Leif Kobbelt RWTH Aachen University
Topological Consistency
14
14Leif Kobbelt RWTH Aachen University
Topological Consistency
14
14Leif Kobbelt RWTH Aachen University
Topological Consistency
14
Mesh Repair ...
14Leif Kobbelt RWTH Aachen University
Closed 2-Manifolds
– disk-shaped neighborhoods – + injectivity
– surface of a “physical” solid –
15
f(Dε[u, v]) = Dδ[f(u, v)] F(x, y, z) = c, ∇F(x, y, z) = 0
15Leif Kobbelt RWTH Aachen University
Closed 2-Manifolds
– disk-shaped neighborhoods – + injectivity
– surface of a “physical” solid –
16
f(Dε[u, v]) = Dδ[f(u, v)] F(x, y, z) = c, ∇F(x, y, z) = 0
16Leif Kobbelt RWTH Aachen University
Closed 2-Manifolds
– disk-shaped neighborhoods – + injectivity
– surface of a “physical” solid –
17
f(Dε[u, v]) = Dδ[f(u, v)] F(x, y, z) = c, ∇F(x, y, z) = 0
17Leif Kobbelt RWTH Aachen University
Closed 2-Manifolds
– disk-shaped neighborhoods –
– surface of a “physical” solid –
18
f(Dε[u, v]) = Dδ[f(u, v)] F(x, y, z) = c, ∇F(x, y, z) = 0
18Leif Kobbelt RWTH Aachen University
Closed 2-Manifolds
– disk-shaped neighborhoods –
– surface of a “physical” solid –
19
f(Dε[u, v]) = Dδ[f(u, v)] F(x, y, z) = c, ∇F(x, y, z) = 0
19Leif Kobbelt RWTH Aachen University
Smoothness
20
20Leif Kobbelt RWTH Aachen University
Smoothness
21
21Leif Kobbelt RWTH Aachen University
Smoothness
22
22Leif Kobbelt RWTH Aachen University
Fairness
23
23Leif Kobbelt RWTH Aachen University
– parametric vs. implicit
– distance queries – evaluation – modification / deformation
Outline
24
24Leif Kobbelt RWTH Aachen University
Polynomials
25
p(t) =
p
ci ti =
p
c
i Φi(t)
p(ti) = f(ti), ti ∈ [0, h]
f(h) =
p
1 i! f (i)(0) hi + O(hp+1) f(t) − p(t) = 1 (p + 1)! f (p+1)(t∗)
p
(t − ti) = O(h(p+1))
25Leif Kobbelt RWTH Aachen University
Polynomials
26
p(ti) = f(ti), ti ∈ [0, h]
p(t) =
p
ci ti =
p
c
i Φi(t)
f(t) − p(t) = 1 (p + 1)! f (p+1)(t∗)
p
(t − ti) = O(h(p+1))
f(h) =
p
1 i! f (i)(0) hi + O(hp+1)
26Leif Kobbelt RWTH Aachen University
Polynomials
27
p(ti) = f(ti), ti ∈ [0, h]
p(t) =
p
ci ti =
p
c
i Φi(t)
f(h) =
p
1 i! f (i)(0) hi + O(hp+1)
f(t) − p(t) = 1 (p + 1)! f (p+1)(t∗)
p
(t − ti) = O(h(p+1))
27Leif Kobbelt RWTH Aachen University
Implicit Polynomials
28
F(p + p) − F(p) p ≈ ∇F(p) p = λ ∇F(p) F(x, y, z) − P(x, y, z) = O(h(p+1))
28Leif Kobbelt RWTH Aachen University
Implicit Polynomials
29
F(p + p) − F(p) p ≈ ∇F(p) p = λ ∇F(p) F(x, y, z) − P(x, y, z) = O(h(p+1))
p p+Δp
29Leif Kobbelt RWTH Aachen University
Implicit Polynomials
30
p ≈ F(p + p) − F(p) ∇F(p) p = λ ∇F(p) (gradient bounded from below) F(x, y, z) − P(x, y, z) = O(h(p+1))
p p+Δp
30Leif Kobbelt RWTH Aachen University
Implicit Polynomials
31
large gradient small gradient F(x,y,z) F(x,y,z) x,y,z x,y,z
31Leif Kobbelt RWTH Aachen University
Polynomial Approximation
– increasing p ... higher order polynomials – decreasing h ... smaller / more segments
– smoothness of the target data ( maxt f(p+1)(t) ) – handling higher order patches (e.g. boundary conditions)
32
32Leif Kobbelt RWTH Aachen University
Polynomial Approximation
– increasing p ... higher order polynomials – decreasing h ... smaller / more segments
– smoothness of the target data ( maxt f(p+1)(t) ) – handling higher order patches (e.g. boundary conditions)
33
Leif Kobbelt RWTH Aachen University
Piecewise Definition
– Euler formula: V - E + F = 2 (1-g) – regular quad meshes
– quasi-regular – semi-regular
34
34Leif Kobbelt RWTH Aachen University
Piecewise Definition
– Euler formula: V - E + F = 2 (1-g) – regular triangle meshes
– quasi-regular – semi-regular
35
35Leif Kobbelt RWTH Aachen University
Piecewise Definition
36
36Leif Kobbelt RWTH Aachen University
Piecewise Definition
37
37Leif Kobbelt RWTH Aachen University
Piecewise Definition
38
38Leif Kobbelt RWTH Aachen University
Piecewise Definition
– regular voxel grids O(h-3) – three color octrees
– irregular hierarchies
(BSP)
39
39Leif Kobbelt RWTH Aachen University
3-Color Octree
40
12040 cells 1048576 cells
40Leif Kobbelt RWTH Aachen University
Adaptively Sampled Distance Fields
41
12040 cells 895 cells
41Leif Kobbelt RWTH Aachen University
Binary Space Partitions
42
254 cells 895 cells
42Leif Kobbelt RWTH Aachen University
Message of the Day ...
– approximation O(h2) ... error * #faces = const. – arbitrary topology – flexibility for piecewise smooth surfaces – flexibility for adaptive refinement
43
43Leif Kobbelt RWTH Aachen University
Message of the Day ...
– approximation O(h2) ... error * #faces = const. – arbitrary topology – flexibility for piecewise smooth surfaces – flexibility for adaptive refinement
44
44Leif Kobbelt RWTH Aachen University
Message of the Day ...
– approximation O(h2) ... error * #faces = const. – arbitrary topology – flexibility for piecewise smooth surfaces – flexibility for adaptive refinement
45
45Leif Kobbelt RWTH Aachen University
Message of the Day ...
– approximation O(h2) ... error * #faces = const. – arbitrary topology – flexibility for piecewise smooth surfaces – flexibility for adaptive refinement
46
46Leif Kobbelt RWTH Aachen University
Message of the Day ...
– approximation O(h2) ... error * #faces = const. – arbitrary topology – flexibility for piecewise smooth surfaces – flexibility for adaptive refinement – efficient rendering
47
47Leif Kobbelt RWTH Aachen University
Message of the Day ...
– approximation O(h2) ... error * #faces = const. – arbitrary topology – flexibility for piecewise smooth surfaces – flexibility for adaptive refinement – efficient rendering
access to vertices, faces, ....
48
48Leif Kobbelt RWTH Aachen University
– parametric vs. implicit
– evaluation – distance queries – modification / deformation
Outline
49
49Leif Kobbelt RWTH Aachen University
Evaluation
– positions – normals – curvatures
50
f(u, v) n(u, v) = fu(u, v) × fv(u, v) c(u, v) = C
Leif Kobbelt RWTH Aachen University
Evaluation
– positions – normals – curvatures
– positions (barycentric coordinates)
51
(α, β) → α P1 + β P2 + (1−α−β) P3
f(u, v) n(u, v) = fu(u, v) × fv(u, v) c(u, v) = C
0 ≤ β, α + β ≤ 1
51Leif Kobbelt RWTH Aachen University
Evaluation
– positions – normals – curvatures
– positions (barycentric coordinates)
52
(α, β, γ) → α P1 + β P2 + γ P3
f(u, v) n(u, v) = fu(u, v) × fv(u, v) c(u, v) = C
Leif Kobbelt RWTH Aachen University
Evaluation
– positions – normals – curvatures
– positions (barycentric coordinates)
53
α u + β v + γ w → α P1 + β P2 + γ P3
f(u, v) n(u, v) = fu(u, v) × fv(u, v) c(u, v) = C
Leif Kobbelt RWTH Aachen University
Evaluation
– positions – normals – curvatures
– positions (barycentric coordinates)
54
α u + β v + γ w → α P1 + β P2 + γ P3
f(u, v) n(u, v) = fu(u, v) × fv(u, v) c(u, v) = C
→ Parametrization Bruno
54Leif Kobbelt RWTH Aachen University
Evaluation
– positions – normals – curvatures
– positions (barycentric coordinates) – normals (per face, Phong)
55
f(u, v) n(u, v) = fu(u, v) × fv(u, v) c(u, v) = C
Leif Kobbelt RWTH Aachen University
Evaluation
– positions – normals – curvatures
– positions (barycentric coordinates) – normals (per face, Phong)
56
f(u, v) n(u, v) = fu(u, v) × fv(u, v) c(u, v) = C
Leif Kobbelt RWTH Aachen University
Evaluation
– positions – normals – curvatures
– positions (barycentric coordinates) – normals (per face, Phong) – curvatures ... (→ smoothing, Mark)
57
f(u, v) n(u, v) = fu(u, v) × fv(u, v) c(u, v) = C
Leif Kobbelt RWTH Aachen University
Distance Queries
– for smooth surfaces: find orthogonal base point – for triangle meshes
(use Phong normal field)
58
[p − f(u, v)] × n(u, v) = 0
58Leif Kobbelt RWTH Aachen University
Modifications
– control vertices – free-form deformation – boundary constraint modeling
59
f (u, v) =
n
m
cijN n
i (u) N m j (v)
59Leif Kobbelt RWTH Aachen University
Modifications
– control vertices – free-form deformation – boundary constraint modeling
60
f (u, v) =
n
m
cijN n
i (u) N m j (v)
60Leif Kobbelt RWTH Aachen University
– control vertices – free-form deformation – boundary constraint modeling
Modifications
61
→ Remeshing Pierre
61Leif Kobbelt RWTH Aachen University
– control vertices – free-form deformation – boundary constraint modeling
Modifications
62
62Leif Kobbelt RWTH Aachen University
– control vertices – free-form deformation – boundary constraint modeling
Modifications
63
63Leif Kobbelt RWTH Aachen University
– control vertices – free-form deformation – boundary constraint modeling
Modifications
63
63Leif Kobbelt RWTH Aachen University
– control vertices – free-form deformation – boundary constraint modeling
Modifications
64
→ Mesh Editing Mario
64Leif Kobbelt RWTH Aachen University
– parametric vs. implicit
– distance queries – evaluation – modification / deformation
Outline
65
65Leif Kobbelt RWTH Aachen University
Mesh Data Structures
– file formats
– identify time-critical operations – all vertices/edges of a face – all incident vertices/edges/faces of a vertex
66
66Leif Kobbelt RWTH Aachen University
Face Set (STL)
– 3 positions
67
Triangles x11 y11 z11 x12 y12 z12 x13 y13 z13 x21 y21 z21 x22 y22 z22 x23 y23 z23 ... ... ... xF1 yF1 zF1 xF2 yF2 zF2 xF3 yF3 zF3
36 B/f = 72 B/v no connectivity!
67Leif Kobbelt RWTH Aachen University
Shared Vertex (OBJ, OFF)
– position
– vertex indices
68
Vertices x1 y1 z1 ... xV yV zV Triangles v11 v12 v13 ... ... ... ... vF1 vF2 vF3
12 B/v + 12 B/f = 36 B/v no neighborhood info
68Leif Kobbelt RWTH Aachen University
Face-Based Connectivity
– position – 1 face
– 3 vertices – 3 face neighbors
69
64 B/v no edges!
69Leif Kobbelt RWTH Aachen University
Edge-Based Connectivity
– position – 1 edge
– 2 vertices – 2 faces – 4 edges
– 1 edge
70
120 B/v edge orientation?
70Leif Kobbelt RWTH Aachen University
Halfedge-Based Connectivity
– position – 1 halfedge
– 1 vertex – 1 face – 1, 2, or 3 halfedges
– 1 halfedge
71
96 to 144 B/v no case distinctions during traversal
71Leif Kobbelt RWTH Aachen University 72
One-Ring Traversal
Leif Kobbelt RWTH Aachen University 73
One-Ring Traversal
Leif Kobbelt RWTH Aachen University 74
One-Ring Traversal
Leif Kobbelt RWTH Aachen University 75
One-Ring Traversal
Leif Kobbelt RWTH Aachen University 76
One-Ring Traversal
Leif Kobbelt RWTH Aachen University 77
One-Ring Traversal
Leif Kobbelt RWTH Aachen University
Halfedge-Based Libraries
– www.cgal.org – computational geometry – free for non-commercial use
– www.openmesh.org – mesh processing – free, LGPL licence
78
78Leif Kobbelt RWTH Aachen University
Literature
data structure for polyhedral surfaces, Symp. on
Representation for Triangle Meshes, Journal of Graphics Tools 4(3), 1998
polygon mesh data structure, OpenSG Symp. 2002
79
79Leif Kobbelt RWTH Aachen University
Outline
– parametric vs. implicit
– distance queries – evaluation – modification / deformation
80
80