generating trapezoids