MVLib - Short Writeup - Version 4.0
Example Number 40 - Cellular Automata
This example show hout to use the subroutines cellularrule, cellularplot, cellularcycle and cellularplot, the application show the behaviour of a configuration known as the "The Walker"; after few cycles the configuration is the same on initial state, but modev north-eastward.
The fortran code is available here and the complete script running the code is available here.
Previous Example List of Examples Next Example
MVLib Home Page
	parameter (nx=25,ny=25)
	integer m(nx,ny) ; character file*20,titolo*20
	call mvsetflags ('Tipo di Carattere',-14.0)
	call cellularrule (-1,0)
	m=0
	call cellularinit(m,nx,ny,3,5,4)
	call cellularplot(m,nx,ny)
	call mvsetflags ('X size',600.0)
	call displayplot ('tmp000.gif','The Walker with Cellular Automata',
	2	'Cycle n:000')
	do i=1,40
	   call cellularcycle(m,nx,ny)
	   call cellularplot(m,nx,ny)
	   call makefilename('tmp',i,'.gif',file)
	   call makefilename('Cycle n: ',i,' ',titolo)
	   call displayplot (file,'The Walker with Cellular Automata',titolo)
	end do
	call viacolvento('tmp*.gif','example401.gif')
	end