Skip to content

Tag: scad

three-circle venn diagram coin

$fn=100;

HEIGHT = 5;

CENTER_DISTANCE = 10;
OUTER_RADIUS = 40;
INNER_RADIUS = 30;

module inner_circle(position) {
  rotate([0,0,(360/3)*position])
    translate([CENTER_DISTANCE,0,0])
      cylinder(d=INNER_RADIUS, h=HEIGHT, center=true);
}

module logo() {
  difference() {
    cylinder(d=OUTER_RADIUS, h=HEIGHT-0.01, center=true);
    
    union() {
      intersection() {
        inner_circle(0);
        inner_circle(1);  
      }

    intersection() {
      inner_circle(1);
      inner_circle(2);  
    }

    intersection() {
      inner_circle(0);
      inner_circle(2);  
      }
    }
  }
  
  // piece in the middle
  intersection() {
    inner_circle(0);
    inner_circle(1);
    inner_circle(2);    
  }
}

logo();