This file is from Wikimedia Commons and may be used by other projects.
The description on its file description page there is shown below.
Summary
Description2D Random Walk 400x400.ogv
English: One million steps in a two-dimensional random walk, at 1500 steps per second. At each step, the particle randomly moves to any one of the eight positions in its Moore neighbourhood. The grid is 400x400 square with toroidal boundary conditions (i.e. going off one edge reappears on the opposite edge). Generated with MATLAB using my own script - video has 20000 frames. The steps slowly fade out exponentially at 0.9999^t (a version showing all the steps taken is here). Encoded with Ogg Theora at 600 kbps: video has noticeable compression artifacts, but these do not appear to significantly detract from quality. MATLAB source code shown below:
tmax=20000;%the maximum time
x=1; %the number of particles
n=400; %the size of the square grid
pos=randi(n/2,2,x)+n/4; %initial position of particles.
vel=randi(3,2,x)-2; %initial velocity of particles.
img=zeros(n);
r=1;
for t=1:tmax
for q=1:50 %how many steps per frame
img=0.9999*img;%reset the image but with a shadow or trail.
for i=1:x
img(pos(1,i),pos(2,i))=img(pos(1,i),pos(2,i))+10;
end
vel=randi(3,2,x)-2; %velocity of particles.
pos=pos+vel;
pos=mod(pos-1,n)+1;
end
imwrite(img./11,[num2str(t) '.png'],'png');
end
to share – to copy, distribute and transmit the work
to remix – to adapt the work
Under the following conditions:
attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.http://www.gnu.org/copyleft/fdl.htmlGFDLGNU Free Documentation Licensetruetrue
You may select the license of your choice.
Captions
Add a one-line explanation of what this file represents
{{Information |Description={{en|1=One million steps in a two-dimensional random walk, at 1500 steps per second. At each step, the particle randomly decides whether to go up, down, left, or right. The grid is 400x400 square with toroidal