In a previous question Original post @Julian S. proposed a method for coloring spiral structures. However this method works well only if the two spirals do not merge together.
For example, for these data we have
data = Import["spirals.dat", "Table"];
radius = 10.64;
data1 = FindClusters[Select[data, Norm[#] > radius &], 2,
Method -> "Agglomerate"];
L0 = Show[ListPlot[data1, PlotRange -> Full, AspectRatio -> 1,
PlotStyle -> {Directive[Darker[Green], PointSize[0.003]],
Directive[Red, PointSize[0.003]]}]]
As we can see the method fails here. There are two spiral arms; one starting from x_0 = -10.64
and the other one from x_0 = 10.64
. I want the first one to be in red color and the second one in green like the following:
Surely you want to know how I obtained it. Well, I cheated! Since the two spirals are symmetrical I integrated the initial conditions of only the one spiral. Then I generated the symmetrical initial conditions for the other spiral arm and I merged the two plots. However, this is NOT a solution. In the case that the two arms are not symmetrical the cheat does not work, so the question remains.
Any suggestions?
Many thanks in advance!