diff --git a/voussoir/triangles.scad b/voussoir/triangles.scad new file mode 100644 index 0000000..fe4e771 --- /dev/null +++ b/voussoir/triangles.scad @@ -0,0 +1,39 @@ +module right_triangle(width, height, center=false) +{ + if (center) + { + polygon([ + [-width/2, -height/2], + [width/2, -height/2], + [width/2, height/2] + ]); + } + else + { + polygon([ + [0, 0], + [width, 0], + [0, height] + ]); + } +} + +module isoscelese_triangle(width, height, center=false) +{ + if (center) + { + polygon([ + [-width/2, -height/2], + [0, height/2], + [width/2, -height/2] + ]); + } + else + { + polygon([ + [0, 0], + [width, 0], + [width/2, height] + ]); + } +}