%% Buffer 2-D Points
% Create a matrix that contains the 2-D coordinates of three points. Then, create a polyshape object that buffers each point by a distance of 0.25 units.

P = [0 0; 1 1; 2 1];
polyout = polybuffer(P,'points',0.25)

% Plot the original points and their buffer regions.

plot(P(:,1),P(:,2),'r.','MarkerSize',10)
hold on
plot(polyout)
axis equal

% Copyright 2012 The MathWorks, Inc.