function n=showbeads(list,beadsize) % % Displays blue spheres on positions the coordinates of which are given in % list % % OUTPUT % Three dimensional plot of the spheres % % INPUT % List of x,y,z coordinates of the particles to be plotted % % % Written by Peter Schall, Harvard University. % % [n,m] = size(list); [a,b,c] = sphere(12); a=beadsize/2*a; b=beadsize/2*b; c=beadsize/2*c; for i=1:n surf(a+list(i,1),b+list(i,2),c+list(i,3),'FaceColor','blue','EdgeColor','None'); hold on; end hold off; camlight left; lighting phong; xlabel('x'); ylabel('y'), zlabel('z'); axis equal