- /
-
Cannonball Stacking
on 17 Oct 2021
- 5
- 19
- 0
- 0
- 280
[x,y,z]=sphere(91);
colormap(gray(1))
f=gca;
w=@copyobj;
for l=1:7
g=surface(x,y,z+(l-1)*1.732,'vi','off','FaceC','flat');
light
shading interp
material shiny
t=(1:2:13)+l-1;
for i=1:(8-l)
p=w(g,f);
p.XData=x+t(i);
for j=1:(8-l)
q=w(p,f);
q.YData=y+t(j);
q.Visible='on';
end
end
end
view(3)
axis equal tight off