• Remix
  • Share
  • New Entry

on 6 Nov 2023
  • 16
  • 86
  • 0
  • 2
  • 478
drawframe(1);
Write your drawframe function below
function drawframe(f)
if mod(f,2)==1 % only store odd number frames to slow down the animation
set(gca,'Position',[0 0 1 1])
rng default
d = [randi([1000,1500], 1,700), randi([12000,22000],1,700)]; % random cyrillic & chinese characters
d = d(randperm(numel(d))); % mix up the characters
spaceIdx = cumsum(randi(12,1,500));
spaceIdx = spaceIdx+(1:3)';
spaceIdx(spaceIdx>numel(d)) = [];
d(spaceIdx) = 32; % insert random spaces to separate "words"
charMat = reshape(char(d),[],20); % matrix of characters
set(gcf, 'color', 'k')
[x, y] = meshgrid(1:20, 1:20);
ch = num2cell(charMat(f : f+19,:));
c = cellstr(ch(:));
cla
text(x(:), y(:), c, HorizontalAlignment='Center',Color='g')
xlim([0 21])
ylim([0 21])
axis off
end
end
Animation
Remix Tree