A Note About the Implementation
In the section
Computation, we saw how
to obtain the
alpha-hull of a set of points in the discrete case. However,
the criterion for picking
alpha outlined in the previous section does
not seem to give good results as is. The constant
c, as in the last
equations, is needed to make the algorithm give reasonable results. This
is why, the applet allows the user to select a multiplicative constant
c. One does this by entering the value in the text box labeled "
alpha
scale" (it's initial value is set to 5.0). From the experiments run,
and as you can see for yourself playing with the applet, the value of the
constant needs to be greater than 1.0. Also, the shapes one obtains with
a particular value of
c are consistent; that is, the approximated
shape (the
alpha-hull) converges to the underlying shape as the number
of sample points increases. The main reason for having to select this constant
is the fact that a circle of radius less than 1.0 cannot drawn properly on
a discrete grid.
(All the numbers above are in pixels.)