Ang Lee, the Magician >> Projects >> Graphics >>Mesh  
         
 

Mesh - Part B

Shortcut to PartA / PartC / CS6491 project page

Abstract

After a user create a mesh using the tool made in part A, he can press 'c' to have an radius-adjustable circle moving with the mouse curcor. By pressing left button, the region within and near the circle will be subdivide. Moreover, the z value (height) is increased every time. The result can be shown in 3D by pressing 'v'.

 

 

   

Links :

PartB:
WriteUp (subdivision)
Movie (3.5MB MP4/ Use quicktime player)
Source code (in C++)
Excutable (interface_description)
 

Goal

Break-down according to the P2 instruction


Let the user move a circle over your 2D mesh. The radius of the circle should be adjustable.
When the mouse is pressed, the vertices in the circle should be identified and painted red.
Each edge incident upon a red vertex should also be painted red.
Compute a mid-point for each red edge and associate with each one of the two corners opposite of the edge the id c.m (stored in M[c]) of that new vertex.
Split each triangle with k red edges into k+1 triangles using the mid-edge vertices. Reconstruct the corner table.
Use this tool to perform local refinements of the mesh by clicking several times in the same area. Increase the height of each red vertex by a constant when the user clicks on the mouse. Show the results with a 3D perspective view and use shading to render the triangle in 3D.

     

 

Adjustable radius size.

Different level of subdivision

(step 0)

(step 1)

(step 2)

(step 3)

 

 

 

     

 

 

Last update: 2005-10-04