• New Entry

MATropolis rooftop view

Adam Danz on 19 Oct 2021
  • 50
  • 370
  • 0
  • 0
  • 280
rng(0) % image customized for this seed (twister)
axes(colorm=gray,Color='k',Pr='p')
hold
Current plot held
h=randg(2,60); % building heights
bar3(h);
axis equal
campos([1.3,33,7]) % z=h(33)
camtarget([40 33 3])
camva(70)
% Loop through buildings
for i=1:60 % 1:size(h,1)
for j=1:60 % 1:size(h,2)
c=.1:.2:h(i,j)-.2;
d=[c;c];
z=d(:)'+[0;0;.1;.1];
y=i+[-.2,.2]+[-1;1;1;-1]/12;
y=repmat(y,size(c));
patch(z*0+j-.4,y,z,'y')
end
end
light(po=[-.7 .7 -1])
Remix Tree