% bucky.m

clear all;
% To obtain the Bucky ball adjacency matrix, enter

B = bucky;

% You can also obtain the coordinates of the Bucky ball graph using

[B,v] = bucky;
 
%  uses these points to plot the Bucky ball graph.

figure;
gplot(B,v)
axis equal

% Add node numbers to a hemisphere of the ball
figure;
k = 1:30;
gplot(B(k,k),v);
axis square
for j = 1:30, text(v(j,1),v(j,2), int2str(j)); end

% View template of the nonzero locations in the Bucky ball's adjacency matrix
figure;
spy(B)

% Spy plots of the matrix powers of B illustrate
% important pts related to sparse matrix operations:
% fill-in and distance:
figure;
spy(B^2)
figure;
spy(B^3)
figure;
spy(B^4)
figure;
spy(B^8)
