Skip to content

tomazas/convex-rect-pack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project implements a heuristic 2D rectangle packing algorithm###

Used for: packing as much rectangles as possible in convex & concave containers

Based on ideas described in paper:

"A heuristic approach for packing rectangles in convex regions" by Andrea Cassioli, Marco Locatelli" (Paper)

Implementation details:

  • Coded with Processing.org IDE (Java)
  • Runs on Linux OS
  • Uses liblbfgs optimizer and Java liblbfgs wrapper
  • Best for packing x/y axis aligned elements
  • Supports 90 degrees element/rectangle rotation (horizontal & vertical)
  • Multi-iteration solving
  • Fixed size rectangles & any size container
  • Example container editor included for generating input data

Screenshots###

Packing inside triangle

Note: yellow color denotes elements fully inside the container

Alt text

Packing inside custom shape #1

Alt text

Packing inside custom shape #2

Alt text