%% Compute Circumcenters of 2-D Triangulation
% Load 2-D triangulation data and create a triangulation representation.

load trimesh2d
TR = triangulation(tri,x,y);

% Compute the circumcenters of each triangle in TR.

C = circumcenter(TR);

% Plot the triangulation along with the circumcenters in red. The $x$-coordinates of the circumcenters are contained in the first column of C and the corresponding $y$-coordinates are contained in the second column.

triplot(TR)
axis([-100 400 -50 350])
hold on 
plot(C(:,1),C(:,2),'r.')
hold off

% Copyright 2015 The MathWorks, Inc.