Message Boards Message Boards

[GIF] Recursive Complete Graph


enter image description here

The rule is simple:

  1. Start with n-points in any arbitrary configuration.
  2. Connect every point to every other point with a line.
  3. Draw a point where any new intersections occur.
  4. These intersections become your initial set of points for the next iteration. Repeat the process.

I only took it 3 iterations because render time blows up, but it looks like it approaches a particular figure as # of iterations -> infinity. We may suspect that different sets of initial points yield a converging image, while others do not converge. Much like a geometric series.

Here is a closer look at the 3rd iteration:

enter image description here

We could also keep the points from previous iterations, yielding something more like this:

enter image description here

The code is not super clean, did a lot of manual stuff.

pts0 = N[CirclePoints[6]];
lines = Subsets[pts2, {2}];
threshold = 0.0000000001;
lul = {};
  p = Quiet[
     t_ /; (RegionDistance[InfiniteLine[lines[[i]]], t[[1]]] < 
         threshold && 
        RegionDistance[InfiniteLine[lines[[i]]], t[[2]]] < 
  Quiet[If[MatchQ[p, {}],
     AppendTo[lul, lines[[i]]],
       p[[1]][[1]] -> 
        Flatten[MaximalBy[{lines[[i]], lul[[p[[1]][[1]]]]}, 
          EuclideanDistance[#[[1]], #[[2]]] &, 1], 1]]]]]
  , {i, 1, Length[lines]}]
 , {i, Length[lul]}]

intersectionpoints =
            j]]]], _EmptyRegion] \[Or] (RegionDistance[
           longestUniqueLines[[j]][[1]]] < threshold) \[Or]
           longestUniqueLines[[j]][[2]]] < threshold) \[Or]
           longestUniqueLines[[i]][[1]]] < threshold) \[Or]
           longestUniqueLines[[i]][[2]]] < threshold)
       , Nothing, 
       ], {i, Length[longestUniqueLines]}, {j, 
        Table[{q}, {q, i}]]}]
     , 1]
    , Abs[#1[[1]] - #2[[1]]] < threshold \[And] 
      Abs[#1[[2]] - #2[[2]]] < threshold &];
  , {i, j}]
POSTED BY: Bryan Lettner
1 month ago

Excellent! Any statistics on the number of crossings/points after n iterations?

POSTED BY: Sander Huisman
1 month ago

Yes, those would be interesting sequences. For this example, the number of points at each iteration is: 6, 13, 288, ??

But due to it's symmetry, some intersections are shared. For 6 random initial points, the number of intersections will vary depending on the position of the points. But the maximum number appears to be: 6, 15, 774, ??

For 5 random initial points, the maximum number appears to be: 5, 5, 5, 5, ....

For 7 random initial points, the maximum number appears to be: 7, 35, ?? ....

It is worth noting that 5 is the lowest number of initial points which will actually create a continuing pattern (just a star within a star within a star, forever). Anything less will fizzle out at the 2nd iteration. 6 is the lowest number which creates a rich pattern. If we keep points from previous iterations, 5 is lowest number which will create a rich pattern. enter image description here

The sequence for this one is: 5, 10, 26, 741, ?? (That's for 5 equally-spaced circle points as our initial points. For 5 random points, the sequence is different)

Also worth noting that we are only in 2d here. Would be interesting to explore limit cases as the number of points and number of dimensions -> infinity.

Also, fun speculation: once we apply deep learning / neural networks to deep math, we might be able to accurately "guess" the next iteration without having to perform every calculation.

POSTED BY: Bryan Lettner
1 month ago

Awesome, you should add those sequences to OEIS!

POSTED BY: Peter Karpov
1 month ago

Group Abstract Group Abstract