mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-01 04:20:27 +02:00
add plant
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use <experimental/lsystem3.scad>;
|
||||
use <hull_polyline3d.scad>;
|
||||
|
||||
for(line = vine()) {
|
||||
for(line = plant()) {
|
||||
hull_polyline3d(
|
||||
[line[0], line[1]],
|
||||
thickness = 0.25,
|
||||
@@ -18,6 +18,17 @@ function tree(n = 4, angle = 22.5, leng = 1, heading = 0, start = [0, 0, 0]) =
|
||||
)
|
||||
lsystem3(axiom, rules, n, angle, leng, heading, start);
|
||||
|
||||
function plant(n = 4, angle = 30, leng = 1, heading = 0, start = [0, 0, 0]) =
|
||||
let(
|
||||
axiom = "A",
|
||||
rules = [
|
||||
["A", "B[+A]\\\\\\\\[+A]\\\\\\\\[+A]\\\\\\\\BA"],
|
||||
["B", "BB"],
|
||||
["B", "A/B"]
|
||||
]
|
||||
)
|
||||
lsystem3(axiom, rules, n, angle, leng, heading, start, forward_chars = "AB", rules_pr = [1, .5, 1]);
|
||||
|
||||
function hilbert_curve(n = 3, angle = 90, leng = 1, heading = 0, start = [0, 0, 0]) =
|
||||
let(
|
||||
axiom = "A",
|
||||
|
Reference in New Issue
Block a user