Part II: Border Smoothing
Return to the Project 2 Home Page
Border Smoothing:
Download the zip.
Specification
Try to smoothen the border vertices. Explain what happens and illustrate it. Try using 4-point subdivision to find the location of a vertex and move the original vertex of the border a fraction of that distance. Try combining each step of interior vertex beautification with a step of border smoothing. If it works, show the results. If not, show what goes wrong.
Description:
For this part of the project, we used the four-point subdivision method described in the specification. In order to use this option, type 'V' on the display.
Border Smoothing - 'V'
Detailed Explanations:
During this part, we at first were having problems in storing the border vertices in a form that we could manipulate. Finding the border vertices was not a problem, but ordering them in an appropriate way so that we could use the Four-Point Subdivision method on them was more tricky.
while(counter > 0){
for(i=0;i< 3*numOfTriangles; i++){
if(v[i] == currV){
if(g[v[pOpt(i)]].b == -1 && o[nOpt(i)] == -1){
poly[j] = currV;
currV = v[pOpt(i)];
counter--;
j++;
}
}
}
}
For this part of the code, we first had counter set to the total number of vertices on the border. Then for each vertex we checked to see if it was the current vertex (the starting vertex was initialized earlier). Then we had to see if the previous of the current corner was a border vertex and that the opposite of the next corner was -1. This way we could determine if there was a border triangle attached to the edge or not.
http://escience.anu.edu.au/lecture/cg/surfaceModeling/printNotes.en.html
For example, if you pasted another triangle onto the triangle strip at vertices 2 and 4, while traversing the border, even though triangle(2,3,4) has another border vertex besides (4), you would need to ensure that both the next of corner(4) did not have an opposite and the the previous of (4) was a border vertex so that you knew that you could move on the the next vertex at (2). Otherwise you would have to find another corner at vertex (4), and essentially another triangle..
Examples:
For each time that we called the internal smoothing process described in Part I, we followed it with the border smoothing.
Original mesh.
After one iteration of Beautification + Border Smoothing.
After two iterations.
At this point, you see very little change from the original mesh and the final mesh as far as the border vertices go, but look at the subsequent iterations...
After 20 iterations.
After 40 iterations.
In all, even though the border mesh does change and the inner part of the mesh does become smoother as we wished, the border is not consistent, and this is due in part to the fact that the smoothing algorithm for the border is not dependent on the algorithm for the inner vertices. The border goes about its own manipulations without taking any of the inner vertices into account just as the inner vertices have no relation to the border vertices as far as smoothing techniques are concerned.
Conclusions:
Even when we alternated between the interior smoothing and the border smoothing, we were unable to obtain a satisfyingly smooth mesh. Although you might get a mesh that is closer to what you want with the alternating beautification and border smoothing techniques described the these two parts, you are still unable to obtain a truly smooth mesh with relatively equidistant vertices.
One way that this could be fixed is to somehow make the border smoothing technique dependent on the inner vertices. For example, make the distance that you move from the original vertex to the four-point subdivision vertex dependent on the average of the inner vertices connected to that point. This might allow the user a greater chance of obtaining a smooth triangular mesh.