% ShowRandomLinks
n = 100;
A = RandomLinks(n);
close all
figure
axis equal square off
hold on
[x, y] = CirclePoints(n);
plot(x, y, 'ko')

for i=1:n
for j=1:n
if A(i,j)==1
xmid = (x(i) + x(j)) / 2;
ymid = (y(i) + y(j)) / 2;
plot ([x(j), xmid], [y(j), ymid], 'k')
plot ([xmid, x(i)], [ymid, y(i)], 'r')
end
end
end
shg