Any polygon can be decomposed into a finite (though possibly large) number of polygons that can be rearranged through rotations and translations to form another polygon of equal area. This is known as equidecomposition.
The first step in one well-known algorithm for accomplishing this involves decomposing a triangle into a square.
In order to decompose a triangle into another triangle of equal area, it is necessary to intersect collections of polygons contained in a square common to both triangles.
See d3-equidecompose.
https://d3js.org/d3-polygon.v0.2.min.js
https://d3js.org/d3.v3.min.js