module view_cylinder(shift=100/3,height=200,thin=0.1) {
translate([0,0,-shift]) {
difference() {
linear_extrude(height=height,center=false) {
offset(r=thin/2) children(0);
}
linear_extrude(height=height,center=false) {
offset(r=-thin/2) children(0);
}
}
}
}
module clipped_angled_view_cylinder(angle=60,side=1,size=100,thin=0.1) {
shift=size/3;
height=size*2;
intersection() {
rotate([angle,0,0])
view_cylinder(shift,height,thin)
rotate([-angle,0,0]) children(0);
rotate([angle,0,0])
translate([0,-side*size/2,0])
cube([size,size,size],center=true);
}
}
module intersect_view_cylinders(angle=60,size=100,thin=0.1) {
union() {
intersection() {
clipped_angled_view_cylinder(angle,1,size,thin) children(0);
clipped_angled_view_cylinder(-angle,1,size,thin) children(1);
}
intersection() {
clipped_angled_view_cylinder(angle,-1,size,thin) children(0);
clipped_angled_view_cylinder(-angle,-1,size,thin) children(1);
}
}
};
module ambiguous_cylinder(angle=60,size=100,thin=0.1,thick=1,height=10) {
minkowski() {
intersect_view_cylinders(angle,size,thin) {
children(0);
children(1);
}
cylinder(r=thick/2,h=height*2,center=true);
}
}
module arrow(length=10) {
scale([length/10,length/10,length/10])
polygon([ [-5, 0], [-4.5, 1], [ 2, 1], [ 2.5, 3], [ 5, 0],
[ 2.5,-3], [ 2,-1], [-4.5,-1] ]);
}
module fat_arrow(length=10) {
scale([length/10,length/10,length/10])
polygon([ [-5, 0], [-4, 1.5], [-1, 1.5], [ 0.5, 4], [ 5, 0],
[ 0.5,-4], [-1,-1.5], [-4,-1.5] ]);
}
module arrow_always_right() {
ambiguous_cylinder() {
arrow(30);
rotate([0,0,180]) arrow(30);
}
}
module fat_arrow_always_right() {
ambiguous_cylinder() {
fat_arrow(30);
rotate([0,0,180]) fat_arrow(30);
}
}
module circle_diamond() {
ambiguous_cylinder() {
circle(d=14);
rotate([0,0,45]) square(size=10,center=true);
}
}
module topo_disturbing_cylinders() {
translate([0,-4.5,0])
ambiguous_cylinder() {
difference() {
circle(d=10);
translate([0,6,0]) circle(d=10);
}
circle(d=10);
}
translate([0,4.5,-2])
ambiguous_cylinder() {
difference() {
circle(d=10);
translate([0,-6,0]) circle(d=10);
}
circle(d=10);
}
cube([10,4,1],center=true);
}