Entanglement optimization · N 15 · L 6 · radius 0.1

Entangling 15 long rods

Fifteen rods, three times longer than in the original movie, start parallel with their centres on a ring. A minimiser then raises the total linking number between them while a stiff repulsion pushes apart any pair that gets closer than one rod diameter.

Drag to rotate · scroll or pinch to zoom

iter 0

What the run does

  • Start. Rod centres sit on a ring of radius 0.6 and every rod points along x, so rods at mirrored positions lie on the same line and overlap. The first frame is therefore not penetration-free, and its total linking is exactly zero. Rod length is 6 and radius 0.1, an aspect ratio of 30.
  • Energy. The minimiser lowers −w·Σ|Lkij| + A·Σ(D − dij)², where the second sum only counts pairs with centreline distance d below the diameter D. Here w = 10, the default, and A = 5000.
  • Motion. FIRE moves each rod's centre and its two orientation angles. The frames shown are spaced evenly in log iteration.
  • Convergence. The run stops on the solver's own rule, force norm below 1e-4, at iteration 111,620. Σ|Lk| climbs from 0 to 45.2 across the 105 pairs. It is within 0.5 of that by iteration 3,800, gains a last 0.3 in a rearrangement around iteration 40,000, and is flat from iteration 56,000.
  • Non-penetration. The starting overlaps clear in about 50 iterations. Checked every 2 iterations, the closest pair then drops below 0.95 D three times, the lowest being 0.91 D at iteration 142. The trace on this page shows fewer frames and misses that dip. From iteration 400 on it holds between 0.98 and 0.99 D, so the rods end up pressed 1–2% into each other. The run ends with 46 touching pairs.

How this page was made

The run was made for this page with entanglement_optimization, built from the current source in Release mode, at the default weight. It stops on its own and takes about 13 seconds.

./entanglement_optimization --num-rods 15 \
    --rod-length 6 --rod-radius 0.1 \
    --max-iter 400000 --no-relaxation \
    --save-interval 20 --log-interval 20 --num-threads 1

The first 2000 iterations shown come from a second, identical run saved every 2 iterations. Its rod positions at iteration 2000 match the long run exactly.

Linking numbers come from the run's log. Distances and touching pairs (within 2% of one diameter) are recomputed from the saved rod positions. The same calculation on the solver's final configuration reproduces the minimum distance it reports.