
Belousov-Zhabotinsky reaction
rumusan mathematica:
n = 50; SeedRandom[0]; image = Table[Random[Integer, {0, 255}], {n}, {n}];
Do[image = Table[z = image[[i, j]]; zlist = Flatten[image[[
Mod[i - {0, 1, 2}, n] + 1, Mod[j - {0,
1, 2}, n] + 1]]]; If[z == 255, 0, a = 9 - Count[
zlist, 0]; If[z ==
0, b = Count[zlist, 255];
Floor[(a - b)/3] + Floor[b/3], Min[Floor[Plus @@ zlist/
a] + 45, 255]]], {i, 1, n}, {j, 1, n}]; ListDensityPlot[image,
Mesh -> False, Frame -> False], {200}];


Categories: Referensi

Recent Comments