1 / 15

Programming assignment

Programming assignment. You need to implement the following: Display basic mesh Information Find the number of vertices, edges, faces, boundaries, and compute Euler characteristic and number of genus Corresponding to function Mesh::DisplayMeshInfo() Compute normal at each vertex

paytah
Download Presentation

Programming assignment

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Programming assignment • You need to implement the following: • Display basic mesh Information • Find the number of vertices, edges, faces, boundaries, and compute Euler characteristic and number of genus • Corresponding to function Mesh::DisplayMeshInfo() • Compute normal at each vertex • Corresponding to function Mesh::ComputeVertexNormals() • Compute mean curvature at each vertex • Corresponding to function Mesh::ComputeVertexCurvatures()

  2. Programming assignment • Explicit umbrella smoothing • Corresponding to function Mesh::UmbrellaSmooth () • Implicit umbrella smoothing • Corresponding to function Mesh::ImplicitUmbrellaSmooth ()

  3. Wavefront OBJ file format comment coordinates of vertex 1 three vertices of each face counter-clockwise order as you look at the face from outside v2 v1 v4 v3

  4. How to modify program arguments 1) Select the menu item “Project  Property”

  5. How to modify program arguments 2) Select the “Debugging” tag 3) Type your arguments here 4) Press enter to comfirm

  6. Normal at a vertex 0 t1 • From Siggraph 2000 subdivision course notes, the normal vector at an interior vertex of valence k can be computed as t1 x t2, where ti are tangent vectors computed as: • Example: for valence four, the masks are [1, 0, –1, 0] and [0, 1, 0, –1]. 1 -1 0 1 t2 0 0 -1 Masks for valence four

  7. Normal at a vertex • At a boundary vertex p with valence k, the normal is computed as talong x tacross computed as follows: pk-1 p p1 p0

  8. Mean curvature at a vertex • From Siggraph99 Desbrun et al , the discrete mean curvature at an interior vertex p with valence k can be computed as the L2-norm of p pj where A is the sum of areas of all the triangles sharing the vertex p p pj-1 one term of the summation, corresponding to edge p pj pj Pj+1

  9. Explicit Umbrella Smoothing • Fairing operator • In matrix form • In your implementation you do not need to build the matrix Drawbacks: small time step for large mesh  slow Where t is time stamp

  10. Implicit Umbrella Smoothing • Explicit updating • Allows large time step • In your implementation setting to 1 is okay • You can use biconjugate gradient (BCG) method to solve the linear system You need to solve a sparse linear system

  11. Sparse Linear System • You need to build the sparse linear system by create a Matrix object • Use Matrix::AddElement to add an element • Use Matrix::SortMatrix to sort the elements after adding all of them • You need to implement the function Matrix::BCG() to solve the linear system • Use Matrix::Multiply to compute b = Ax • Use Matrix::PreMultiply to compute bT = xTA

  12. Using Boundary Half-edge • For open meshes, you can also maintain boundary half-edges such that the searching and updating will be much more easy. (every things are circular list, also no need to handle NULL pointers) • Here the boundary half-edges are shown in red as the triangles are being loaded.

  13. Useful Classes and Functions • Classes OneRingHEdgeand OneRingVertex provide an interface to access the one-ring neighboring half-edges and vertices of a given vertex. • Function Vertex::Valence() let you know the valence (# of neighboring vertices) of a vertex.

  14. Rendering in OpenGL (Flat) One normal for a triangle

  15. Rendering in OpenGL (Smooth) One normal for each vertex

More Related