I\'m new to D3 and I\'m trying to create an interactive network visualization. I\'ve copied large parts of this example, but I have changed the curved lines to straight one
I answered the same question over here. The answer uses vector math, it's quite useful for other calculations as well.