%% 2-D Delaunay Triangulation
% Create a 2-D delaunayTriangulation object for 30 random points.

rng default;
P = rand([30 2]);
DT = delaunayTriangulation(P)

%
% Compute the center points of each triangle, and plot the triangulation with the center points.

IC = incenter(DT);
triplot(DT)
hold on
plot(IC(:,1),IC(:,2),'*r')

% Copyright 2012 The MathWorks, Inc.