mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-17 14:18:13 +01:00
return spiral r
This commit is contained in:
parent
623878b75e
commit
243c3eb659
@ -77,7 +77,7 @@ function try_create_spiral(size, spirals, i, min_radius) =
|
|||||||
spiral_angle(spiral) <= 270 ? undef :
|
spiral_angle(spiral) <= 270 ? undef :
|
||||||
let(
|
let(
|
||||||
r = spiral_r(spiral),
|
r = spiral_r(spiral),
|
||||||
cr = r * rands(0.5, 1.75, 1)[0]
|
cr = r * rands(0.5, 1.5, 1)[0]
|
||||||
)
|
)
|
||||||
cr < min_radius ? undef :
|
cr < min_radius ? undef :
|
||||||
let(
|
let(
|
||||||
|
@ -9,7 +9,7 @@ function foliage_scroll(size, max_spirals, init_radius, min_radius, angle_step =
|
|||||||
)
|
)
|
||||||
[
|
[
|
||||||
for(spiral = _foliage_scroll(size, init_spirals, max_spirals, min_radius, angle_step, done))
|
for(spiral = _foliage_scroll(size, init_spirals, max_spirals, min_radius, angle_step, done))
|
||||||
spiral_path(spiral)
|
[spiral_r(spiral), spiral_path(spiral)]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
@ -22,7 +22,11 @@ angle_step = 10;
|
|||||||
min_radius = 10;
|
min_radius = 10;
|
||||||
init_radius = rands(min_radius * 2, min_radius * 4, 1)[0];
|
init_radius = rands(min_radius * 2, min_radius * 4, 1)[0];
|
||||||
|
|
||||||
for(spiral = foliage_scroll([width, height], max_spirals, init_radius, min_radius)) {
|
spirals = foliage_scroll([width, height], max_spirals, init_radius, min_radius);
|
||||||
polyline_join(spiral)
|
|
||||||
circle(min_radius / 5);
|
for(spiral = spirals) {
|
||||||
|
r = spiral[0];
|
||||||
|
path = spiral[1];
|
||||||
|
polyline_join(path)
|
||||||
|
circle(r / 5);
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user