Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Searching for Structure in Geometry Processing Misha Kazhdan What do we want to compute? (What established theory can we apply?) How do we compute it effectively? (How do we implement efficiently/robustly?) Geometry Processing in Detail • Symmetry Detection – Discrete – Continuous • Solid Reconstruction – Computing the indicator function – Iso-surface extraction – Surface extension Discrete Symmetry Detection Identify the rotational (and reflective) symmetries of a set of a shape Reflective 4-Fold Axial What is a shape? A shape is a finite set of points 𝑃 ⊂ ℝ2 . What do we want to compute? Given 𝑃, find 𝑐 ∈ ℝ2 and 𝜃 ∈ [0,2𝜋) such that a rotation by angle 𝜃 about 𝑐 maps 𝑃 to itself. 1. Averaging commutes with affine maps: ⇒ 𝑐 is the center of mass. 2. The rotation is a bijection: ⇒ 𝜃 ∈ ∠𝑝𝑞 𝑞∈𝑃 . Naïve Implementation FindRotationalSymmetries( 𝑃 ) 1. Fix 𝑝 ∈ 𝑃 2. For each 𝜃 ∈ ∠𝑝𝑞 3. 4. 5. 𝑞∈𝑃 𝑂 |𝑃| Sym[𝜃] = true For each 𝑟 ∈ 𝑃 If( 𝜃 𝑟 ∉ 𝑃 ): Sym[𝜃] = false 𝑂 |𝑃| Naïve run-time complexity is 𝑂 𝑃 𝑂 |𝑃| 3 . How can we compute it effectively? Add structure to the problem: Sort/order points by angle: – Testing if 𝜃(𝑟) is in 𝑃 is sub-linear time. – Rotations preserve circular order. 𝑝2 ⇒ Rotational symmetries act by circular shift. 𝑝1 𝜃: 𝑃 → 𝑃 𝑝𝑘 ↦ 𝑝𝑘+3 𝑝3 𝑝4 [Wolter et al., 1985] [Attalah, 1985] 𝑝5 𝑝0 Efficient Implementation FindRotationalSymmetries( 𝑃 ) 1. 2. 3. SortPolarCoordinatesByAngle( 𝑃 ) 𝑆 = 𝒓𝟎 ∠𝑝0 𝑝1 𝒓𝟏 ∠𝑝1 𝑝2 ⋯ FastSubstring( 𝑆 , 𝑆 ∘ 𝑆 ) 𝑂 |𝑃| log |𝑃| 𝑂 |𝑃| 𝑂 |𝑃| 𝑆 ∘ 𝑆 = 𝟏 60∘ 𝟏 20∘ 𝟐 40∘ 𝟏 60∘ 𝟏 20∘ 𝟐 40∘ 𝟏 60∘ 𝟏 20∘ 𝟐 40∘ 𝟏 60∘ 𝟏 20∘ 𝟐 40∘ 𝟏 60∘ 𝟏 20∘ 𝟐 40∘ 𝟏 60∘ 𝟏 20∘ 𝟐 40∘ 𝑆 = 𝟏 60∘ 𝟏 20∘ 𝟐 𝑆40=∘ 𝟏 60∘ 𝟏 20∘ 𝟐 𝑆40=∘ 𝟏 60∘ 𝟏 20∘ 𝟐 𝑆40=∘ 𝟏 60∘ 𝟏 20∘ 𝟐 40∘ 𝟏 60∘ 𝟏 20∘ 𝟐 40∘ 𝟏 60∘ 𝟏 20∘ 𝟐 40∘ (𝟐, 100∘ ) (𝟏, 80∘ ) Complexity is 𝑂 𝑃 log 𝑃 . (𝟏, 140∘ ) 20∘ 40∘ 20∘ 40∘ (𝟐, 340∘ ) ∘ 60∘ (𝟏, 320 ) (𝟏, 260∘ ) [Wolter et al., 1985] [Attalah, 1985] (𝟐, 220∘ ) (𝟏, 20∘ ) 40∘ 20∘ 60∘ (𝟏, 200∘ ) 60∘ [Knuth, Morris, and Pratt, 1977] Given strings 𝐴 and 𝐵, find all matches of 𝐵 in 𝐴. FindSubstring( 𝐴 , 𝐵 ) 1. For 1 ≤ 𝑖 ≤ |𝐴|: 2. For 1 ≤ 𝑗 ≤ |𝐵|: 3. If( 𝑏𝑗 ≠ 𝑎𝑖+𝑗 ) break 4. If( 𝑗 == 𝐵 + 1 ) output 𝑖 Naïve run-time complexity is 𝑂 𝐴 ⋅ 𝐵 . 𝑂 |𝐴| 𝑂 |𝐵| [Knuth, Morris, and Pratt, 1977] Example: 𝐵 𝐴=𝑎𝑏𝑎𝑏𝑎𝑏𝑎𝑐 𝑏𝑏 𝑎𝑎 𝑏𝑏 𝑎 𝑐𝑐 𝐵 𝐵=𝐵=𝑎=𝑎 𝑏𝑎 𝑐𝑎 – A shift of 𝐵 by 1 position could only match if the first and last 4 letters of 𝐵 are the same. – A shift of 𝐵 by 2 positions could only match if the first and last 3 letters of 𝐵 are the same. ⋮ Pre-compute the prefix/suffix structure of 𝐵:* PMTof 𝑖 = < 𝑖 𝑏|1𝐵| ⋯𝑏 ⋯ 𝑏𝑖 only – A shift bymax less𝑗than positions 𝐵 𝐵 𝑗 = 𝑏𝑖−𝑗+1could the “partial match if a suffix of 𝐵 is also *aa.k.a. prefix of 𝐵.matching table”. What do we want to compute? Given 𝑃, find 𝑐 ∈ ℝ2 and 𝜃 ∈ [0,2𝜋) such that a rotation by angle 𝜃 about 𝑐 maps 𝑃 to itself. Only tells us about perfect matches. ⇓ Doesn’t work for noisy data. Continuous Symmetry Detection Measure the extent of rotational (and reflective) symmetries of a shape sym 1 2 3 4 56 [Zabrodsky et al., 1995] 𝑘-fold What is a shape? A shape is a function from the circle/disk into the real values.* Examples: – Circular extent function – Arc-length curvature – Distance function – Etc. 𝜃 This imbues “shape” with the structure of an inner-product space: [Zahn et al., 1972] [Horn, 1984] [Ankerst et al., 1999] [Vranic and Saupe, 2001] … ⋅ 𝑆to 𝑝 𝑑𝑝 with the action of rotation. ∗𝑆 1 , 𝑆representation 2 = ∫ 𝑆1 𝑝 2 commute The needs What is symmetry? If 𝑔 is a symmetry of a shape, then 𝑔𝑛 is also a symmetry of the shape, for all 𝑛 ∈ ℤ. ⇓ Symmetries are associated with groups. What do we want to compute? Given Φ: 𝑆1 → ℝ (or Φ: 𝐷 2 → ℝ) and given a symmetry group 𝐺, compute the distance from Φ to the nearest 𝐺-symmetric function. 1. Linear structure: ⇒ 𝐺-symmetric functions are a linear subspace. 2. Group + inner-product structure: ⇒ Projection is averaging 1 𝜋𝐺 Φ = 𝑔 Φ 𝐺 𝑔∈𝐺 What do we want to compute? Given Φ: 𝑆1 → ℝ (or Φ: 𝐷 2 → ℝ) and given a symmetry group 𝐺, compute the distance from Φ to the nearest 𝐺-symmetric function. Φ − 𝜋𝐺 Φ 2 1 = 2|𝐺| Φ−𝑔 Φ 𝑔∈𝐺 2 Naïve Implementation Naïve run-time complexity is: 1 3 −𝑔 Φ 2 Φ − 𝜋𝐺 Φ • =Circle: 𝑂 𝑁Φ 2|𝐺| • Disk: 𝑂 𝑁4 𝑔∈𝐺 2 FindRotationalSymmetries( 𝑆 ) 1. 2. 3. 4. Φ = Function( 𝑆 ) For each 𝑘 ∈ [2, 𝐾] For each 𝑗 ∈ [0, 𝑘 − 1] sym 𝑘 += 1 2𝑘 Φ− 𝑂 𝑁 𝑂 𝑘 2𝑗𝜋 𝑘 Φ 2 𝑂 𝑁 /𝑂 𝑁 2 How can we compute it effectively? Computational Structure: 1. Memoization – 𝐷 𝜃 = Φ − 𝜃 Φ 2 is evaluated 𝑂 𝑁 2 times but the set of values only has complexity 𝑂 𝑁 . ⇒ Pre-compute the values 𝐷(𝜃) for every angle and perform constant-time look up at run-time. How can we compute it effectively? Computational Structure: 2. Fast Correlation – The distance can be expressed as: Φ−𝜃 Φ 2 =2 𝐶 0 −𝐶 𝜃 with 𝐶 𝜃 = 〈Φ, 𝜃 Φ 〉 the auto-correlation of Φ. ⇒ Correlation in the spatial domain is multiplication in the frequency domain – 𝑂(𝑁)/𝑂 𝑁 2 . ⇒ The change of basis to/from frequency space can be done with an FFT – 𝑂(𝑁 log 𝑁) /𝑂(𝑁 2 log 𝑁) [Gauss, 1805][Cooley and Tukey, 1965] Efficient Implementation FindRotationalSymmetries( 𝑆 ) 1. 2. 3. 4. Φ = Function( 𝑆 ) 𝐶 = AutoCorrelation( Φ ) For each 𝑘 ∈ [2, 𝐾] For each 𝑗 ∈ [0, 𝑘 − 1] 5. sym 𝑘 += 1 𝑘 𝐶 0 −𝐶 𝑂 𝑁 log 𝑁 /𝑂(𝑁 2 log 𝑁) 𝑂 𝑁 𝑂 𝑘 2𝑗𝜋 𝑘 Run-time complexity is: • Circle: 𝑂 𝑁 2 • Disk: 𝑂 𝑁 2 log 𝑁 𝑂 1 Geometry Processing in Detail • Symmetry Detection – Discrete – Continuous • Solid Reconstruction – Computing the indicator function – Iso-surface extraction – Surface extension Solid Reconstruction Fit a solid to a set of sample points [Input] What is a shape? A shape is a finite subset 𝑃 ⊂ ℝ3 × 𝑆 2 × ℝ>0 , corresponding to positions, normals, and area. Shape is an object over which you integrate 2-forms (i.e. a 2-current). [Output] What is a shape? A shape is a function telling us whether a point is inside or outside the solid: 1 if 𝑝 ∈ 𝑆 𝜒𝑆 𝑝 = 0 otherwise What do we want to compute? Compute the (smoothed) indicator function: 1. Compute the gradients 2. Integrate the gradients 𝑃 = { 𝑝, 𝑛, 𝜎 } [Kazhdan, 2005][Kazhdan et al., 2006] 𝛻𝜒 𝜒 Compute the Gradients Since the indicator function is discontinuous, we seek the gradient of the smoothed function: 𝜕 𝜕 𝜕 , , 𝜕𝑥 𝜕𝑦 𝜕𝑧 𝜒𝑆 ∗ 𝐹 for some smoothing filter 𝐹: ℝ3 → ℝ. Compute the Gradients Convolution and differentiation commute: 𝜕 𝜕𝐹 𝜒𝑆 ∗ 𝐹 = 𝜒𝑆 ∗ . 𝜕𝑥 𝜕𝑥 Compute the Gradients The convolution at point 𝑞 ∈ ℝ3 is the integral of the signal times the shifted filter: 𝜕𝐹 𝜒𝑆 ∗ 𝜕𝑥 𝑞 𝜕𝐹𝑞 = 𝜒𝑆 ⋅ 𝑑𝑝 = 𝜕𝑥 ℝ3 with 𝐹𝑞 (𝑝) = 𝐹(𝑞 − 𝑝). 𝜕𝐹𝑞 𝑑𝑝 𝑆 𝜕𝑥 Compute the Gradients The convolution at point 𝑞 ∈ ℝ3 is the integral of the signal times the shifted filter, which is the solid integral of the shifted filter: 𝜕𝐹 𝜒𝑆 ∗ 𝜕𝑥 𝑞 𝜕𝐹𝑞 = 𝜒𝑆 ⋅ 𝑑𝑝 = 𝜕𝑥 ℝ3 with 𝐹𝑞 𝑝 = 𝐹(𝑞 − 𝑝). 𝜕𝐹𝑞 𝑑𝑝 𝑆 𝜕𝑥 Compute the Gradients The partial is the divergence of a vector field: 𝜕𝐹𝑞 𝑑𝑝 = 𝑆 𝜕𝑥 𝛻 ⋅ (𝐹𝑞 , 0,0) 𝑑𝑝 = 𝑆 〈 𝐹𝑞 , 0,0 , 𝑑𝑛〉 . 𝜕𝑆 Compute the Gradients The partial is the divergence of a vector field, so by Stokes’ Theorem: 𝜕𝐹𝑞 𝑑𝑝 = 𝑆 𝜕𝑥 𝛻 ⋅ (𝐹𝑞 , 0,0) 𝑑𝑝 = 𝑆 〈 𝐹𝑞 , 0,0 , 𝑑𝑛〉 . 𝜕𝑆 Compute the Gradients Discretizing the integral, we get an estimate for the gradient at 𝑞 as a sum over the input points: 𝛻 𝜒𝑆 ∗ 𝐹 ≈ 𝑞 = 𝐹𝑞 ⋅ 𝑑𝑛 𝜕𝑆 𝜎 ⋅𝐹 𝑞 −𝑝 ⋅𝑛. 𝑃 = { 𝑝, 𝑛, 𝜎 } 𝑝,𝑛,𝜎 ∈𝑃 𝛻𝜒 Integrate the Gradients Given a target gradient field 𝑉, the best fit scalar function is the solution to the Poisson Equation: 𝜒 = arg min 𝛻 𝜒 − 𝑉 ⇕ 2 ∗ Δ𝜒 = 𝛻 ⋅ 𝑉. 𝛻𝜒 𝜒 ∗ May be subject to appropriate boundary conditions. Naïve Implementation ReconstructSolid( 𝑃 ) 1. ComputeNormalsAndArea*( 𝑃 ) 2. For 𝑞 ∈ 0,1 3 : 3. 𝑉 𝑞 =0 4. ∀ 𝑝, 𝑛 , 𝜎 ∈ 𝑃: 𝑉 𝑞 += 𝜎 ⋅ 𝐹 𝑞 − 𝑝 ⋅ 𝑛 𝑂 𝑁3 𝑂 |𝑃| Note: 5. 𝑑𝑖𝑣 = 𝛻 ⋅ 𝑉 𝑂 𝑁3 Since6.thisSolvePoisson( holds for any (smooth) filter, we can choose 𝐹 ≥to𝑂be 𝑑𝑖𝑣 ) 𝑁3 compactly supported so only samples close to 𝑞 contribute. If we discretize over an 𝑁 × 𝑁 × 𝑁 grid and 𝑃 = 𝑂 𝑁 2 : • Storage Complexity: 𝑂 𝑁 3 • Computational Complexity: 𝑂 𝑁 5 *[Rosenblatt, 1956] [Parzen, 1962] [Hoppe, 1994] [Mitra and Nguyen, 2003] How can we compute it effectively? Structure of the Input/Output: • Points in 𝑃 should lie on a 2D manifold in ℝ3 . • 𝜒 should be constant away from the samples. ⇒ Adapt a space-partition to 𝑃. ⇒ Use the same space partition to discretize 𝜒. Choosing a Space Partition • Supports discretization of the linear system: – Octrees: [Losasso et al., 2004] – Adapted Tetrahedralizations: [Alliez et al., 2007] • Supports efficient (hierarchical) solver: – Regular Grids: [Fedorenko, 1973] [Brandt, 1977] – Octrees: [Kazhdan and Hoppe, 2013] Efficient Implementation ReconstructSolid( 𝑃 ) 1. 2. 3. 4. 5. 6. ComputeNormalsAndArea( 𝑃 ) 𝑂 = ConstructOctree( 𝑃 ) For 𝑜 ∈ 𝑂: 𝑉 𝑜 =0 ∀ 𝑝, 𝑛 ∈ 𝑃 s.t. 𝑝 − 𝑜 < Supp (𝐹): 𝑂 |𝑃| log |𝑃| 𝑂 |𝑃| 𝑂 1 𝑉 𝑜 += 𝜎 ⋅ 𝐹 𝑝 − 𝑜 ⋅ 𝑛 7. ∀𝑜 ∈ 𝑂: 𝑑𝑖𝑣 𝑜 = 𝛻 ⋅ 𝑉 (𝑜) 𝑂 |𝑃| 8. HierarchicallySolvePoisson( 𝑑𝑖𝑣 ) 𝑂 |𝑃| • Storage Complexity: 𝑂 |𝑃| • Computational Complexity: 𝑂 |𝑃| log |𝑃| Iso-Surface Extraction Extract the shape of the level-set of a discretely sampled function What is a shape? A shape is a triangle mesh What do we want to compute? Find a shape separating points with negative value from points with positive value. 1. Fit a function 𝑓: ℝ3 → ℝ to the samples. 2. Find the level-set: 𝑆 ≡ {𝑝 ∈ ℝ3 |𝑓 𝑝 = 0}. Inverse Function Theorem: In general, the level-set of a function The level-set will be manifold/water-tight cannot be represented by a triangle mesh.if zero is not a singular value. How can we compute it effectively? 1. Adapt the function: For linear functions, the level-set is planar. ⇒ Given the samples: I. Tetrahedralize the positions II. Fit the linear interpolant to each tet’s vertex values III. Extract the level-set of the Simplicial Structure: global function. [Doi and Koide, 1991] Adjacent tets share triangular faces. ⇓ The global function is continuous. How can we compute it effectively? 2. Adapt the geometry: We need an approximate iso-surface that separates the samples. ⇒ Given the samples: I. Partition space into (convex) cells II. Compute iso-edges on faces that separate Partition Structure:vertices with opposite signs Faces/edges of the partition intersect trivially. III. Extend the boundary⇓curve surface is water-tight/manifold. to aSeparating surface in the interior [Lorensen and Cline, 1987] [Schaefer and Warren, 2004] Surface Extension Find a surface whose boundary interpolates a 3D curve What is a shape? A shape is a mapping from the unit disk into ℝ3 . What do we want to compute? Given a simple/closed curve 𝛾, find the smooth parameterization Φ𝛾 that agrees with 𝛾:* Φ𝛾 = arg min 𝛻Φ 2 𝑑𝜇 w/ Φ 𝐷2 𝑆1 =𝛾 – If 𝛾 lies on a convex domain, the map Φ𝛾 is an embedding. [Meeks and Yau, 1980] – This is a minimal area surface, which is a fixed point of MCF. [PinkallMCF, andwe Polthier, To discretize need to 1993] refine the mesh, increasing the complexity of the shape. ∗ Gradients, norms, and measures defined w.r.t. Φ What do we want to compute? Fixing the position of the vertices, we want a triangulation that minimizes the area. How can we compute it effectively? Fixing the position of the vertices, we want a triangulation that minimizes the area. Leverage the structure of the solution: – Sub-triangulations are minimal – Sub-triangulations recur ⇒ Dynamic programming solution: – 𝑂 𝑁 3 time – 𝑂 𝑁 2 space [Klincesk, 1980] [Barequet and Sharir, 1995] Searching for Structure Searching for Structure What do we want to compute? What is the structure of the class we are working with? • • • • Ordered set Inner-product space Group representation Currents Searching for Structure What do we want to compute? What is the structure of the class we are working with? How do we compute it effectively? What is the structure of the computation we are performing? • • • • Ordered set • Memoization Inner-product space • Divide-and-conquer Group representation • Dynamic programming Currents Searching for Structure What do we want to compute? What is the structure of the class we are working with? How do we compute it effectively? What is the structure of the computation we are performing? What is the structure of the instance we are considering? • • • • • Partial matching table Ordered set • Memoization Inner-product space • Divide-and-conquer • Adaptive octree Group representation • Dynamic programming Currents Thank you Questions • Can iso-surface extraction be extended to more general space partitions? • Can area minimizing triangulations be obtained through successive edge flips? If so, how does the efficiency compare? • Is there a Dirichlet minimizing triangulation [Rippa, 1990] for a closed polygonal curve in 3D? Is it related to area minimizing triangulation? • Does the optimality of the Delaunay triangulation translate into optimality of the extracted level-set? • Is the minimal area triangulation of a simple closed polygon on a convex surface guaranteed to not self-intersect? • Extend symmetry detection to circular/spherical parameterizations by redefining the “action of 𝑆𝑂(2)/𝑆𝑂(3)” on functions. • We don’t need the full power of linearity for symmetry detection. What is the minimal structure needed to apply representation theory methods?