I've got a graph where source and target elements ('nodes') are circular and the connection between these two (an 'edge') must be an arrow, starting in the center of the source node and pointing to the edge of the target circle. I do have exact coordinates of both source and target nodes (center of the circle) and know the radius of the target node. Connecting them (path starting in the center of the source circle and ending in the center of the target circle) is pretty straight forward: M ${sourceX},${sourceY} L ${targetX - 50},${targetY}
:
but can't wrap my head around the algo behind the actual desired result: (please note the target node can be moved around)
Thanks!
semi-related link: https://math.stackexchange.com/questions/1724792/an-algorithm-for-finding-the-intersection-point-between-a-center-of-vision-and-a