# Circle-packing Shapes

**URL:** <https://discourse.processing.org/t/circle-packing-shapes/30686>\
**Category:** Gallery\
**Created:** [June 13, 2021, 9:54pm UTC](https://discourse.processing.org/t/circle-packing-shapes/30686 "2021-06-13T21:54:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![micycle](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/micycle/32/201_2.png) [@micycle](https://discourse.processing.org/u/micycle)\
**Post date:** [June 13, 2021, 9:54pm UTC](https://discourse.processing.org/t/circle-packing-shapes/30686/1 "2021-06-13T21:54:46Z")

</div>

I’ve just released a new version of [Processing Geometry Suite](https://discourse.processing.org/t/processing-geometry-suite/29924). Amongst other things, this update includes 6 different approaches/algorithms to circle-pack shapes.

### Front Chain

 ![frontChain1](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/e/ef7f692859f164ecf49658023ebb11b3af6ba00f.png) ![frontChain2](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/6/604a3a4a1a3c84e4a838077dd9ca99bb50e685dd.png)

### Trinscribed

_(inscribed circles of triangulation triangles)_

 ![inscribed1](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/b/bef2654e91ea0979c22b9e992cafd7e89adc689e.png) ![inscribed2](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/b/b15f04565228ef73551de04453b0aad00edfaa83.png)

### Maximum Inscribed

 ![maxInscribed2](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/3/3c19756517a1e590903c135cdd9e7431ae40fd35.png) ![maxInscribed1](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/a/a55d1fa1715658c3aed7663c7c7caf6e502488dc.png)

### Stochastic

 ![pack1](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/a/a4dfa2cf205910c69bc5a64b3045d398084ea55c.png) ![pack2](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/f/f033e2eca9b3d8122a2b6223de904adfc12a97e1.png)

### Square Lattice

 ![squareLattice1](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/4/4406ee203d80360b046e6edce07fbacf469c6f4a.png) ![squareLattice2](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/f/f9c4111c21dccc0f6a6daf35af4c31e1fafa5129.png)

### Hex Lattice

 ![hexLattice1](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/6/6f7425ed7f66309f9d5086879b73935ed3492890.png) ![hexLattice2](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/3/3c3b4dda0c39a70a6db441e376fd36159414072d.png)

* * *

 ![circlePack-min](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/f/f745cac4be39cd668172ab5f6b5cfc29a8afd33d.png)

 ![circlepack2-min](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/2/2afee7ffe546017577fa0baa0f8ed16f723324e0.png)

---

<div class="post-metadata">

**Author:** ![micycle](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/micycle/32/201_2.png) [@micycle](https://discourse.processing.org/u/micycle)\
**Post date:** [July 13, 2022, 11:13am UTC](https://discourse.processing.org/t/circle-packing-shapes/30686/2 "2022-07-13T11:13:30Z")

</div>

I recently have [implemented](https://github.com/micycle1/PGS/blob/dev/src/main/java/micycle/pgs/commons/TangencyPack.java) another type of circle packing. This algorithm takes in a graph which specifies a desired pattern of circle tangencies and searches for an arrangement of circle positions and radii which satisfy that pattern.

It will be included in the next release of [Processing Geometry Suite](https://discourse.processing.org/t/processing-geometry-suite/29924).

![tangentPack](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/5/b/5b513abe195e2c77aaed6cec4886e1d9b9672731.gif)

These illustrations are from playing around with the complex numbers used to layout the circles…

![explode](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/e/5/e5a0cb4e40734db390e1f10b2a813677a194da15.gif)  
 ![vary](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/e/1/e1e15cce465523fabba39b882d2421718425a3da.gif)  
 ![acos](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/1/8/18dba1ac990c80c78ac11a23eded3b100d520f79.gif)  
 ![exp](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/8/e/8ec6c05afe83546fc1182ff2e1eeecfd597c6258.gif)
