An open API service indexing awesome lists of open source software.

https://github.com/tomazas/convex-rect-pack

Heuristic 2D rectangle packing algorithm
https://github.com/tomazas/convex-rect-pack

box-packing concave convex heuristic java packing processing rectangle

Last synced: 11 months ago
JSON representation

Heuristic 2D rectangle packing algorithm

Awesome Lists containing this project

README

          

### 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](/docs/paper.pdf))

### 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](/img/pic1.png "Packing inside a triangle container")

Packing inside custom shape #1

![Alt text](/img/pic2.png "Packing inside custom shape 1")

Packing inside custom shape #2

![Alt text](/img/pic3.png "Packing inside custom shape 2")