|
Algorithm 2 Concave surface converting algorithm. |
-
1:
Initialize line set , and put all strips into set and .
-
2:
for each
do
-
3:
if
then
-
4:
The strips in are fitted into a line according to their horizontal locations with the fitted error .
-
5:
if
then
-
6:
Put this line into L, and remove the corresponding strips in .
-
7:
else
-
8:
Split the strips at the maximum fitting error into and ; .
-
9:
end if
-
10:
else if and
then
-
11:
Delete ; put the line composed of and into L.
-
12:
end if
-
13:
end for
-
14:
Merge collinear line segments in L.
|