mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-03-14 02:59:42 +01:00
add spring
This commit is contained in:
parent
9cf9fd5713
commit
04f39c0514
@ -1,7 +1,7 @@
|
||||
use <experimental/lsystem3.scad>;
|
||||
use <hull_polyline3d.scad>;
|
||||
|
||||
for(line = vine()) {
|
||||
for(line = spring()) {
|
||||
hull_polyline3d(
|
||||
[line[0], line[1]],
|
||||
thickness = 0.25,
|
||||
@ -48,4 +48,13 @@ function vine(n = 3, angle = 18, leng = 1, heading = 0, start = [0, 0, 0]) =
|
||||
["F", "/F[++F]-\F[--F]+//F"]
|
||||
]
|
||||
)
|
||||
lsystem3(axiom, rules, n, angle, leng, heading, start);
|
||||
|
||||
function spring(n = 8, angle = 12, leng = 1, heading = 0, start = [0, 0, 0]) =
|
||||
let(
|
||||
axiom = "F",
|
||||
rules = [
|
||||
["F", "F-^F"]
|
||||
]
|
||||
)
|
||||
lsystem3(axiom, rules, n, angle, leng, heading, start);
|
Loading…
x
Reference in New Issue
Block a user