This commit is contained in:
Adrian Mariano 2022-03-24 00:18:40 -04:00
parent b4b62f86dd
commit 00e26bfaed

View File

@ -14,18 +14,18 @@ module leaf(s) {
module branches(minsize, s1, s2){ module branches(minsize, s1, s2){
if(s2>minsize) { if(s2>minsize) {
attach(TOP) attach(TOP)
zrot(gaussian_rands(90,20)[0]) zrot(gaussian_rands(1,90,20)[0])
zrot_copies(n=floor(log_rands(2,5,4)[0])) zrot_copies(n=floor(log_rands(2,5,4)[0]))
zrot(gaussian_rands(1,0,5)) zrot(gaussian_rands(1,0,5))
yrot(gaussian_rands(1,30,10)) { yrot(gaussian_rands(1,30,10)) {
sc = gaussian_rands(0.7,0.05)[0]; sc = gaussian_rands(1,0.7,0.05)[0];
cylinder(d1=s2, d2=s2*sc, l=s1) cylinder(d1=s2, d2=s2*sc, l=s1)
branches(minsize, s1*sc, s2*sc); branches(minsize, s1*sc, s2*sc);
} }
} else { } else {
recolor("springgreen") recolor("springgreen")
attach(TOP) zrot(90) attach(TOP) zrot(90)
leaf(gaussian_rands(100,5)[0]); leaf(gaussian_rands(1,100,5)[0]);
} }
} }
@ -39,6 +39,7 @@ module tree(h, d, minsize) {
} }
} }
tree(d=300, h=1500, minsize=10); tree(d=300, h=1500, minsize=10);