1 / 12

Graph drawing Force directed methods

Graph drawing Force directed methods. Network Algorithms 2005. Force directed methods. Method for arbitrary graphs Uses physical analogy: Force system Method to find equilibrium state Advantages: Relatively easy to understand and implement Often reasonably nice results.

darryl-mack
Télécharger la présentation

Graph drawing Force directed methods

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Graph drawingForce directed methods Network Algorithms 2005 Netwerk Algorithms: Planar graphs

  2. Force directed methods • Method for arbitrary graphs • Uses physical analogy: • Force system • Method to find equilibrium state • Advantages: • Relatively easy to understand and implement • Often reasonably nice results Netwerk Algorithms: Planar graphs

  3. Springs and electrical forces method • Edges are springs • Vertices repel each other • Force on vertex: • fuvis force on spring • guv is repelling force Netwerk Algorithms: Planar graphs

  4. Spring force • Assume some `wanted length’ of an edge luv. (E.g., 1.) • Spring wants to assume length luv; force is proportional to difference with luv. • Choose some stiffness of the spring kuv.’ • Force in x-direction is (y-direction similar): Netwerk Algorithms: Planar graphs

  5. Repelling force • Vertices are repelling particles • Follow inverse square law • k’uvis strength of repulsion (choose some number, e.g., experimentally) • Repelling force of v in x-direction: Similar in y-direction Netwerk Algorithms: Planar graphs

  6. Search for equilibrium • Position where all vertices have a force of 0 towards them (sum of spring and repelling forces) • Springs have lengths of edges go to desired length • Repelling has vertices not too close together Netwerk Algorithms: Planar graphs

  7. Searching for equilibrium • Numerical techniques • Simple algorithm: • Take for each vertex a random position • Repeat: • Compute for each vertex its force • Move all vertices to new position depending on their forces Until in sufficient rest • Faster algorithms exist Netwerk Algorithms: Planar graphs

  8. Barycenter method • Tutte, 1960 • Differences with force method • No repelling forces • luv = 0 • Stiffness is 1 • Vertices at exterior face get fixed positions Netwerk Algorithms: Planar graphs

  9. Force on a vertex Where pu is the position of u on the plane If v is a free vertex Netwerk Algorithms: Planar graphs

  10. Finding equilibrium • System of forces can be written as set of linear equations • Fast converging algorithms • For planar graphs, system can be solved in O(n1.5) time Netwerk Algorithms: Planar graphs

  11. Barycenter draw pseudocode • Place all fixed vertices at corners of polygon around origin, and all free vertices on origin • Repeat • For each free vertex v do • x(v) = 1/degree(v) * S((u,v) in E) x(u) • y(v) = 1/degree(v) * S((u,v) in E) x(u) until sufficient convergence Netwerk Algorithms: Planar graphs

  12. Theorem of Tutte • If G is a triconnected planar graph, then this method yields a planar drawing of G. • Assuming … • In practice, layers become smaller in the inside • Generalizations with more complicated forces sometimes also have this property • If G is not triconnected, then we can make it triconnected by adding edges Netwerk Algorithms: Planar graphs

More Related