Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Vladislav Perepelkin
hppca
Commits
aa143a7e
Commit
aa143a7e
authored
Nov 09, 2016
by
Vladislav Perepelkin
Browse files
minor fixes
parent
2589835e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
aa143a7e
...
...
@@ -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
...
...
system/config.c.example
View file @
aa143a7e
...
...
@@ -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);
}
}
system/rules.txt.example
View file @
aa143a7e
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment