Question from venezuela
- To: mathgroup at smc.vnet.net
- Subject: [mg14312] Question from venezuela
- From: Hernan Andres Zu~iga Medina <zunigaha at ing.ula.ve>
- Date: Tue, 13 Oct 1998 01:21:26 -0400
- Sender: owner-wri-mathgroup at wolfram.com
I am Hernan zuniga and I am graduate student in University of Los Andes, Merida Venezuela. At the moment, I am working on my thesis. I am developing a model for crystal growth by Using Mathematica. I am familiar with CELLULAR AUTOMATA approach and I want to use it as I find it very elegant and efficient way to handle this type of program. In the developement process I stuck with the folowing problem. Now I am referring Moore . After satisfying MatchQ condition, the central atom takes a new value. But I want the neighbouring sites also should take a new value, e.g. if a central site say 1, is sourrounded by 2 and 3; I want to see all of them changed simultaneously to a new value sayb 4. Is there any elegant and fast way. update[a_,b_,c_,d_,1,f_,g_,h_,i_]:=4/; MatchQ[2,a|b|c]&&MatchQ[3,a|b|c]; update[a_,b_,c_,d_,2,f_,g_,h_,i_]:=4/; MatchQ[4,a|b|c]&&MatchQ[3,a|b|c]; update[a_,b_,c_,d_,3,f_,g_,h_,i_]:=4/; MatchQ[4,a|b|c]&&MatchQ[4,a|b|c]; I shall highly appreciate comments on it. Looking forward to hear from friends of Mathgroup. Sinderely, Hernan Zuniga Facultad de Ingenieria, U.L.A. Merida, Venezuela.