% ShowPoly2
% Illustrates the class Poly2.

clear all
clear class
close all
plot([-10 10],[0 0],':k',[0 0],[-10 10],':k')
axis equal
axis([-10 10 -10 10])
hold on

% Construct and display a heptagon...
x = 6 + 2*cos([0 30 100 150 200 280 320]*pi/180);
y = 5 + 3*sin([0 30 100 150 200 280 320]*pi/180);
P = Poly2(x,y);
P.Show('m')

% Remove its last vertex...
P.DeleteLast();

% Translate the resulting hexagon to the origin and display...
P.MoveToOrigin();
P.Show('b')
