Let’s make a video showing the sequential packing of a group of rectangles using the four main methods in the RectanglePacking package:
In[]:=
SeedRandom@1978;rects=RandomInteger[{6,24},{200,2}];methods=Take[$RectanglePackingMethods,4];packers=RectanglePacker[{300,150},#]&/@methods;frames=Block[{plots,getlabel},getlabel=StringTemplate["method: `1`, occupancy: `2`"];Table[plots=MapThread[(#1["Insert",rect];#1["Graphics",PlotLabel->getlabel[#2,#1["Occupancy"]],ImageSize->250,ColorFunction->"BrightBands"])&,{packers,methods}];GraphicsGrid[Partition[plots,2],Spacings->{-15,5},ImageSize->500],{rect,rects}]];
In[]:=
FrameListVideo[frames]
Out[]=