• Remix
  • Share
  • New Entry

on 29 Oct 2021
  • 8
  • 58
  • 2
  • 0
  • 279
%-----------------------------------------------------
%% GRAY-SCOTT REACTION-DIFFUSION MODEL
%-----------------------------------------------------
f=.026;k=.053; %
N=128; % gridsize (N=128)
M=64;
%% initial conditions
x=meshgrid(1:N);
u=ones(N);
v=0*u;
r=50:63;
v(r,r+5)=1; % center seeding
v(r+3,r)=1;
%% petri-dish filter
w=sqrt((x-M).^2)<2*M;
%% numerical PDE solver
%j = 0;
while j<3e3
u=u+w.*((del2(u,2))-u.*v.^2+f.*(1-u));
v=v+w.*((del2(v,2))/2+u.*v.^2-(f+k).*v);
j=j+1;
end
% plotting
h=surf(x,x.',w.*u);
h.CDataMapping='scaled';
colormap(jet)
shading interp
axis off
view(0,90)
%% References:
% [1] A. M. Turing, The chemical basis of morphogenesis, Philosophical Transactions of the
% Royal Society of London (Biological Sciences), 237: 37-72, 1952.
% [2] K. Käfer and M. SchulzGray, Gray-Scott Model of a Reaction-Diffusion System Pattern Formation
% https://itp.uni-frankfurt.de/~gros/StudentProjects/Projects_2020/projekt_schulz_kaefer/
% (Accessed at October, 2021).
%% Notes:
% i) Please check the references for other f,k parameters!
% ii) Yes, indeed. THE "Alan Turing" studied these dynamic models ;o
Remix Tree