A quadrilateral can be dissected into a rectangle by a line joining the mid-points of one pair of opposite sides, and the perpendiculars to this line from the mid-points of the other pair of opposite sides (see https://www.geogebra.org/student/m3459 ).
In this applet, the equilateral triangle is dissected into 4 pieces by the 3 lines.
Rotate the dissections, drag the red points to get a rectangle.
CLICK any black SEGMENT to show/hide its LENGTH.
Drag Q to investigate its position at which the rectangle becomes a square (the Dudeney's Puzzle).