Thanks for your quick reply!
Here's an academic paper that describes roughly the type of algorithm I'd be interested in:
http://link.springer.com/article/10.1007/s0045400891306
It seems that most of the folks recently working on such things are doing it for surface meshes of objects, rather than tangled webs of arbitrary nodes. However, I think what they show on page 555 (14 of the pdf) resembles most closely what I'm looking for.
The point would be to try to reduce the number of instances where edges cross or overlap one another (outside of the vertices themselves, of course).
I'm thinking along the lines of an algorithm that for each node would stochastically pick a few possible locations, then choose the least tangled one. Additional passes could be made on the entire mesh once all are placed in order to attempt relocation of the
most tangled nodes. There could be a user option for the number of passes the algorithm makes.
(Pardon my awful pseudocode)
// Where fixedVertices is always a subset of placedVertices, but the "fixed" comes from the userset lock.
PlaceVertex( vertexToPlace, placedVertices[], fixedVertices[], allEdges[], placedEdges[])
{
edgesToVertex[] = edges.FindEdgesFor(vertexToPlace);
adjacentVertices[] = edgesToVertex.AllPointsExcept(vertexToPlace);
newEdgesToPlace[] = edgesToVertex.edgesTo(set.overlap(adjacentVertices, placedVertices));
trialLocations[] = ChoosePossibleLocationsBasedOn(adjacentVertices, placedVertices); // Using some existing spacing algorithm to start with.
foreach(location in triallocations)
{
edgesTrialLocations[] = newEdgesToPlace.calculateEdgesFor(location);
tangles = 0;
foreach(edge in edgesTrialLocations)
{
tangles += placedEdges[].thatIntersectWith(edge).count;
}
location.tangles = tangles;
}
vertexToPlace.location = triallocations.locationsWithZeroOrLeastTangles().locationWithBestSpacing() //Spacing judged by some other algorithm.
placedVertices.add(vertexToPlace);
}
