• Remix
  • Share
  • New Entry

on 29 Oct 2021
  • 6
  • 18
  • 1
  • 0
  • 278
%Piet color Circle Blocks
g=.7
g = 0.7000
figure('Color',[g g g])
hold
Current plot held
y=1;x=0;
c=['k','b','r','y'];c=[c c];
axis equal off
v=[1 1];
for n=1:9
%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+2)%
end
%
rectangle(Pos=[x y a a],Curv=[.5 .5],FaceC=c(n),EdgeC='w',LineW=3);
end
y = 5
y = 52
Index exceeds the number of array elements. Index must not exceed 8.
Remix Tree