Artificial intelligent assistant

Calculating the angle for a path between two nodes in a graph I want to (programatically) draw an edge between two nodes in a graph, starting on the outside of the nodes. Below is an illustration of what I'm (poorly) trying to describe: ![]( I have the $(x,y)$ coordinates of the two nodes. I'm assuming I need to calculate the angle $a$ between the nodes as illustrated in the following figure (though I'm not sure, it's been a while since I mathed.) !enter image description here Any help would be **greatly appreciated** :-)

So I've got this thing working, using the ideas presented by @recursiverecursion.

This is how I did it (I chose R=15 as the nodes have a radii of 10, which would ensure that the lines started from a point _outside_ the nodes, as per my figure.

$$ \theta = arctan(\frac{y_0-y_1}{x_0-x_1})\\\ \Delta x = R * cos(\theta)\\\ \Delta y = R * sin(\theta)\\\ $$

Then I drew a line from $(x_o + \Delta x, y_0-\Delta y)$ to $(x_1 - \Delta x, y_1+\Delta y)$. Worked splendidly :-)

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy f96dde1f7f18886baddc417a8bbfbe66