Commit aa143a7e authored by Vladislav Perepelkin's avatar Vladislav Perepelkin
Browse files

minor fixes

parent 2589835e
......@@ -3,6 +3,10 @@ videos: run
make -B rest/rest.avi >/dev/null
make -B move/move.avi >/dev/null
init:
make rules.txt
make config.c
run: hpprp FORCE
./hpprp
......@@ -30,7 +34,7 @@ move/move.avi:
clean:
rm -f density/* rest/* move/* hpprp collide.c
clean_all:
purge:
make clean
rm -f config.c rules.txt
......
......@@ -10,21 +10,26 @@
#define AVERAGING_RADIUS 1
#define ENSEMBLE_SIZE 2
// Fill part of field
void fill(int row, int col, int height, int width,
double prob_m1, double prob_m2, double prob_m4, double prob_m8,
double prob_rp16, double prob_rp32, double prob_rp64, double prob_rp128);
// Field initialization
void init()
{
fill(0, 0, HEIGHT, WIDTH, // area
0.7, 0.7, 0.7, 0.7, // move
0.25, 0.0, 0.0, 0.0); // rest
fill(0, 0, HEIGHT, WIDTH, // area: row, col, height, width
0.7, 0.7, 0.7, 0.7, // move probabilities: 1, 2, 4, 8
0.25, 0.0, 0.0, 0.0); // rest probabilities: 16, 32, 64, 128
}
// Sources rules
void sources(int iter)
{
if (iter==0) {
fill(0, WIDTH/2-10, HEIGHT, WIDTH/2+10, // area
1.0, 1.0, 1.0, 1.0, // move
0.75, 0.0, 0.0, 0.0); // rest
fill(0, WIDTH/2-10, HEIGHT, WIDTH/2+10,
1.0, 1.0, 1.0, 1.0,
0.75, 0.0, 0.0, 0.0);
}
}
......@@ -8,20 +8,20 @@
15 0.33333 0.33333 0.33334
21 0.33333 0.33333 0.33334
26 0.33333 0.33333 0.33334
7 18
7 0.9 0.1
18 0.1 0.9
11 17
11 0.1 0.9
17 0.9 0.1
13 24
13 0.9 0.1
24 0.1 0.9
14 20
14 0.1 0.9
20 0.9 0.1
7 18
7 0.9 0.1
18 0.1 0.9
11 17
11 0.1 0.9
17 0.9 0.1
13 24
13 0.9 0.1
24 0.1 0.9
14 20
14 0.1 0.9
20 0.9 0.1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment