%PATTERN_1 creates a point pattern with global attraction and local repulsion

poly = [0 0; 0 100; 100 100; 0 100; 0 0];

xp = poly(:,1);
yp = poly(:,2);

x = 100*rand(50,1);
y = 100*rand(50,1);

plot(xp,yp); hold on;
plot(x,y,'.r');
