Monday, December 19, 2011

The Demons of Cyclic Space Redux


When I started learning how to write programs in C I wrote several as described in the book “The Magic Machine” by A.K. Dewdney.  Chapter twelve is called “The Demons of Cyclic Space” and I’ve been intrigued by the cellular automata it described.  Over the years I’ve re-implemented the simulation on a variety of systems and languages.  Four years ago I posted a video saved from a run and really haven’t touched it since then.

The Demons of Cyclic Space

Last week the video received a comment about the video and a question about my implementation.  So I decided to brush off the code and see about cleaning it up for release.  It was written using MFC in a version of Visual Studio I don’t have anymore.  As it wouldn’t build with Visual Studio 2010 I decided to re-implement it in C++ and ATL.  The screen shot at the start is the first pass which shows the initial world state that is generated.  The next step is to add updating the simulation and display the new state.  Finally I want to update the program to output the simulation run as a video file.

Once the program runs I will publish the repository and some information about the code and what’s happening behind the scenes.  Also in the plan is to implement the rest of the programs described in the book and post videos of the simulation runs.