diff --git a/regular_shapes.scad b/regular_shapes.scad index acba0bc0..90147b9b 100644 --- a/regular_shapes.scad +++ b/regular_shapes.scad @@ -87,6 +87,21 @@ module ellipse(width, height) { scale([1, height/width, 1]) circle(r=width/2); } +module pointed_ellipse(width, length, height) { + width_ratio = (width/2)/width; + original_length = (width*2) * sqrt(3); + length_ratio = length/original_length; + + translate([-(width/2),0,0]) + scale([width_ratio,length_ratio,1]) { + intersection() { + cylinder(r=width*2,h=height,center=true); + translate([width*2,0,0]) + cylinder(r=width*2,h=height,center=true); + } + } +} + // The ratio of lenght and width is about 1.39 for a real egg module egg_outline(width, length){ translate([0, width/2, 0]) union(){