/CellAutoCpp

Cellular Automata Library implemented in C++

Primary LanguageHTML

CellAutoCpp

Cellular Automata Library implemented in C++
(a course project done in class C++ design, offered by Columbia University Spring 2018)

Authors:
Haomin Long
Tongfei Guo
Xiaotian Hu

Acknowledgements:

  1. to CellAuto.js for the idea of this project
  2. to Prof. Bjarne Stroustrup for his invaluable instructions.
  3. to TAs Kai-Zhan Lee and Abhishek Shah for their suggestions.

Documentations:

  1. Refer to CellAutoCpp Tutorial.pdf for instructions on how to use this library.
  2. Refer to CellAutoCpp Documentation.pdf for detailed description on each of the APIs.
  3. Refer to CellAutoCpp Report.pdf for report of this project.

How to use:

  1. Download all .cpp and .h file from Source
  2. Include header CellAutoCpp.h for no visualization version. Compile with -std=c++14 flag and link with -lpthread option.
  3. To include visualization, use make file provided in visualization and modify line 24 "_SRC = source-file" accordingly, and put your source code in render/ folder. (or write make file on your own accordingly)

Simple Visualization in Console:

Our library provides a way of visualization in console. Cellular Automata is displayed at certain frequency by mapping cells with specific states to corresponding ASCII characters. To use it, include CAConsoleViz.h in your project as well.

In "ConsoleViz_demo" folder, we provide some example codes of visualization, together with a makefile. Use make release or make debug to compile these files and use make clean to erase the generated object files and executables. All executables are stored under the folder of exe/.

How to visualize: Our library provides visualization. It is implemented with OpenGL version 3.3. To use the visualization, please make sure the glfw3 is deployed as shared library in your computer. To install it, type in:

sudo apt-get install libglfw3-dev

In "visualization" folder, we provide some example codes of visualization, together with a makefile. Use make release or make debug to compile these files and use make clean to erase the generated object files and executables. All executables are stored under the folder of exe/.

NOTE : Please make sure the file for vertex shader instancing.fs and fragment shader instancing.vs exist in the same path of the binary.****

Some of the animated plotting:

  1. Empty Cave                                                       2. Cave                                                                   3.Forest Fire

emptycave                                           cave                                           forestfire

  1. Lava                                                                   5. Splash                                                                   6.Cyclic

emptycave                                           splash                                           cyclic

  1. Fractal                                                             8. Game Of Life                                                       9.Maze

fractal                                           gameoflife                                           maze

  1. Ising(negative M field)                                   11. Ising(positive M field)                                                      

negising                                           posising