Editing User:Tandoorichick/GSoC2016/Project

From BRL-CAD

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 39: Line 39:
 
'''ZIPPER_GAPS (PQUEUE):'''
 
'''ZIPPER_GAPS (PQUEUE):'''
  
Vertex V ←POP_MINIMUM (PQUEUE)
+
Vertex V ←POP_MINIMUM (PQUEUE)
Feature F ← NEAREST_FEATURE (V)
+
Feature F ← NEAREST_FEATURE (V)
if f is a vertex then
+
if f is a vertex then
      VERTEX_CONTRACTION (V, F)
+
VERTEX_CONTRACTION (V, F)
else
+
else
 
  VERTEX_EDGE_CONTRACTION (V, F)
 
  VERTEX_EDGE_CONTRACTION (V, F)
EdgeSet E ← MODIFIED_EDGES
+
EdgeSet E ← MODIFIED_EDGES
for all e ∊ E do
+
for all e ∊ E do
 
  for all v ∊ {CORRESPONDING_FEATURES (e)} do
 
  for all v ∊ {CORRESPONDING_FEATURES (e)} do
 
  MAINTAIN_CORRESPONDENCES (v)
 
  MAINTAIN_CORRESPONDENCES (v)
 
  REINSERT (v)
 
  REINSERT (v)
 
  end for
 
  end for
end for
+
end for
  
  
 
Where,
 
Where,
'''ZIPPER_GAPS (PQUEUE) '''zippers the pair with the least error distance
+
ZIPPER_GAPS (PQUEUE) zippers the pair with the least error distance
 
+
POP_MINIMUM (PQUEUE) pops the element with minimum error distance from the priority queue PQUEUE.  
'''POP_MINIMUM (PQUEUE) '''pops the element with minimum error distance from the priority queue PQUEUE.  
+
NEAREST_FEATURE (V)  gives the nearest feature pair of the vertex V.
 
+
VERTEX_CONTRACTION (V, F) and VERTEX_EDGE_CONTRACTION (V, F) perform contraction of the the vertex V with its feature pair F.
'''NEAREST_FEATURE (V)  '''gives the nearest feature pair of the vertex V.
+
MODIFIED_EDGES () returns the set of all edges that are modified after the contraction routines.
 
+
CORRESPONDING_FEATURES (e) returns the set of all vertices whose feature pair the edge e (from the modified set) is.  
'''VERTEX_CONTRACTION (V, F)''' and VERTEX_EDGE_CONTRACTION (V, F) perform contraction of the the vertex V with its feature pair F.
+
MAINTAIN_CORRESPONDENCES (v) updates the feature pair of the vertex v after the modification of the edges.
 
+
REINSERT (v) reinserts the vertex v into PQUEUE.
'''MODIFIED_EDGES () '''returns the set of all edges that are modified after the contraction routines.
 
 
 
'''CORRESPONDING_FEATURES (e)''' returns the set of all vertices whose feature pair the edge e (from the modified set) is.  
 
 
 
'''MAINTAIN_CORRESPONDENCES (v)''' updates the feature pair of the vertex v after the modification of the edges.
 
 
 
'''REINSERT (v)''' reinserts the vertex v into PQUEUE.
 
  
  
Line 87: Line 80:
  
 
'''STITCH_GAPS (MESH_A, MESH_B):'''
 
'''STITCH_GAPS (MESH_A, MESH_B):'''
//MESH_A and MESH_B denote the boundaries of the two meshes to be stitches (essentially a sequence a vertices)
+
//MESH_A and MESH_B denote the boundaries of the two meshes to be stitches (essentially a sequence a vertices)
u ← STARTING_VERTEX (MESH_A)
+
 
v ← STARTING_VERTEX (MESH_B)
+
u ← STARTING_VERTEX (MESH_A)
while both meshes haven’t reached their terminal vertices
+
v ← STARTING_VERTEX (MESH_B)
 +
while both meshes haven’t reached their terminal vertices
 
  u′ ← NEXT_VERTEX (MESH_A, u)
 
  u′ ← NEXT_VERTEX (MESH_A, u)
 
  v′ ← NEXT_VERTEX (MESH_B, v)
 
  v′ ← NEXT_VERTEX (MESH_B, v)
Line 99: Line 93:
 
  MAKE_TRIANGLE ( u, v, v’ )
 
  MAKE_TRIANGLE ( u, v, v’ )
 
  ADVANCE_POINTER ( MESH_B, v)
 
  ADVANCE_POINTER ( MESH_B, v)
while MESH_A has vertices left
+
while MESH_A has vertices left
 
  MAKE_TRIANGLE ( u, u’, v)
 
  MAKE_TRIANGLE ( u, u’, v)
 
  ADVANCE_POINTER ( MESH_A, u)
 
  ADVANCE_POINTER ( MESH_A, u)
while MESH_B has vertices left
+
while MESH_B has vertices left
 
  MAKE_TRIANGLE ( u, v, v’ )
 
  MAKE_TRIANGLE ( u, v, v’ )
 
  ADVANCE_POINTER ( MESH_B, v)
 
  ADVANCE_POINTER ( MESH_B, v)
  
Where,
+
Where,
'''STARTING_VERTEX (MESH)''' returns the starting vertex in the sequence of vertices in MESH.
+
STARTING_VERTEX (MESH) returns the starting vertex in the sequence of vertices in MESH.
 
+
NEXT_VERTEX (MESH, a) returns the vertex after a in the sequence MESH
'''NEXT_VERTEX (MESH, a)''' returns the vertex after a in the sequence.
+
PERIMETER ( a, b, c) returns the perimeter of the triangle formed by the three vertices a, b, and c.
MESH
+
MAKE_TRIANGLE (a, b, c) adds the triangle formed by the three vertices to the list of faces.
 
+
ADVANCE_POINTER (MESH, a) updates the current vertex pointer from a to the next vertex in MESH.
'''PERIMETER ( a, b, c)''' returns the perimeter of the triangle formed by the three vertices a, b, and c.
+
 
 
'''MAKE_TRIANGLE (a, b, c)''' adds the triangle formed by the three vertices to the list of faces.
 
 
 
'''ADVANCE_POINTER (MESH, a)''' updates the current vertex pointer from a to the next vertex in MESH.
 
 
 
 
===Removal of overlaps: ===
 
===Removal of overlaps: ===
  
Line 247: Line 236:
 
'''Community Bonding Period:''' The exact layout of where in the codebase to include all the functionalities will be discussed with the mentor and decided. Certain situation have ambiguities as to which approach to take; this will also be clarified. Other than that, suggestions for improvements on proposed methods will also be taken from the mentors.  
 
'''Community Bonding Period:''' The exact layout of where in the codebase to include all the functionalities will be discussed with the mentor and decided. Certain situation have ambiguities as to which approach to take; this will also be clarified. Other than that, suggestions for improvements on proposed methods will also be taken from the mentors.  
  
*'''Week 1 (May 23rd to May 29th):''' Conversion process for the portable module
+
*'''Week 1 (May 23rd to May 29th):''' Changes in the existing code (vertex merging using AVL trees and setting face adjacencies in the bot_edge structure)
  
*'''Week 2 (May 30th to June 5th):''' Front end for the mesh healing
+
*'''Week 2 (May 30th to June 5th):''' Testing changes made in the existing code
  
 
*'''Week 3 (June 6th to June 12th):''' Gaps and T-joints - Zippering
 
*'''Week 3 (June 6th to June 12th):''' Gaps and T-joints - Zippering

Please note that all contributions to BRL-CAD may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see BRL-CAD:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)