tpacking.c: fix positioning in third dimension for triangular packing - granula… | |
git clone git://src.adamsgaard.dk/granular | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 99c38f2f6c2fd472b1056e8cf72e55a56358f573 | |
parent 1927846d99dbff890b20ba9d7d13c48cfcad2fdf | |
Author: Anders Damsgaard <[email protected]> | |
Date: Fri, 19 Mar 2021 18:31:30 +0100 | |
packing.c: fix positioning in third dimension for triangular packing | |
Diffstat: | |
M packing.c | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
--- | |
diff --git a/packing.c b/packing.c | |
t@@ -78,7 +78,7 @@ triangular_packing(struct grain *grains[], | |
if (j % 2 == 0) | |
(*grains)[np].pos[0] += 0.5 * … | |
(*grains)[np].pos[1] = j * dy + 0.5 * … | |
- (*grains)[np].pos[2] = j * dx + 0.5 * … | |
+ (*grains)[np].pos[2] = k * dx + 0.5 * … | |
for (l = 0; l < 2; l++) | |
(*grains)[np].pos[l] += | |
random_value_uniform(-… |