triangle_refine, a MATLAB code which refines a triangle into c^2 smaller copies of itself, and implements a simple centroid-based quadrature scheme.
The information on this web page is distributed under the MIT license.
triangle_refine is available in a Matlab version and an Octave version.