home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / fractal / progs / arcaut / Automatons / FgtMeNot < prev    next >
Encoding:
Text File  |  1991-07-27  |  745 b   |  31 lines

  1. AUTOMATON*
  2.  
  3.   Forget_Me_Not
  4.  
  5.   A very simple Margolus neighbourhood two state automaton. This is a good
  6.   example of a reversible automaton which is self inverse; after running the
  7.   automaton for a few generations halt it, click on the phase option & then
  8.   continue - you will see the automaton run backwards!
  9.  
  10. INITIALISATION*
  11.  
  12.   10DEF PROCdo
  13.   20*SetEval wrap on
  14.   30*SetEval neig margolus
  15.   40ENDPROC
  16.  
  17. SCREEN*
  18.  
  19.   10DEF PROCdo
  20.   20DIM buf% 256:SYS "OS_ReadVarVal","sux",buf%,256:x%=!buf%/2
  21.   30SYS "OS_ReadVarVal","suy",buf%,256:y%=!buf%/2
  22.   40k%=RND(2*x%*.2):f%=((x%AND1ANDNOT(y%AND1))OR(y%AND1ANDNOT(x%AND1)))
  23.   50GCOL 63 TINT 255:RECTANGLE FILL -k%*4+f%*4,-k%*4,k%*8-2,k%*8-2
  24.   60ENDPROC
  25.  
  26. CODE*
  27.  
  28. ( READ_NEIG
  29.   CCW OPP EOR CW EOR == )
  30.  
  31. END*