Skip to content

OverworkedCriminal/Cellular-automaton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

247 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cellular-automaton

Application that simulates sand, water and smoke movement on a grid.

Cellular-automaton.mp4
Control effect
mouse left button paint
mouse scroll up increase brush size
mouse scroll down decrease brush size
1 Select empty
2 Select sand
3 Select water
4 Select smoke

How to build

Before running this application it's necessary to build it. First create build directory and move there.

mkdir ./build
cd ./build/

Then generate necessary build system files.

cmake ..

And finally build application

cmake --build .

How to run

This is message generated by:

./build/cellular-automaton --help
cellular-automaton -w <width> -h <height>

ARGS:
        --cpu [coreCount] run simulation on CPU (default). Default coreCount is 1
        --gpu             run simulation on GPU
        -w, --width       simulation width
        -h, --height      simulation height
        --window-width    simulation width
        --window-height   simulation height
        --help            display this message

Application requires user to specify simulation dimensions (-w and -h). This runs application on single CPU core

./build/cellular-automaton -w 100 -h 100

You can specify number of cores used (--cpu <number of cores>)

./build/cellular-automaton -w 100 -h 100 --cpu 4

You can also run simulation on GPU (--gpu)

./build/cellular-automaton -w 100 -h 100 --gpu

About

Sand/water/smoke simulation on a grid

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors