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:
- to
CellAuto.js
for the idea of this project - to Prof. Bjarne Stroustrup for his invaluable instructions.
- to TAs Kai-Zhan Lee and Abhishek Shah for their suggestions.
Documentations:
- Refer to CellAutoCpp Tutorial.pdf for instructions on how to use this library.
- Refer to CellAutoCpp Documentation.pdf for detailed description on each of the APIs.
- Refer to CellAutoCpp Report.pdf for report of this project.
How to use:
- Download all
.cpp
and.h
file from Source - Include header
CellAutoCpp.h
for no visualization version. Compile with-std=c++14
flag and link with-lpthread
option. - 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:
- Empty Cave 2. Cave 3.Forest Fire
- Lava 5. Splash 6.Cyclic
- Fractal 8. Game Of Life 9.Maze
- Ising(negative M field) 11. Ising(positive M field)