Nodes Map

Attempt to replicate:  
http://lab.polygonal.de/wp-content/assets/110722/flash.html 

The problem is my algorithm crosses lines and i can't figure out any way to do so without the polygonal library. 

Any help?