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

added example files

parent fd29103c
......@@ -12,6 +12,12 @@ hpprp: hpprp.c config.c collide.c
collide.c: rules.txt scripts/rules_gen.py
python scripts/rules_gen.py rules.txt collide.c
rules.txt: rules.txt.example
if [ -f rules.txt ] ; then echo "rules.txt exists, not overriding" ; touch rules.txt ; else echo "rules.txt does not exist, create from rules.txt.example" ; cp rules.txt.example rules.txt ; fi
config.c: config.c.example
if [ -f config.c ] ; then echo "config.c exists, not overriding" ; touch config.c ; else echo "config.c does not exist, create from config.c.example" ; cp config.c.example config.c ; fi
density/density.avi:
scripts/image_gen.sh density density/density.avi
......
// USER CONFIGURATION FILE
#define THREADS 4
// Main properties
#define WIDTH 1000
#define HEIGHT 1000
#define ITERS 1000
#define SAVE_PERIOD 25
#define AVERAGING_RADIUS 5
// 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
}
// Sources rules
void sources(int iter)
{
if (iter==0) {
fill(0, WIDTH/2-5, HEIGHT, WIDTH/2+5, // area
1.0, 1.0, 1.0, 1.0, // move
0.75, 0.0, 0.0, 0.0); // rest
}
}
5 10 16
5 0.33333 0.33333 0.33334
10 0.33333 0.33333 0.33334
16 0.33333 0.33333 0.33334
15 21 26
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.1 0.9
18 0.9 0.1
11 17
11 0.9 0.1
17 0.1 0.9
13 24
13 0.1 0.9
24 0.9 0.1
14 20
14 0.9 0.1
20 0.1 0.9
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