Title

Digital Geometry Processing
Exercise 2 - Geometry Representaiton
Edward Chien, edchien@bu.edu
Computer Graphics & Geometry Processing

Exercise 1 Notes/Thoughts

  • Everyone seems to have built alright!
  • Several people used a dense representation of some sort, e.g., a nested array, which would not scale to larger sparse matrices
  • One or two people used A.coeffRef(i,j) = value which is less efficient than using setFromTriplets() as explained in the first documentation page
  • Some tried solvers other than SparseLU, e.g., conjugate gradient and Cholesky, that require symmetric, positive-definite matrices; see tables
  • solver.compute() equivalent to solver.analyzePattern() followed by solver.factorize; useful to break up if you need to solve systems with the same sparsity pattern but different values: example

Theory Hints

Problem 1

  • Misspoke in class on Thursday: when a curve or surface comes with a normal, the SDF should be positive on the side of the normal and negative on the other side
  • You can specify the normal choice here (two sensible choices, as usual)
  • The dot product might be quite helpful

Problem 2

  • Remember the parametric heart example: possible to achieve sharp turns with differentiable functions, i.e., non-regular curves
  • Polynomials will be differentiable, but can certainly have zero derivative

Problem 3 & 4

  • For these, consider curves that have periodic, repeating behavior

Programming Hints

Linear interpolation

  • \(f(p_1) = y_1, f(p_2) = y_2\) and they differ in sign
  • \(f(p) = 0\) at \(p = \frac{|y_2|}{|y_2| + |y_1|} p_1 + \frac{|y_1|}{|y_2| + |y_1|} p_2\)
  • linInterp.PNG

Other notes

  • Don’t forget to handle corner case where function equal to zero at vertices
  • Point is an alias for ACG::Vec3d (see header file); these have many overloaded operators for basic vector arithmetic and other useful functions like dot product, cross product, norm, etc.
  • OpenMesh Documentation for Vec3d objects
  • Any other questions?