• Remix
  • Share
  • New Entry

on 1 Nov 2021
  • 0
  • 10
  • 0
  • 0
  • 280
%Piet color Circle Blocks
g=.55
g = 0.5500
figure('Color',[g g g])
hold;
Current plot held
y=1;x=0;
c=['b','y','r','b'];c=[c c];
axis equal off
v=[1 1];
for n=1:6
%F=randi(5);
v(n+2)=v(n)+v(n+1);
a=v(n+2);
switch mod(n,5)
case 1
y=y-v(n);
x=x-a;
case 2
y=y-a;
case 3
x=x+v(n+1);
case 4
x=x-v(n);
y=y+v(n+3)%
end
%
rectangle(Pos=[x y a a],Curv=[.7 .95],FaceC=c(n),EdgeC='w',LineW=6);
end
Index exceeds the number of array elements. Index must not exceed 6.
Remix Tree