Re: Question from venezuela
- To: mathgroup at smc.vnet.net
- Subject: [mg14298] Re: Question from venezuela
- From: "Mario R. Riotorto" <riotorto at redestb.es>
- Date: Tue, 13 Oct 1998 01:21:15 -0400
- Organization: ES
- References: <6vf4sc$dg3@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hernan Andres Zu~niga Medina escribi'o: >Hello my name is Hernan Zuniga, I am tesista of predegree in the >University of The Andes - Merida Venezuela. At the moment I am >developing my thesis in Growth of Crystals with the Mathematica program >by using CELLULAR AUTOMATA for it; but I have a problem with the >handling of the vicinities. It wanted to ask if it can help thanks me >for its attention. > >The question is the following one: when it is used the vicinity of Moore >and is wanted to evaluate the site depending on the nearest neighbors, >I can be changed the site but I need to change some of the nearest >neighbors at the same time. Como te va Hernan? When I simulate CAs with Mathematica, I create previously a function like that: vecindad[n_]:= Table[{j, (*center*) Mod[j,n]+1, (*east*) Mod[j-2+n,n]+1}, (*west*) {j,n}] Now, if I want to calculate the neighborhood structure for a Linear Cellular Automaton, with radius=1 and just 5 cells, then vecindad[5] will give: {{1,2,5},{2,3,1},{3,4,2},{4,5,3},{5,1,4}} Obviously, you can extend the method to more complex vecinities. With this choice, I avoid to re-calculate the vecinity of each cell at each step of time. Un saludo desde el otro lado del charco... Mario. -- ----------------------------------------- Mario Rodriguez-Riotorto mailto:riotorto at redestb.es http://personal.redestb.es/riotorto