function bezier_curve(t, p0, p1, p2, p3, p4) = pow(1-t, 4) * p0 + 4 * pow(1-t, 3) * t * p1 + 6 * pow(1-t, 2) * pow(t, 2) * p2 + 4 * (1-t) * pow(t, 3) * p3 + pow(t, 4) * p4; function curved_polygon(points, steps, x_shift, y_shift) = let( left_curve = [for (t = [0 : 1/steps : 1]) bezier_curve(t, points[0], points[1], points[2], points[3], points[4]) ], right_curve = [for (pt = left_curve) [pt[0] + x_shift, pt[1] + y_shift] ] ) concat(left_curve, [for (i = [len(right_curve)-1 : -1 : 0]) right_curve[i]]); module base() { rotate_extrude() { polygon(curved_polygon( points = [ [-80, 30], [-50, 15], [-50, 0], [-50, -15], [-80, -30] ], steps = 100, x_shift = 50, y_shift = 0 )); } } base();