(* Position of a circle tangential to other two circles *)
pos[{{x1_, y1_}, r1_}, {{x2_, y2_}, r2_}, r3_] :=
(k = N@( ((x1 - x3)^2 + (y1 - y3)^2 == (r1 + r3)^2) &&
(x2 - x3)^2 + (y2 - y3)^2 == (r2 + r3)^2);
({x3, y3} /. FindInstance[k, {x3, y3}, Reals, 2])
)
(*Select the correct center*)
nextCircle[prevCirc_, currentCircRadius_] :=
{Last@SortBy[Select[Flatten[Table[
pos[p, Last@prevCirc, currentCircRadius], {p, Most@prevCirc}], 1],
Im[#] == {0., 0.} && prevCirc[[-1, 1, 1]] #[[2]] - prevCirc[[-1, 1, 2]] #[[1]] <=0 &],
Norm@# &], currentCircRadius};
spiral[radii_] := Module[{circs},
(*use first and second circles as a seed*)
circs = {{{0, 0}, radii[[1]]}, {{radii[[1]] + radii[[2]], 0}, radii[[2]]}};
Fold[Append[#1, nextCircle[#1, #2]] &, circs, radii[[3 ;;]]]
];
Off[Part::partd]
radii = Sort@RandomReal[{1, 5}, 100];
Graphics[Circle[#[[1]], #[[2]]] & /@ spiral[radii], PlotRange -> 40 {{-1, 1}, {-1, 1}}]
On[Part::partd];