Step 1: Reference layer (blue) and boundary nodes (red) are fixed in place.
Step 2: Interior nodes (green) are initially placed randomly with edge crossings. When you click "Animate Layout", each interior node moves toward the average position of its neighbors.
Step 3: This process repeats iteratively. Nodes naturally settle into positions that minimize edge crossings and tension.
Result: The algorithm produces a visually clear graph with minimal edge crossings.