Packing algorithm

This javascript routine executes a packing of rectangles in a rectangle container (panel). An inner margin can be added that separates the rectangles from each other.

panel options

Panel x
Scale    Margin


rectangles options

     WidthHeightQuantity