Last active
January 2, 2021 04:03
-
-
Save auxiliary-character/d27e37c55c5d92a5e5458b8efb712667 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$fn=200; | |
phi = (1+sqrt(5))/2; | |
radius = 50; | |
sphere_radius = 10; | |
height = 200; | |
count = 600; | |
function r(i) = radius/3*sin(i/count*360)+radius/2; | |
intersection(){ | |
union(){ | |
for(i=[1:count]){ | |
angle = i*360/phi; | |
translate([sin(angle)*r(i), cos(angle)*r(i), i*height/count]) | |
rotate(-angle) | |
rotate([0,90,0]) | |
sphere(sphere_radius, $fn=4); | |
translate([0,0,(i-1)*height/count]) | |
cylinder(h=height/count, r1=r(i-1), r2=r(i)); | |
} | |
cylinder(h=2, r=r(1)+sphere_radius/3); | |
} | |
cylinder(h=height, r=radius+sphere_radius); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment