rbush

High-performance 2D spatial index for rectangles (based on R*-tree with bulk loading and bulk insertion algorithms)

bin-pack

A packing algorithm for 2D bin packing. Largely based on code and a blog post by Jake Gordon.