1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-19 13:01:37 +02:00

add polar_zonohedra

This commit is contained in:
Justin Lin
2021-12-01 17:36:44 +08:00
parent 0490da4b91
commit c6a661e074

View File

@@ -0,0 +1,22 @@
use <ptf/ptf_rotate.scad>;
use <sweep.scad>;
module polar_zonohedra(n){
spiral = [
for(r=[0:n])
let(p = ptf_rotate([10, 0, PI * 10 * r / n], [0, 0, -360 * r / n]) - [10, 0, 0])
[p[0], p[1], p[2] * 1.75]
];
sections = [
for(i=[0:n])
[for(p = spiral) ptf_rotate(p, [0, 0, 360 * i / n])]
];
sweep(sections);
}
for(n = [4:8]) {
translate([50 * (n - 4), 0, 0])
polar_zonohedra(n);
}