_DASH_DASHREPLACE_WITH_DASH_DASHREPLACE_WITH_DASH_DASH-
%
%   author : David Legland 
%   INRA - TPV URPOI - BIA IMASTE
%   created the 08/07/2005
%

%% Generate random polygon

% clean up
clear all;
close all;

% generate random points in a square
pts = rand(50, 2)*100;

% compute the polygon corersponding to their convex hull
hull = convhull(pts(:,1), pts(:,2));
poly = pts(hull, :);

%% Compute medial axis

% the result is given as graph : n are nodes (points), and e are edges,
% co