# Apollonian Packing of Circles within Ellipses
## 2 Materials and Methods
### Apollonian Circle Packing within an Ellipse
#### 2.2.2 Scaffolding of the Elliptic Domain  
As in the case of a circular Apollonian packing, Apollonian packing within a non-circular plane domain is completely determined by defining the outer boundary and an initial scaffolding configuration of circles. Given the outer boundary and the initial scaffolding configuration, all subsequent circles in the packing sequence determined by the algorithm are univocally defined. Thus, each new circle of the packing sequence to be found must be in a Descartes-like configuration, i.e., it must be either externally tangent to three preceding circles or externally tangent to two circles and internally tangent to the outer boundary of the plane domain. For this reason, we can define, as a scaffolding configuration for an Apollonian circle packing within a plane domain \(\mathcal{D}\), any configuration of circles that has the following characteristics:  
* The scaffolding circles are internal to \(\mathcal{D}\).
* The difference between domain \(\mathcal{D}\) and the scaffolding circles must be composed by a finite number of arbelos or deltoid-like [21; 22] curvilinear triangles formed by arcs of the scaffolding circles or of the outer boundary, tangent in the vertexes.  
The effectiveness of the proposed algorithm is independent from the choice of the scaffolding configuration to which it is applied, even in the case of non-symmetric initial configurations; thus, the choice of the scaffolding configuration within a given ellipse is not univocal, with each configuration giving rise to a different circle packing within the same ellipse. Since the determination of the circle filling in a deltoid-like curvilinear triangle may be obtained by means of the Descartes formula, attention must be paid to the filling of the arbelos-like curvilinear triangles. For illustrative purposes, we will focus on scaffolding structures for an Apollonian circle packing within an elliptic domain \(\mathcal{E}\), having major axis \(2a\) and minor axis \(2b\) (\(a,b\in\mathbb{R}\), \(a\geq b\)), which are symmetric with respect to the ellipse axes and composed by the following \(2N-1\) (\(N\in\mathbb{N}\), \(N>0\)) circles:  
* A larger circle \(\mathcal{C}_{0}\), having radius \(r_{0}=b\), centered on the ellipse symmetry center.
* If \(N>1\), two sequences of \(N-1\) non-intersecting, consecutively tangent circles \(\mathcal{C}_{i,1},...,\mathcal{C}_{i,N-1}\) (\(i=1,2\); \(N\in\mathbb{N}\), \(N\geq 1\)), tangent to boundary ellipse \(\mathcal{E}\), whose centers \(C_{i,n}\) are external to \(\mathcal{C}_{0}\) and are placed on the major axis of the ellipse, with each one of circles \(\mathcal{C}_{i,1}\) being externally tangent to \(\mathcal{C}_{0}\).  
Two examples of typical scaffolding layouts for \(N=2,3,5\) in the cases of \(a/b=5/4\), \(a/b=2\) and \(a/b=5\) are shown in Figures 1 and 2.  
By exploiting the symmetry properties of the scaffolding, it is possible to achieve the complete packing of elliptic domain \(\mathcal{E}\) by filling plane region \(\mathcal{T}_{1}\) inside curvilinear triangle \(A_{1}B_{1}C_{0}\) and outside scaffolding circles \(\mathcal{C}_{1,n}\), as shown in Figures 1 and 2, and by generating 4 replicas of the \(\mathcal{T}_{1}\) packing by symmetry with respect to the ellipse axes.  
Figure 1: Scaffoldings for ellipses with \(a/b=5/4\) (**a**) and \(a/b=2\) (**b**).  
Figure 2: Scaffoldings for ellipses with \(a/b=\sqrt{11}\) (**a**) and \(a/b=5\) (**b**).