Presentation is loading. Please wait.

Presentation is loading. Please wait.

PA1 Supplementary notes 1 Programming assignment You need to implement the following: 1. Display basic mesh Information Find the number of vertices, edges,

Similar presentations


Presentation on theme: "PA1 Supplementary notes 1 Programming assignment You need to implement the following: 1. Display basic mesh Information Find the number of vertices, edges,"— Presentation transcript:

1 PA1 Supplementary notes 1 Programming assignment You need to implement the following: 1. 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() 2. Compute normal at each vertex Corresponding to function Mesh::ComputeVertexNormals() 3. Compute mean curvature at each vertex Corresponding to function Mesh:: ComputeVertexCurvatures ()

2 PA1 Supplementary notes 2 Programming assignment 4.Explicit umbrella smoothing Corresponding to function Mesh::UmbrellaSmooth () Implicit umbrella smoothing Corresponding to function Mesh::ImplicitUmbrellaSmooth ()

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

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

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

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

7 PA1 Supplementary notes 7 Normal at a vertex At a boundary vertex p with valence k, the normal is computed as t along x t across computed as follows: p0p0 p1p1 p k-1 p

8 PA1 Supplementary notes 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 where A is the sum of areas of all the triangles sharing the vertex p p pjpj p p j-1 pjpj P j+1 one term of the summation, corresponding to edge p p j

9 PA1 Supplementary notes 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 PA1 Supplementary notes 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 PA1 Supplementary notes 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 b T = x T A

12 PA1 Supplementary notes 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 PA1 Supplementary notes 13 Useful Classes and Functions Classes OneRingHEdge and 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 PA1 Supplementary notes 14 Rendering in OpenGL (Flat) One normal for a triangle

15 PA1 Supplementary notes 15 Rendering in OpenGL (Smooth) One normal for each vertex


Download ppt "PA1 Supplementary notes 1 Programming assignment You need to implement the following: 1. Display basic mesh Information Find the number of vertices, edges,"

Similar presentations


Ads by Google