Message Boards Message Boards

Pairwise tangent concentric circles of pairwise tangent circles

Posted 3 years ago

Here's a pretty image

circles

Recently a user published an image of their own physical artwork. It looked similar to this, but the spacing was crude -- they were asking exactly what spacing was necessary to make this pattern (it's easy to imagine getting the radii slightly wrong so that all triple tangencies are missed).

The circles grow by some scalar $k$, and have centers along a ring whos radius is also $k$ times larger than the next smallest ring. Thus it is sufficient to compute $k$ for the first and second ring; the $n$th ring is the first scaled by $k^n$ (rotated, too). We compute $k$ as follows:

Take three adjacent circles in the smallest ring, $C$, with centers at angles $-\frac{2\pi}n,0,\frac{2\pi}n$ from $(0,0)$. The next ring has two circles, $D$, nested among the smaller three, with centers at angles $\frac\pi n,-\frac\pi n$. The distance between the left circles' centers of $C$ and $D$ must be the sum of their radii. The radii of $C$ are $\sin\frac\pi n$ (an exercise for the reader). The radii of $D$ are in turn $k\sin\frac\pi n$. Here's a diagram

diagram

We impose $k\sin\frac\pi n=d\left((\cos\frac{2\pi}n,\sin\frac{2\pi}n),k(\cos\frac\pi n,\sin\frac\pi n)\right)-\sin\frac\pi n$ where $d$ is the distance between points. The answer (there are actually two, one for small $D$ and one for large $D$ (of course we have the latter)) is

$$k\to \tan ^2\left(\frac{\pi }{n}\right)+\sec \left(\frac{\pi }{n}\right) \left( \tan \left(\frac{\pi }{n}\right)\sqrt{2 \cos \left(\frac{\pi }{n}\right)+1}+1\right)$$ thanks to the tremendous trio Solve, Simplify and TeXForm. That's really all we need to make the picture -- here's code to make the end result.

Manipulate[
 With[{k=Tan[\[Pi]/n]^2+Sec[\[Pi]/n] (1+Sqrt[1+2Cos[\[Pi]/n]]Tan[\[Pi]/n])}, 
  Graphics[{ColorData["Rainbow"]@(#2/n), 
        Table[
           Disk[k^j RotationTransform[j \[Pi]/n]@#, k^j Sin[\[Pi]/n]],
        {j, m}]} &[{Cos@((2 \[Pi] #)/n), Sin@((2 \[Pi] #)/n)}, #] & /@ Range@n, 
   Background -> Black]], {{n,10}, 3, 24, 1}, {{m,3}, 1, 20}]

Now let me justify posting on a Mathematica forum: the original artist had 24 circles in each ring. We know $\cos\frac x2=\sqrt{\frac{1+\cos x}2}$. Why stop there? We know $\cos3x=4\cos^3x-3\cos x$, so $\cos\frac x3$ is some root of a cubic in $\cos x$. Unfortunately, the word "some" is problematic, especially if we considered an arbitrary quotient $\frac xp$. Thankfully, our problem is limited such that one particular root is always taken. Let me stop blabbing: $K=\cos\frac\pi{24}=\cos\frac\pi{2^3\cdot3}$. That expands into $$K=\frac{1}{2} \sqrt{2+\sqrt{2+\sqrt{3}}}$$ Notice that Simplify[Cos[Pi/24]-K] actually doesn't evaluate in MMA -- this makes me very sad. A shortcut to that identity is FullSimplify@ToRadicals@Cos[\[Pi]/24] -- nice! Thanks, as always, Daniel Lichtblau. Now let's answer the creative, confused and now censored artist who asked: what is $k$ for 24 circles? Simply evaluate

Simplify[With[{n = 24}, 
    Tan[\[Pi]/n]^2 +  Sec[\[Pi]/n]
         (1 + Sqrt[1 + 2 Cos[\[Pi]/n]] Tan[\[Pi]/n])] //.
       {Sec[x_] :> HoldForm@(1/Cos[x]), Tan[x_] :> HoldForm@(Sin[x]/Cos[x]), 
    Sin[x_] :> Sqrt[1 - Cos[x]^2], Cos[\[Pi]/24] -> 1/2 Sqrt[2+Sqrt[2+Sqrt@3]]} /. 
  HoldForm@x_ :> x]

to find

$$k_{24}=\frac{4+2 \sqrt{2+\sqrt{3}}+2 \sqrt{2+\sqrt{2+\sqrt{3}}}-\sqrt{\left(2+\sqrt{3}\right) \left(2+\sqrt{2+\sqrt{3}}\right)}+2 \sqrt{\left(2-\sqrt{3}\right) \left(1+\sqrt{2+\sqrt{2+\sqrt{3}}}\right)}}{\left(2+\sqrt{2+\sqrt{3}}\right)^{3/2}}$$ I'll write it simpler: with $n=\sqrt{2+\sqrt3}$ and $m=\sqrt{2+n}$,

$$k_{24}=\frac{4+2\sqrt{2-\sqrt{3}}\sqrt{m+1}+2m+2n-mn}{m^3}$$ Finally, I'll relent with the analytic-mania and say $k_{24}\approx1.2553$.

Before I finish up, here's a big one: 42 circles per ring, 200 rings.

bigone

I think eliminating that space in the center is, I'm ashamed to say, not a task Mathematica was meant for. Evaluating $\cos\frac\pi{24}$ though, certainly is a task Mathematica was meant for (and it does beautifully, as I learned today)! I'd love to hear your opinions, and I'd be delighted to chat in the comments.

Have a good day!


Edit: I found the tab containing the original post. Here's his original attempt

orig

Pretty good for human hands and hot glue! If he's OK with it, I'll put this image and his name at the top of the post for clearer reading.

I'm not necessarily against the deletion of the original post -- it wasn't strictly a Mathematica question, and it wasn't strictly an original Mathematica idea. It did inspire me, though!


I can't stop!

137

POSTED BY: Adam Mendenhall
3 Replies

Ah! To my shame...

FullSimplify@ToRadicals[Cos[Pi/24]]

yields the expression.

That I didn't even consider FullSimplify, MinimalPolynomial etc. is a testament to how good Simplify is by default (the range of expressions it deals with, the conciseness of most of its results)!

And an interesting result of ToRadicals: $\cos\frac\pi{17}=$

$$\frac{1}{4 \sqrt{\frac{2}{15+\sqrt{17}+\sqrt{2 \left(17-\sqrt{17}\right)}+\sqrt{2 \left(34+6 \sqrt{17}-\sqrt{2 \left(17-\sqrt{17}\right)}+\sqrt{34 \left(17-\sqrt{17}\right)}-8 \sqrt{2 \left(17+\sqrt{17}\right)}\right)}}}}$$ which seems to be special since most of the polynomials for $\cos\frac\pi p$ have no nested rooty formula.

POSTED BY: Adam Mendenhall

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: EDITORIAL BOARD

About that missed identity...

In[252]:= k = 1/2*Sqrt[2 + Sqrt[2 + Sqrt[3]]];
FullSimplify[Cos[Pi/24] - k]

(* Out[253]= 0 *)
POSTED BY: Daniel Lichtblau
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract