• Remix
  • Share
  • New Entry

on 18 Oct 2022
  • 58
  • 190
  • 2
  • 2
  • 272
n=6;
axis([0 n 0 n 0 n]);
axis off
axis square
view(3)
w=0.85;
u=[0 0; 0 0; w w; w w];
v=[0 w; 0 w; 0 w; 0 w];
z=[w w; 0 0; 0 0; w w];
s=[nan nan];
x=[u; s; v];
y=[v; s; u];
z=[z; s; w-z];
m=n-1;
for i=m:-1:0
for j=m:-1:0
for k=0:m
r=k/m;
g=1-j/m;
b=1-i/m;
surface(i+x,j+y,k+z,'facecolor',[r g b])
end
end
end
Image
Remix Tree