Wolfram Language
Paclet Repository
Community-contributed installable additions to the Wolfram Language
Primary Navigation
Categories
Cloud & Deployment
Core Language & Structure
Data Manipulation & Analysis
Engineering Data & Computation
External Interfaces & Connections
Financial Data & Computation
Geographic Data & Computation
Geometry
Graphs & Networks
Higher Mathematical Computation
Images
Knowledge Representation & Natural Language
Machine Learning
Notebook Documents & Presentation
Scientific and Medical Data & Computation
Social, Cultural & Linguistic Data
Strings & Text
Symbolic & Numeric Computation
System Operation & Setup
Time-Related Computation
User Interface Construction
Visualization & Graphics
Random Paclet
Alphabetical List
Using Paclets
Create a Paclet
Get Started
Download Definition Notebook
Learn More about
Wolfram Language
RectanglePacking
Guides
Rectangle Packing
Symbols
PackRectangles
RectanglePacker
JasonB`RectanglePacking`
P
a
c
k
R
e
c
t
a
n
g
l
e
s
P
a
c
k
R
e
c
t
a
n
g
l
e
s
[
b
o
u
n
d
i
n
g
b
o
x
,
{
r
e
c
t
1
,
r
e
c
t
2
,
.
.
}
]
p
a
c
k
s
t
h
e
g
i
v
e
n
r
e
c
t
a
n
g
l
e
s
i
n
t
h
e
g
i
v
e
n
b
o
u
n
d
i
n
g
b
o
x
.
P
a
c
k
R
e
c
t
a
n
g
l
e
s
[
b
o
u
n
d
i
n
g
b
o
x
,
r
e
c
t
a
n
g
l
e
s
,
m
e
t
h
o
d
]
u
s
e
s
t
h
e
g
i
v
e
n
m
e
t
h
o
d
t
o
p
a
c
k
r
e
c
t
a
n
g
l
e
s
.
D
e
t
a
i
l
s
a
n
d
O
p
t
i
o
n
s
Examples
(
2
)
Basic Examples
(
1
)
Pack a sequence of squares into a larger square:
I
n
[
1
]
:
=
P
a
c
k
R
e
c
t
a
n
g
l
e
s
[
{
1
0
0
,
1
0
0
}
,
T
a
b
l
e
[
{
n
,
n
}
,
{
n
,
3
0
}
]
]
O
u
t
[
1
]
=
{
{
{
1
3
,
9
9
}
,
{
1
4
,
1
0
0
}
}
,
{
{
2
5
,
9
8
}
,
{
2
7
,
1
0
0
}
}
,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