%% Compute Incenters of 2-D Delaunay Triangulation
% Create a 2-D Delaunay triangulation.

x = [0 1 1 0 0.5]';
y = [0 0 1 1 0.5]';
TR = delaunayTriangulation(x,y);

%
% Compute the incenters of the triangles.

C = incenter(TR);

%
% Plot the triangles and incenters.

triplot(TR)
axis equal
axis([-0.2 1.2 -0.2 1.2])
hold on 
plot(C(:,1),C(:,2),'*r') 

% Copyright 2015 The MathWorks, Inc.