Skip to content

Commit 7abc9fd

Browse files
committed
add more debug statements
1 parent c115eff commit 7abc9fd

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

flow_field/flow_field.pde

+14-11
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ int column_index, row_index;
1010
float grid_angle, x_step, y_step;
1111
float position_noise;
1212

13-
int _octave = round(random(8, 24));
14-
float step_length = random(1, 4);
13+
float step_length = 1;
14+
15+
int _octave = round(random(4, 6));
16+
float falloff = random(0.75, 0.8);
1517
int num_steps = round(random(100, 200));
16-
float falloff = random(0.5, 0.9);
17-
int num_lines = 100;
18+
int num_lines = round(random(400, 800));
1819

1920
void setup() {
2021
// width, height in pixels
@@ -25,14 +26,16 @@ void setup() {
2526
stroke(0, 0, 0);
2627
noFill();
2728

28-
println(num_steps);
29-
println(falloff);
29+
println("octave: " + _octave);
30+
println("falloff: " + falloff);
31+
println("num_steps: " + num_steps);
32+
println("num_lines: " + num_lines);
3033

3134
// make grid larger than paper so lines can flow off
32-
left_x = int(width * -2);
33-
right_x = int(width * 2);
34-
top_y = int(height * -2);
35-
bottom_y = int(height * 2);
35+
left_x = int(width * -4);
36+
right_x = int(width * 4);
37+
top_y = int(height * -4);
38+
bottom_y = int(height * 4);
3639
resolution = int(width * 0.01);
3740
num_columns = (right_x - left_x) / resolution;
3841
num_rows = (bottom_y - top_y) / resolution;
@@ -80,7 +83,7 @@ void keyPressed() {
8083
num_steps = num_steps + 10;
8184
} else if (keyCode == DOWN) {
8285
num_steps = num_steps -10;
83-
}
86+
}
8487
}
8588
}
8689

0 commit comments

Comments
 (0)