function RD_display_cells(a,locs,nei,d_max)
%

num_cells = length(a);
clf
subplot(1,2,1);
plot(locs(:,1),locs(:,2),'ro');
axis equal
hold on
plot(-2,-2,'k.');
plot(2,2,'k.');
xlabel('X');
ylabel('Y');
for c1 = 1:num_cells-1
    pt1 = [locs(c1,1),locs(c1,2)];
    for c2 = c1+1:num_cells
        pt2 = [locs(c2,1),locs(c2,2)];
        if norm(pt1-pt2)<d_max
            plot([locs(c1,1),locs(c2,1)],[locs(c1,2),locs(c2,2)]);
        end
    end
end
subplot(1,2,2);
as = conv(a,ones(1,3)/3,'same');
plot(as);
hold on
plot(0,0,'k.');
plot(num_cells+1,10,'k.');
xlabel('Cell Number');
ylabel('Morphogen Concentration');
