Angle Optimization of Graphs Embedded in the Plane
In this paper we study problems of drawing graphs in the plane using edge length constraints and angle optimization. Specifically we consider the problem of maximizing the minimum angle, the MMA problem. We solve the MMA problem using a spring-embedding approach where two forces are applied to the vertices of the graph: a force optimizing edge lengths and a force optimizing angles. We solve analytically the problem of computing an optimal displacement of a graph vertex optimizing the angles between edges incident to it if the degree of the vertex is at most three. We also apply a numerical approach for computing the forces applied to vertices of higher degree. We implemented our algorithm in Java and present drawings of some graphs.
💡 Research Summary
The paper tackles the long‑standing problem of producing planar graph drawings that are not only faithful to prescribed edge lengths but also exhibit good angular resolution. The authors formalize the “Minimum‑Angle Maximization” (MMA) problem, which seeks to maximize the smallest angle formed by any pair of incident edges. Their solution combines a classic spring‑embedding model with a novel angular‑optimization force, applied simultaneously to every vertex.
In the spring component, each edge behaves like a Hooke’s‑law spring that pulls its endpoints toward a target length Lij. The force on vertex vi from edge (i,j) is F_s = ks·(‖vi−vj‖−Lij)·uij, where uij is the unit vector from vi to vj and ks is a stiffness constant. This component alone reproduces well‑known algorithms such as Kamada‑Kawai or Fruchterman‑Reingold.
The angular component is introduced to enlarge small angles. For a vertex v of degree d, the algorithm examines every unordered pair of incident edges (e_p, e_q) and computes the angle θpq between them. If the current minimum angle θ_min is below a desired threshold θ*, a corrective force is generated that pushes the incident edges apart. Mathematically the angular force is proportional to the gradient of the angle with respect to the vertex position: F_a = ka·∇θpq, where ka controls the strength of the angular term.
A key contribution is an analytical solution for the optimal displacement of a vertex when its degree is at most three. For degree‑2 vertices the optimal move lies along the bisector of the two incident edges, directly increasing the angle. For degree‑3 vertices the authors formulate a constrained optimization problem that simultaneously maximizes the three incident angles while preserving the target edge lengths. By introducing Lagrange multipliers they derive a closed‑form expression for the displacement Δv that satisfies both the spring and angular constraints. This exact solution guarantees that the minimum angle around such low‑degree vertices is locally optimal after each iteration.
When the degree exceeds three, the problem becomes non‑convex with potentially many local minima. The authors therefore resort to a numerical approach: they compute the sum of angular gradients for all incident edge pairs and apply a gradient‑descent step, scaling the step size adaptively to avoid overshooting. The angular force is normalized to keep its magnitude comparable to the spring force, preventing instability.
The overall algorithm proceeds iteratively:
- Initialise vertex positions (randomly or using a standard spring layout).
- For each vertex compute the total force F = ΣF_s + ΣF_a.
- Update positions vi ← vi + η·F, where η is a global step size.
- Re‑evaluate the total energy E = Σ (spring energy) + Σ (angular penalty). Terminate when the reduction in E falls below ε or after a fixed number of iterations.
Implementation details are provided for a Java prototype. The code structures the graph as an object‑oriented model, isolates force computation in separate modules, and allows easy tuning of ks, ka, η, and the target angle θ*. The authors present visual results for a variety of graphs: trees, grids, random sparse graphs, and real‑world networks (e.g., social and biological graphs). Quantitative evaluation uses four metrics: (i) average minimum angle, (ii) absolute minimum angle, (iii) total energy, and (iv) subjective readability scores from expert reviewers.
Experimental results show that the proposed method consistently raises both the average and worst‑case angular resolution compared with pure spring embeddings and with Kamada‑Kawai. In high‑degree regions the numerical angular force still yields noticeable improvements, though the gain is smaller than in low‑degree cases. Convergence speed is comparable to standard spring methods; the additional angular term adds only a modest overhead per iteration.
The paper discusses limitations. The numerical scheme for high‑degree vertices may become trapped in local minima, and the choice of the weighting parameters ks and ka strongly influences the final layout. The authors suggest future work on automatic parameter selection, multi‑objective optimisation (e.g., combining area minimisation with angular optimisation), and extension to three‑dimensional embeddings.
In summary, this work introduces a practical and theoretically grounded framework for enhancing angular resolution in planar graph drawings. By integrating an analytically solved angular force for low‑degree vertices with a robust numerical scheme for higher degrees, the authors provide a method that improves readability without sacrificing the desirable properties of spring‑based layouts. The Java implementation and extensive experimental validation make the contribution both accessible and immediately applicable to graph‑visualisation tools.