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:
22
src/experimental/polar_zonohedra.scad
Normal file
22
src/experimental/polar_zonohedra.scad
Normal 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);
|
||||
}
|
Reference in New Issue
Block a user