3. Numerical solution for BC[1, n, m×n]
Consider the BC[1,n], can we extent the chart one more layer (second layer) with 2n circle, and these circles has the same radius? Consider in
Figure 8(a), it can be proved that when n=6, we can find the second ring, which has 12 circles, and circles in the first layer tangent to the circles in the second layer in a special way. Furthermore, all the circles have the same radii. Although we can find a silhouette circles for it, it is not the figure we are looking for because the circle in the first layer did not have circle ring around it. Now, consider the case that in
Figure 8(b), we want construct BC[1,6,2
6], the second layer has two different colors of circle, red and green. If these two circles has the same radii, there are two ways to compute the radius of the silhouette circle, one is connecting the line of the center circle to the center of red boundary circle, and find R′=1+2r
1,0+2r
2,0, where r
20 is the radius of red (and green) boundary circle. The other way to compute the radius of the silhouette circle is connecting the line of the center circle to the green boundary circle, and find R=f(1,r
1,0)+f(r
2,1,r
1,0)+r
2,1, where f(
,)=
. After calculation, we find R≠R′。This contradiction tells us that the radii for red and green boundary circles are different.
Now, we want to solve the BC[1,n,2
n] algebraically. We need to generate a system of equation, and solve the system of equation via some method such as Newton method. Consider
Figure 9, assume C
i(x
i,y
i,r
i) represents a circle C
i, with center (x
i, y
i) and radius r
i. The center unit circle is C
0, the circles on the first layer are C
1 and C
2, we can find all values for C
i(x
i,y
i,r
i), i=0,1,2 when we know the value of n. They are: C
0(0,0,1), C
1(1+r, 0, r), and C
2((1+r)cos(
), (1+r)sin(
)), where r =
and
=
Assume the circles in the second layers are C
3, C
4, C
5, then the variable (x
i, y
i, r
i), i=3,4,5 and the radius for the silhouette circle are the variables. Because the circles C
5 is symmetry to the circle C
3, with respect to the line passing (0,0) and center of C
4, we can find the (x
5,y
5, r
5) values from (x
3, y
3, r
3). So we have 7 variables x
4, y
4, r
4, x
5, y
5, r
5, R, where C(0,0,R) is the silhouette circle. We need to generate 7 equations to find the solution. To generate the system of equation, we need to consider the externally tangency properties, that is, the distance between two circles centers is equal to the sum of their radii. To reduce the number of equations and variables, we try to substitute a variable using other variables, so that the number of equations reduced.
In this case, the circle center can be found from the radius of the silhouette circle. So, (x3,y3)=(R-r3,0)=(1+2r1+r3,0) and (x4,y4)=((R-r4)cos(), (R-r4)sin()). So, x3 is a function with r3 as a variable, y3 is 0, x4, y4 are functions with variables R and r4. We can substitute these 4 variables using other variable in the system of equation, so we need 3 equations only. There are:
C
3 tangents to and contains in C: 1+2r
1+2r
3=R [
1]
C
4 tangents to C
3 explicitly: (x
4-x
3)
2+(y
4-y
3)
2=(r
4+r
3)
2 [
2]
C
4 tangents to C
1 explicitly: (x
4-x
1)
2+(y
4-y
1)
2=(r
4+r
3)
2 [
3]
After the substitution of the variable x3, y3, x4, y4, this system of equation becomes:
((R-r
3)cos(
)-(1+2r+r
3))
2+((R-r
3)sin(
))
2=(r
3+r
4)
2 [
5]
((R-r
3)cos(
)-(1+r))
2+((R-r
3)sin(
))
2=(r+r
4)
2 [
6]
We know r = and =, this system of equation has 3 variables R, r3, r4. These three equations are degree one, two, two, so it should have 4 solutions.
Now, we can solve this problem numerically using Newton method. However, we did not know what initial value we should guess, so that the solution (r3, r4, R) Newton method find is the real solution we want. The other thing worries us is the system of equation we generate when m>2 become more complex. We need to generate a system of equation for each m value, and the variable for circle center becomes hard to substitute. So we proposed another algorithm to solve this problem.
Before the explanation of the proposed algorithm, we define the SC(C), which is the sum of angle computation for a circle C with the circle ring surround it. Let’s consider three circles C
0, C, C
1 tangents to each other, and has radii r
0, r, r
1 respectively. We denote with angle(r
0, r, r
1) the cosine the angle α between two line segment, one connect the center of C
0 and C, and the other connect the center of C and C
1, as shown in
Figure 10. Notice that angle(r
0,r, r
1)=cos
-1(
) . This equation can be easily derived from the cosine rule.
Consider a circle ring tangent to one circle, as shown in
Figure 11(a), and r
i is the radius of C
i. We denote SA(C) is the sum of angle(r
0, r, r
1), angle(r
1, r, r
2), …..angle(r
n-1,r,r
0), which should equal to 2πif the circle ring tangent to the center circle properly. However, in some case, the radius of the center circle is not correct, SA(C) may less than 2π(See
Figure 11(b)), or greater than > 2π(See
Figure 11(c)).
Consider
Figure 12, it is easy to compute the center and radius for the circles in the first layer. The center and radius for the circles in the second layer, we need to know only half of the circles from C
1,0 to C
1,m, because of the symmetry properties among circles. After we find these circles, we compute SA(C
1,0), and adjust r
2,0, the radius of C
2,0, and r (the radius of the silhouette circle C). Repeat the above process by binary subdivision method, until SA(C
1,0)= 2π. The algorithm shows below:
Algorithm : for BC[1,n, mn], when m>1.
1. Given a fixed radius big enough (such as 2*r1,0) for r2,0. asum=0. eps=0.001
2. while |asum-2π|>eps:
2.1 Find C from n, r0, r1,0, r2,0.
2.2 For i from 1 to : Find one circle C2,i which tangents to C1,0, C2,i-1 and C.
2.3. Calculate asum = SA (C1,0).
2.4. if asum>2π+eps, reduce r2,0.
2.5. if asum<2π-eps, enlarge r2,0.
3. We find the C2,0, C2,1, …., C2,m, R. Display the result.
There are more details we need to know when we implement the above algorithm. In step 1, the radius we select must big enough, so that the SA(C
1,0)> 2π in the first iteration. In step 2.2, we need to find one circle tangent to 3 circles, it is the Apollonius problem [
17]. We know there are 8 circles tangent to 3 circles in general, which one is the one we select?
The method we use try to solve the Apollonius problem [
17] with the idea of cycles (oriented circle)[
18]. The idea is to consider 3D points (x,y,r) to represent a oriented circle (also call it cycles) which center at (x,y) with radius |r|。When r>0, this 3D point represents the circle oriented counter-clockwise. When r<0, this 3D point represents the circle oriented clockwise. When r=0, this 3D point represents a point in 2D. Consider a right circular cone whose vertex is at this 3D point with the properties that its height equal to |r|, any two points on this cone has the properties that these two 3D points, represent two cycles in 2D, tangents properly to each other. The ‘tangent properly’ means this two cycles not only tangent to each other, but has the same tangent direction at the tangent point. In
Figure 13, the C
2,0 and C
1,0 tangent to each but not tangent properly because the tangent point for this two circle has different direction. Now, Apollonius problem in 2D becomes the problem that finding the intersection points of 3 right circular cone in 3D. We generate three equations for these 3 circular cone, there are two solutions for this system of equations after we simplify the system of equation. So, with oriented circle, we reduce the solution of circles from 8 to 2 and these two cycles tangents to 3 cycles properly.
In out algorithm, we need one circle only. Which one of these two circles we want? Consider Figure12(b), there is a vector from the center of C
1,0 to C
2,0, we find two circles tangent to C
1,0, C
2,0 and C. These two circles are on the opposite side of this vector. One is the C
2,1, which is on the left side of this vector, show in
Figure 12(b), the other one is on the right side of this vector (show in
Figure 13). The circle we want is always is on the left side of vector from C
1,0, to C
2,i. Note that in the very beginning, C
1,0 and C
2,0 oriented clockwise and C oriented counter-clock, as shown in
Figure 13, so we find C
2,1 which is oriented counter-clockwise. At this point, we need to change the oriented of C
2,1 from counter-clockwise to clockwise (change the value r
2,1 from positive to negative), and try to find C
2,2 using C
1,0, C
2,1 and R.
Example: Consider the case that n=7, m=2,3,4,5,6,7, r
1,0 =0.76642, and r
2,j , j=0,1..m-1, are shown in
Table 2. Its associated chart is shown in
Figure 14(a)-(f).