Abstract:
The present invention relates to a computer-implemented technique for drawing directed graphs providing reduced crossings and improved picture quality. An edge list description provided by a user is processed to produce a ranking of all nodes that minimizes the weighted sum of all edges, an edge cost being the product of its weight and length. Nodes within a ranking are then positioned to reduce edge crossings using a heuristic based on node positions in adjacent ranks. Such heuristic uses a generalized median as a weighting function plus node transposition to avoid senseless edge crossings before proceeding to a next rank. Nodes are then positioned to minimize the weighted sum of horizontal distances among connected nodes. Spline control points are then computed for interconnected nodes, and a code sequence for a drawing is generated.

Description:
TECHNICAL FIELD 
     The present invention relates to a technique which is implemented on a processor, computer or microprocessor for drawing directed graphs that provide reduced edge crossings and improved picture quality. 
     DESCRIPTION OF THE PRIOR ART 
     Directed graphs are charts or drawings comprising nodes or boxes that are interconnected and are useful for describing relationships. They have applications in computer programming, including the presentation of data structures, data flow, procedure calls, software configuration dependencies, etc. and frequently arise in other disciplines. It is seldom easy to understand a graph from a list of edges. A picture, however, is a good way of representing many kinds of data, including directed graphs, and one can quickly find individual nodes, groups of related nodes, and trace paths in such picture. The main obstacle is that it can be difficult and tedious to make good drawings of graphs by hand, and to make them as simple as possible. Additionally, when the number of nodes become large in number with many interconnections and crossings, manual development may be precluded. 
     Techniques have been devised for automatically drawing directed graphs. For example, in the article in IEEE Transactions on Systems, Man, and Cybernetics, Vol. SMC-11, No. 2, February 1981, at pages 109-125, K. Sugiyama et al. describe a technique where nodes are placed in ranks, ordered within ranks to reduce crossings, and then positions are adjusted to avoid bends in edges. The ordering of nodes within ranks is computed by an iterative heuristic based on the &#34;barycenter&#34; function of node positions. A practical implementation of a variation on the Sugiyama et al. approach is described by L. A. Rowe et al. in the article in Software: Practice and Experience, Vol. 17, No. 1, 1986, at pages 61-76. 
     Improvements to the barycenter method for reducing edge crossings are reported by P. Eades et al. in their article in ARS Combinatoria, Vol. 21, No. A, 1986, at pages 89-98. There, a method is described that reduces the number of edge crossings slightly as compared with the barycenter function. 
     The problem with the prior techniques, however, is that they do not (1) attempt to provide the best rankings of nodes; (2) always produce a satisfactory reduction in the edge crossings within a reasonable period of time; or (3) attempt to improve the final placement of nodes in the drawing after edge crossings are minimized, other than straightening edges. 
     SUMMARY OF THE INVENTION 
     The foregoing problem in the prior art has been solved in accordance with the present invention which relates to a technique implemented on a processor, computer or microprocessor for automatically drawing directed graphs that provide appropriately interconnected labeled blocks or nodes with reduced edge crossings and improved picture clarity from a user-supplied block or node interconnection listing. Additionally, the present technique can provide control of the spacing between nodes within a rank order or between ranks, the placement of a node, the size and/or shape or configuration of all or certain nodes, the labeling of interconnections, etc. 
     Other and further aspects of the present invention will become apparent during the course of the following description and by reference to the accompanying drawings. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram of an exemplary implementation of the present invention, taking as an input a node interconnection description which is automatically processed by the processor to produce a directed graph output; 
     FIG. 2 is a diagram of an intermediate layout of an exemplary directed graph for achieving a layout in accordance with the present invention; 
     FIG. 3 is a diagram of another intermediate layout of an exemplary directed graph for achieving a layout in accordance with the present invention; 
     FIG. 4 is a diagram of another intermediate layout of an exemplary directed graph for achieving a layout in accordance with the present invention; 
     FIG. 5 is a diagram of another intermediate layout of an exemplary directed graph for achieving a layout in accordance with the present invention; 
     FIG. 6 is a flow diagram of an exemplary process for use in the processor of FIG. 1; 
     FIG. 7 is a flow diagram of the network simplex method according to a preferred embodiment of the present invention; 
     FIG. 8 is a flow diagram of the computation of a feasible spanning forest T in FIG. 7 in accordance with a preferred embodiment of the present invention; 
     FIG. 9 is a flow diagram of the ordering of nodes within ranks to reduce crossings in the flow diagram of FIG. 6 in accordance with a preferred embodiment of the present invention; 
     FIG. 10 is a flow diagram of a local optimization technique for use in computing the horizontal locations in each rank to place the connected nodes close together in accordance with a preferred embodiment of the present invention; 
     FIG. 11 illustrates a technique used in the edge drawing procedure for edges disposed in various locations in a directed graph in accordance with the present illustration; 
     FIG. 12 illustrates another technique used in the edge drawing procedure for edges disposed in various locations in a directed graph in accordance with the present illustration; 
     FIG. 13 illustrates another technique used in the edge drawing procedure for edges disposed in various locations in a directed graph in accordance with the present illustration; 
     FIG. 14 illustrates another technique used in the edge drawing procedure for edges disposed in various locations in a directed graph in accordance with the present illustration; 
     FIG. 15 illustrates another technique used in the edge drawing procedure for edges disposed in various locations in a directed graph in accordance with the present illustration; and 
     FIG. 16 illustrates another technique used in the edge drawing procedure for edges disposed in various locations in a directed graph in accordance with the present illustration. 
    
    
     DETAILED DESCRIPTION 
     The present invention is a technique for making a layout of a directed graph from a list of the nodes and edges of the graph where the edges may have an associated integral weight. In the layout, nodes are drawn as shapes or icons such as rectangles and ellipses; edges are drawn as lines or splines between nodes. It is to be understood that a tail node is defined as the originating end of an edge, while a head node is defined as the termination of the edge, customarily indicated by an arrowhead. 
     FIG. 1 illustrates an exemplary input sequence of the present invention where an edge list description 10 of a directed graph is provided by a user of the technique as an input for a processor 11. This is also shown as block 100 in the overall flow diagram of FIG. 6. Processor 11 reads this graph description 10, computes a layout of the described directed graph using a process comprised of several steps to be described hereinafter, and produces a description of the layout in a computer graphics language, such as PIC or PostScript, which language is used to generate instructions for controlling a peripheral device to draw a picture as illustrated in directed graph 12, or provides a layout to an external process that may further refine or modify the layout, such as computing coloring or shading, finding clusters of nodes in the layout, etc. It is to be understood (1) that processor 11 can comprise any well known computer or microprocessor, (2) that PIC is a language for typesetting graphics as described in the article by B. W. Kernighan in Software-Practice And Experience, Vol. 12, No.  1, 1982 at pages 1-21, and (3) that PostScript is a similar computer language as described in Adobe Systems, &#34;PostScript Language Reference manual&#34;, published by Addison-Wesley, 1985. The present technique operates best for producing layouts of acyclic directed graphs, which are often used to represent hierarchical relationships. 
     In the exemplary graph description of FIG. 1, the first and last lines that read &#34;.GS&#34; and &#34;.GE&#34; indicate the Graph Start and Graph End, respectively, of the description 10. If the edges of the resultant layout should point from left-to-right rather than top-to-bottom as shown in directed graph 12 of FIG. 1, then a line &#34;.GR&#34; (Graph Rotate) is substituted for the line &#34;.GS&#34;. the second line of the edge list description 10 indicates that the nodes are to be drawn as boxes, rather than some default configuration as, for example, a circle, an ellipse, a diamond, etc. It is also possible to designate the size of the node representation in inches, if the default size is not desired. If the default node drawing shape and size are desired, then no &#34;draw&#34; command need be given. The third line of the edge list description 10 starts the edge listing and indicates that the node &#34;S1&#34; is a tail node name, and that nodes &#34;S2&#34; and &#34;S3&#34; are two head node names connected to node &#34;S1&#34;. As shown in resultant directed graph 12, the block or node labeled &#34;S1&#34; has a separate connection to each of lower ranking blocks or nodes labeled &#34;S2&#34; and &#34;S3&#34;. Similarly, the next line of the edge list description 10 indicates that tail node &#34;S2&#34; has separate connections to each of labeled head nodes &#34;S4&#34;, &#34;S5&#34;, &#34;S6&#34;, &#34;S7&#34;, and &#34;S8&#34; in the next lower rank and are also shown in directed graph 12 of FIG. 1. The remaining lines of edge list description 10 can be similarly correlated to the interconnections between the listed tail and head nodes shown in directed graph 12. 
     In accordance with the present invention, processor 11 receives the edge list description 10 and performs the following functions or steps. In a first step, the graph description is used to construct an input graph of attributed nodes and edges. Such first step, hereinafter termed the &#34;parser&#34;, translates the edge list descriptions into appropriate internal representations in memory of processor 11 as shown by block 101 of FIG. 6. The parser and internal graph representation employ standard techniques. 
     In a second step, the graph constructed by the parser is passed to a layout procedure which creates the layout of the graph by setting X and Y coordinates of the center points of nodes, and X and Y coordinates of spline control points of the edges. Such second step includes five substeps as shown by blocks 102-106 of FIG. 6 which will be discussed in greater detail hereinafter. 
     A third step then converts the resultant attributed graph into appropriate code for drawing the directed graph 12 or for use by another process or processor, as shown by block 107 of FIG. 6. This appropriate code is then used to draw the directed graph 12 as shown by block 108. 
     As mentioned above, the second step performed by processor 11 can comprise five substeps or passes. The first substep, corresponding to block 102 of FIG. 6, removes any directed cycles in the graph. This is accomplished by performing as many iterations as necessary to reverse edges until no cycles remain. Each iteration starts by assigning to each edge a count of 0. Then, a standard graph search such as a breadth-first or a depth-first search is performed. Whenever a cycle is detected during the search, all edges on the cycle receive an additional count of 1. When the search finishes, an edge with a maximum count is selected and its direction is reversed. In the final representation, however, each reversed edge is returned to its original orientation. 
     A second substep or pass, corresponding to block 103 of FIG. 6, finds an optimal rank assignment for the nodes. An optimal rank assignment assigns integer ranks to nodes such that the sum of the &#34;costs&#34; of edges is minimized. The &#34;cost&#34; of an edge is the product of its weight and its length, where the length is the rank of its head minus the rank of its tail. If the input graph does not supply a weight for an edge, it is assigned a default value, typically the unit value &#34;1&#34;. A user may increase the weight of an edge in the input graph presented to processor 11 to favor the shortening of this edge in the layout. 
     In the exemplary graph of FIG. 2, where all edge weights are &#34;1&#34;, the cost of the directed graph is 11. However, the cost of the graph of FIG. 3 is 10. In FIG. 2 the length of the edges between &#34;X8&#34; and each of the nodes &#34;X4&#34; and &#34;X6&#34; is equal to 2, while the cost of the edge from &#34;X1&#34; to &#34;X3&#34; is 1, for a combined edge cost of 5 for these three edges. In FIG. 3 the first two of these edges only have a cost of 1 each while the single edge from &#34;X1&#34; to &#34;X3&#34; has a cost of 2, thereby reducing the overall graph cost to a value of 10. It should be understood that if the X1-X3 edge were assigned a weight of 5 because of its importance, then the directed graph of FIG. 2 would then have the least overall cost. 
     Constructing an optimal level assignment arises naturally as a major component in a method for drawing directed acyclic graphs because (1) an optimal level assignment minimizes the amount of edge stretching to enhance the clarity of the resulting layouts, and (2) an optimal level assignment may decrease the running time of subsequent passes of the graph layout algorithm, if this running time is proportional to edge lengths. 
     The optimal rank assignment problem can be formulated as an integer program as follows: ##EQU1## where the λ v  are integers, λ w  -λ v  ≧1 for all edges (v,w), and ω(v,w) is the weight of edge (v,w). In this form, this substep can be solved by general solution techniques in linear programming. 
     The present invention uses a more efficient network simplex method. To describe this technique, the following notation will be used. A spanning forest T can be used to derive an integer valued function λ on the nodes of the graph. The function can be characterized by requiring that, if (v,w) is an edge in T, then λ w  =λ v  +1. If this function satisfies the conditions of a rank assignment, T is called feasible. For a given rank assignment, the slack of an edge is the length of the edge minus 1. This corresponds to how far the edge can shrink before it cannot be shrunk any more. The skeleton of a graph, relative to a given rank assignment, is the subgraph induced by all edges with slack equal to 0. 
     For a given feasible spanning forest of a graph, each edge can be assigned a value. If an edge &#34;e&#34; is not in the forest, the value is defined to be 0. If the edge is in the forest, its removal splits the tree containing it into two pieces. The value of &#34;e&#34; is defined to be the sum of the weights of all edges going from the piece of the tree containing e&#39;s tail to the piece containing e&#39;s head, minus the sum of the weights of all the edges going in the opposite direction. The edges occurring in the subtraction term are denoted IN(e). 
     The network simplex method is shown in FIG. 7. Given a weighted directed acyclic graph, a feasible spanning forest T is constructed (block 201). The manner for doing this will be explained more fully below. Then the value of each edge, as defined above, is computed. If some edge &#34;e&#34; has negative value, an edge &#34;f&#34; in IN(e) is chosen, and a new forest is generated by removing &#34;e&#34; and inserting &#34;f&#34;. Then the values of the edges are recomputed and another edge with a negative value is searched for as shown by blocks 205-207 in FIG. 7. This iteration continues until the value of each edge is non-negative. To compute the rank function from the final T (block 208), for each tree in T, do a standard breadth first search through the tree, starting at some arbitrary node and assigning it an arbitrary rank. Each time a new node is scanned, it is assigned the rank of the node currently being visited, plus or minus 1, depending on whether the scanned node is the head or tail node, respectively, of the edge between it and the visited node. Finally, the rank assignment for each tree is shifted to make the smallest rank equal to 0. 
     To construct a feasible spanning forest (block 201), it suffices to construct a feasible spanning tree for each connected component of the underlying undirected graph. This technique is outlined in FIG. 8. Pick any rank assignment λ and pick some node x as shown by block 301. Let T be a maximal tree in the skeleton containing x as shown by block 302. If T is a spanning tree, it is a feasible spanning tree as shown by block 309, and the process continues on to block 202 of FIG. 7. Otherwise, there exists an edge not in T but with one of its nodes in T. Of all such edges, one, say &#34;e&#34;, is selected with the least slack S as shown by block 306. If the head of &#34;e&#34; is in T, replace S by -S as shown by block 307. Each node v in T is given the new rank λ v  +S as shown by block 308. A new maximal tree T is then computed and the process iterates. At some point, a feasible tree is attained as in block 309. 
     Following the rank assignment, the second substep, in block 103 of FIG. 6, also creates dummy nodes at places where long edges cross ranks, as, for example, at the level of node X2 for edge X1-X3 in FIG. 3 designated dummy node 20. The placement of dummy nodes determines edge crossings and is also an aid to drawing splines for long edges in a later step, indicated by block 106 of FIG. 6. Consequently, optimal rank assignments are important not only for their contribution to drawing quality, but also for minimizing the number of dummy nodes and reducing the number of edge crossings and the cost of subsequent passes. This substep also reserves space for drawing self-edges to the same node by increasing the width of such nodes. 
     A third substep or pass orders the nodes from left to right within ranks as indicated by block 104 of FIG. 6. Since the order of nodes within ranks determines the number of edge crossings and affects the proximity of connected nodes in the layout, this step reduces the number of edge crossings to accommodate a cleaner layout and to allow connected nodes to be placed more closely together. An example of this technique is shown in FIG. 4 where the nodes of FIG. 3 are rearranged to minimize crossings and, in this exemplary case, to eliminate crossings altogether. 
     This step is an iterative technique using the present inventive weight function and local optimizations, where the weight function, called a &#34;generalized median&#34;, produces less crossings by reducing the effects of widely spread nodes, and is inexpensive to compute. The generalized median heuristic tends to work better if the initial order of noes is good. To enhance this condition, transpositions of adjacent nodes are applied to precondition the inputs to the generalized median method and to further optimize its solutions. 
     The outline of the third substep is given in FIG. 9. An initial ordering is given the nodes within each rank (block 401). This is done, for example, using a graph search starting from nodes of minimum ranks. Nodes are assigned positions in their ranks in the order that they are searched. This ensures that the initial node ordering of a directed tree has no crossings. 
     The following two steps, shown by blocks 410 and 411, are then performed a fixed number of times (per blocks 402 and 404 or until there are no more crossings per blocks 414 and 415), producing various orderings within the ranks. The ordering with the least number of crossings is the one finally chosen as shown by blocks 406 and 407. 
     (1) In block 410, each rank of the graph is visited, going from the lowest rank to the highest rank or from the highest rank to the lowest rank, depending on whether the iteration is even numbered or odd numbered. When visiting a given rank, the generalized median of each node is computed with respect to the adjacent rank visited previously. Then, the nodes in the given rank are sorted according to the generalized median values, except that nodes with no neighbors (i.e., connected by an edge) in the concerned adjacent rank are kept in their current positions. Then, the next rank is visited. 
     (2) Repeatedly transpose adjacent nodes on the same rank if that decreases the number of crossing as shown by block 411. 
     The generalized median of a node &#34;v&#34; with respect to an adjacent rank is defined as follows. When v has no neighbors in the concerned adjacent rank, its median value is defined as a negative number (or any number that cannot be a legitimate median value as described next) that the sort phase of step 1 above will recognize as an indicator not to change the position of this node. When the number of neighbors of v in the concerned adjacent rank is odd, the generalized median is simply the position of the neighbor that exactly divides the set of neighbors in the concerned rank into two sets of equal sizes. For example, if the positions of the neighbor of v is 1, 2, 3, 4 and 5, then the median value of this node is 3 as the remaining positions 1, 2, 4 and 5 divide into two sets, namely 1, 2 and 4, 5, with equal size. When the number of neighbors of v is even, there are two median positions in the positions of the neighbor nodes. These are called the left median and the right median respectively. The generalized median value can be any number between the left and right median values. It is generally chosen to be closer to the side where nodes are closer to one another. An exemplary definition for this case follows. Let L be the sorted set of positions of neighbors of v that are smaller or equal to the left median. Likewise, let R be the sorted set of positions of neighbors of v that are larger or equal to the right median. Let M L  be the sum of differences in successive positions in L, and M R  be the sum of differences in successive positions in R. If M L  or M R  is 0, the generalized median value of node v is defines as (L+R)/2; otherwise, it is defined as (M L  *R+M R  *L)/(M L  +M R ). 
     The fourth substep or pass assigns layout coordinates to the nodes, as indicated by block 105 of FIG. 6, respecting the ordering determined by the previous pass. The coordinates indicate the center points of nodes. A final exemplary layout is shown in FIG. 5. The assignment of x coordinates to the nodes can be formulated as a set of linear constraints and an objective function involving absolute values to be minimized. Specifically, it is desired to compute the x-coordinate x v  for all nodes v minimizing ##EQU2## such that x v  -x u  ≧δ whenever node u is to the left of node v on the same rank. Here, δ is a separation factor chosen to appropriately separate adjacent nodes on the same rank. The edge factors Ω distinct from the edge weight ω supplied by the user, are chosen to encourage the straightening of long edges and paths. For example, the Ω factor for an edge between dummy nodes is chosen to be larger than the Ω factor for another edge where only one of the nodes is a dummy node. 
     There is a standard technique for transforming this optimization problem into a linear program by the introduction of extra variables, allowing the coordinates to be computed by standard procedures such as the simplex method. Although this technique is practical for some graphs, it takes an undesirable amount of time and memory to solve for x coordinates in other graphs. In the present invention, the fourth substep of block 105 may be optionally replaced by a substep that produces an approximate solution based on local optimization techniques. 
     An outline of the local optimization technique for computing x coordinates for nodes is given in FIG. 10. This technique starts by assigning priorities to nodes (block 501). The priority of a node is defined as a weighted sum of its out-edges or in-edges. The weight of an edge is the product of its ω and Ω values as discussed for equation (2). Higher priority nodes are assigned coordinates before lower priority nodes. Subsequently, nodes are assigned initial x coordinates (block 502). These coordinates can be chosen simply as follows. The leftmost node in a rank has x coordinate 0. The second node has coordinate defined by the separation factor δ, and so on. 
     Then a fixed number of iterations, using blocks 508 to 517, is performed. After each iteration, the total sum of all weighted edges are computed and the set of coordinates with minimum edge sum is saved (block 516). In each iteration, the following five substeps are performed. 
     (1) Each rank is visited going from the lowest rank to the highest rank, or vice versa, depending on whether the iteration is even-numbered or odd-numbered. In each rank, according to its priority order, each node is reassigned a new x-coordinate using the median value of x-coordinates of either tail nodes of in-edges or head nodes of out-edges, depending on the direction it is going from the lowest rank to the highest rank, or vice versa (block 510). 
     (2) Edges with both ends being real nodes are set as straight as possible (block 511). 
     (3) Paths where internal nodes all have a single in-edge and a single out-edge are straightened if possible (block 512). 
     (4) the x-coordinate of each node is reassigned using the median value of the positions of tail nodes and head nodes of all edges incident on it. If there are two medians, the average value is used (block 513). This enhances the local symmetry and makes the resulting picture or directed graph drawing more pleasant looking. 
     (5) In substep 1 (block 510), nodes can sometimes drift apart creating vertical blank areas in the picture. This fifth substep (block 514) shifts such nodes closer to one another. 
     After the x-coordinates have been assigned, nodes in the same rank are assigned the same y-coordinates. The y-coordinates are chosen to appropriately separate the ranks from one another (block 507). If there are two adjacent ranks with a connecting edge whose end points are far apart, the separation between the ranks can be increased to avoid drawing edges almost horizontally. 
     The last substep or pass determines spline control points for drawing edges as shown by block 106 of FIG. 6. For each spline, this requires the consideration of whether the spline corresponds to a self-edge to the same node; an edge between nodes on (i) the same rank, (ii) adjacent ranks or (iii) non-adjacent ranks; with the possibility of multiple edges between the same pair of nodes. The splines are quadratic B-splines as outlined, for example, by M. E. Mortensorr in the book Geometric Modeling, Wiley and Sons, 1985. Self-edges to a node are drawn as loops. Where there are multi-edges they are nested, with an equal number (plus or minus one) on either side of the node. 
     Edges between nodes on the same rank are drawn as lines or smooth arcs. A line is preferred if thee are no nodes between the endpoints of the edge. Otherwise an arc is drawn in the space above the rank, using approximately one-third of the separation between ranks. Where there are multiple edges between nodes of the same rank, these multiple edges are separated by adjusting the various centerpoints of the arcs upward or downward accordingly. 
     Edges between nodes on adjacent ranks are drawn as a straight line. Long edges have endpoints on nonadjacent ranks are drawn using a sequence of connecting splines since they may pass near other nodes and change direction. The control points for the connecting splines are chosen for smoothness while avoiding incorrect node intersections and unintended edge crossings. Dummy nodes are created with height about 20% higher than the highest non-dummy node in the same rank, and with a width about twice the default node separation, as shown, for example, for dashed-line dummy node 20 in FIG. 3. This reserves enough space to make a spline inside the boundaries of the dummy node, if necessary. Alternately, if there is a space next to the dummy node, it is often preferable to encroach on that space to draw a smoother spline. 
     For each long edge, the edge drawing procedure examines the sequence of dummy nodes from the lowest to the highest rank, to select spline control points that correspond to the passage of the edge through the dummy node. Every dummy node has two neighbor nodes to which it is connected, and thus two incident edge segments. The spline control points for a dummy node are computed as follows. First, if a straight line between the centers of the neighbors of the dummy node does not intersect any other node or change the order of edge crossings, then the dummy node is deleted as shown in FIG. 11. This avoids small bumps in the edges. Second, for each incident edge segment, a line segment connecting the centerpoint of the dummy node to a point on the neighboring node is computed. If the neighboring node is also a dummy node that has already been visited, then its spline control point closest to the node under consideration is chosen, otherwise the centerpoint of the neighboring node is taken. Third, for each of these line segments, if the segment intersects the bounding box of any node in the same rank as the dummy node, then the endpoint of the line segment is adjusted upward or downward, toward the rank of the neighboring node as appropriate, to eliminate such intersection. Fourth, if the extensions of the line segments intersect inside the dummy node box, the points where the segments intersect the boundary of the dummy node box and the point of intersection are chosen as spline control points as shown in FIG. 12. Fifth, if the line segments can be adjusted so they intersect within the dummy node box without accidentally intersecting the bounding box of any node in the same rank, that is done as shown in FIG. 13 and spline control points are determined as in the fourth part above. Sixth, if the segments cannot be adjusted to intersect but the angle between them is acute, the points where the segments intersect the boundary of the dummy node box and the midpoint of the side of the dummy node box that is opposite the neighboring nodes, are chosen as spline control points. Seventh, if the angle between the segments is obtuse, and the present technique chooses the points where the segments intersect the boundary of the dummy node box and the midpoint of the dummy node box as the spline control points, then the spline has two points of inflection as it passes through the dummy node, which is not as smooth as the other cases that have only one, but the extra turn is necessary when an edge mades a &#34;jog&#34; as it passes through a rank near other nodes as shown in FIG. 14. Eighth, moving an edge may create an edge intersection near an incident real (non-dummy) node, as in FIG. 15. Such intersections are eliminated by sorting the incident edges according to the x-coordinates of the other endpoints, and moving their nearby endpoints slightly as shown in FIG. 16. Ninth, when there are multiple edges between the same pair of nodes that are not long edges, the centerpoints of the splines are moved so the multiple edges are well separated.