Linux Magazine #6 2020 – Boom van Pythagoras van het artikel Fractals in OpenSCAD
- November 18, 2019
- 0
dikte=10;
orde=10;
boom(dikte,orde);
module boom(d,o) {
max_orde=13;
o = (o > max_orde) ? max_orde : o;
cube([d, d, d], center=true);
tak = d/sqrt(2);
if (o) {
translate([-d/2, 0, d/2])
rotate([0, -45, 0])
translate([tak/2, 0, tak/2])
boom(tak, o-1);
translate([d/2, 0, d/2])
rotate([0, 45, 0])
translate([-tak/2, 0, tak/2])
boom(tak, o-1);
}
}