Lets imagine I have points in a 2D plane that I want to connect in a directionless graph. However, I don't want these connections to overlap. The only data I'm given is where a connection exists, and what direction is goes. For example, one of my (very simple) data sets might look like this
1 > 2
2 > 3
4 > 3, 5
5 > 3
And thus, a good example of what I would want would look like this:
This image does not have any overlapping points of connections, and would be one of the many solutions. The graphing portion of the algorithm is not a problem to me. I really just want an algorithm that could return the coordinates of the various points to me, and then I can take over from there.
On the other hand, this is what I do not want:
I'm not necessarily looking for actual code, but merely a nudge in the right direction, or perhaps an algorithm that I can adapt to my specific data. Pseudo code would be fine if necessary to answer the question.
EDIT:
Now, of course I could just check if the line segments intersect in a example this small, but normal data sets for this algorithm will be much larger. It would not be efficient to calculate each and every point placement manually, and would most likely not result in the most 'optimized' solution.