• Remix
  • Share
  • New Entry

  • VMM

  • /
  • MATRIXcore band logo

on 1 Dec 2023
  • 6
  • 34
  • 0
  • 1
  • 754
function drawframe(nn)
function lap = lapl(x,dist)
lap = (circshift(x,1,1)+circshift(x,-1,1)+circshift(x,1,2)+circshift(x,-1,2)-4*x)/dist^2;
end
range = [7:26 ones(1,10)*26 26:-1:7];
persistent caps;
if(isempty(caps))
caps = {};
imgsz=512;
textImage = zeros(imgsz);
textImage = insertText(textImage, [80 170], ['MATLAB'], 'FontSize', 72, 'BoxOpacity',0, 'FontColor','white');
textImage=rgb2gray(textImage);
se = strel('disk', 4);
textImage = imdilate(textImage, se);
u = 1-textImage;
v = textImage;
ru = 0.23;
rv = 0.1;
f = 0.0990;
k = 0.0565;
Ts = 0.9078947368;
steps = 10000;
capsstep = floor(steps/26);
for i=1:steps
if(mod(i-1,capsstep) == 0)
caps{end+1} = u;
end
nu = ru*lapl(u,1)-u.*(v.^2)+f*(1-u);
nv = rv*lapl(v,1)+u.*(v.^2)-v*(f+k);
u = u+Ts*nu;
v = v+Ts*nv;
end
end
im = caps{range(nn)};
im = imbinarize(im,0.5);
imshow(im, [])
end
Animation
Remix Tree