# Questions tagged [packing]

Questions about specific or optimal placement of objects in a shape or volume. For questions about packed arrays, use the [packed-arrays] tag.

31 questions
Filter by
Sorted by
Tagged with
26k views

### How to create word clouds?

Word clouds are rather useless fancy and visually appealing plots, where words are plotted with different sizes according to their frequency in a corpus. Many applications exist out there (Wordle, ...
• 47.1k
14k views

### Generating visually pleasing circle packs

EDIT: (my conclusion and thank you note) I want to thank you all guys for this unexpected intellectual and artistic journey. Hope you had fun and enjoyed it the same as I did. I would like to ...
• 3,660
9k views

### Efficient way to generate random points with a predefined lower bound on their pairwise Euclidean distance

Using Mathematica what is an efficient way to generate a list of $n$ random two dimensional points $\{x_i,y_i\}$ where $i=1,...,n$ so that no two points $p_1$ and $p_2$ in the list has an Euclidean ...
• 14.8k
3k views

### Tiling a square

I wondered if there was a way to automate the process of finding a way to tile a tile into a square. The idea is to represent the tile with a matrix of $0$s for blank space and $1$s for filled spaces ...
4k views

### How can I pack circles of different sizes into a spiral?

Given a list of circles of different areas, I need to arrange them tangentially in order of increasing area and spiraling outward. An example of the type of packing I'm attempting is shown by the ...
• 31.6k
2k views

### Generating Doyle spiral painting

I recently came across an interesting paining by Nicola Sutcliffe: This painting is actually related to Doyle spirals. From author's website: The central part of the picture shows the Doyle ...
• 3,660
2k views

### Implementing a Beeswarm plot in Mathematica

I am looking for a Beeswarm plot implementation in Mathematica. Consider the following data: ...
• 1,867
686 views

### Packed Graph or GraphPlot output with non-square layout?

Graph or GraphPlot produce square layouts for disconnected graphs: Graph[Table[i -> Mod[i^3, 100], {i, 1, 100}]] I´d like to get a rectangular layout with e.g....
• 15.4k
998 views

### Efficiently filling area with disks located at certain points

Starting from a set of points, I want to fill an area using disks. Each disk's center should be one of the points and the disks should not overlap. I've managed to write a function that, given a list ...
• 4,024
2k views

### How to generate nonperiodic tilings?

I need to generate nonperiodic tilings which are similar to the attached figure (kite-domino tiling). I was thinking the code is similar to the code for the Penrose tiling. However, that code is too ...
• 141
510 views

### Rectangle packing, fixed sizes

I have rectangles of a given size to fit into a larger rectangle of a fixed size, with a specified gap between the packed rectangles. I would like to write some code that optimises the number of ...
• 8,738
8k views

### Randomly packing spheres of fixed radius within a cube

How can I have Mathematica randomly place spheres in a cube so they won't overlap? The cube is $20 \times 20 \times 20$, and the spheres have a radius of $0.7$.
• 161
2k views

### Distribution of 10 points within a unit square

Related to some packing problems, following problem arose: Distribute 10 points within a square of sides 1, so that minimal distance between them is maximized. With the help of random simulation, or ...
• 3,660
228 views

### Furthest point from nearby objects, packing a sphere on a region interior

Suppose I have a boundary $\partial\Omega$ of a region $\Omega\subset \mathbb{R}^3$ and within this are some compact objects $B_i\subset\Omega$. They could be points, lines, polygons, complex 3D ...
• 25.5k
417 views

### Embedding non-orthogonal vectors in a vector space

Consider unit vectors $|v_i \rangle$ on an $n$ dimensional vector space, which obey the following relation: \langle v_i|v_i \rangle =1 \quad \& \quad |\langle v_i|v_j \rangle| \leq \epsilon, \...
804 views

1 vote
194 views

### Octahedra+tetrahedra filling tessellations in 3D

This is called the quasiregular space-filling tessellations in 3D: formed by Octahedra in RED and tetrahedra in YELLOW Are there any smart ways to do a Mathematica figure drawing this?
• 923
1 vote
491 views

### Draw a truncated octahedron packing in 3D

Consider a truncated octahedron composed by 24 vertices (4×6) 14 faces (contain 6 squares and 8 hexagons) 36 edges (4×6+6×82=36). This truncated octahedron can pack and tessellate the 3-dimensional-...
• 923
1 vote
121 views

### Reap unpacks packed arrays

I noticed that Reap unpacks packed arrays. I've looked at previous answers but am still an unsure whether this a serious issue. E.g. consider Ex 47.3 from EIWL: ...
• 2,850
155 views

### Sphere packing with target volume fraction

I've stumbled upon this sphere packing question, and now I have another related one. How can I have a function that returns a sphere packing with a target volume fraction? Sphere can obviously have ...
• 515