%% Simple Boundary
% Create and plot a simple triangulation object.

P = [2.5 8.0; 6.5 8.0; 2.5 5.0; 6.5 5.0; 1.0 6.5; 8.0 6.5];
T = [5 3 1; 3 2 1; 3 4 2; 4 6 2];
TR = triangulation(T,P);
triplot(TR)
xlim([0 9])
ylim([4.5 8.5])

% Create and plot a polyshape object whose boundary is equal to the boundary of the triangulation.

polyout = boundaryshape(TR);
plot(polyout)

% Copyright 2018 The MathWorks, Inc.