• Remix
  • Share
  • New Entry

on 29 Nov 2023
  • 13
  • 27
  • 0
  • 1
  • 508
drawframe(1);
Write your drawframe function below
function drawframe(f)
persistent h i n A I mapsize
if f == 1
n = 48;
C = rand(n);
h = imshow(C);
map = [0.95 0.95 0.95; repmat([0 0 0.75; 0 0 0.8],10,1)];
mapsize = size(map);
colormap(map)
i = 1:n^2;
A = h.CData;
I = A(end,:) > 1/mapsize(1);
hold on
snowman = plot(24, 38, 'o', ...
24, 42, 'o', ...
24, 47, 'o', ...
MarkerFaceColor = 'white', ...
MarkerEdgeColor = 'none');
snowman(1).MarkerSize = 15;
snowman(2).MarkerSize = 20;
snowman(3).MarkerSize = 25;
end
A(mod(i+1,n^2)+1) = A(mod(i,n^2)+1);
I = I.*A(end,:) > 1/mapsize(1);
h.CData = A.*[ones(n-1,n);I];
i = i+1;
end
Animation
Remix Tree
Load full remix tree