Skip to content

Instantly share code, notes, and snippets.

@auxiliary-character
Last active January 2, 2021 04:03
Show Gist options
  • Save auxiliary-character/d27e37c55c5d92a5e5458b8efb712667 to your computer and use it in GitHub Desktop.
Save auxiliary-character/d27e37c55c5d92a5e5458b8efb712667 to your computer and use it in GitHub Desktop.
$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);
}
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment