drawing graphs within restricted area
play

Drawing Graphs within Restricted Area Martin Fink Department of - PowerPoint PPT Presentation

Drawing Graphs within Restricted Area Martin Fink Department of Computer Science University of California, Santa Barbara Joint work with Maximilian Aulbach, Julian Schuhmann, and Alexander Wolff 1 /25 Motivation Calculation Graphs


  1. Our Adjustments breaking cycles: minimize weight of reverted edges can afford ILP solution layer assignment: first use overfull layers from left to right: remove vertices until layer small enough remove layers until all vertices fit into drawing area crossing minimization: adjacent-exchange heuristic can take weights of crossing edges into account too many crossings: remove edge e based on importance w ( e ) i ( e ) = total weight of edges crossing e 7 /25

  2. Our Adjustments breaking cycles: minimize weight of reverted edges can afford ILP solution layer assignment: first use overfull layers from left to right: remove vertices until layer small enough remove layers until all vertices fit into drawing area crossing minimization: adjacent-exchange heuristic can extension: try to reinsert removed take weights of crossing edges into account objects if space available too many crossings: remove edge e based on importance w ( e ) i ( e ) = total weight of edges crossing e 7 /25

  3. Edge Routing place vertical segments between consecutive layers 8 /25

  4. Edge Routing place vertical segments between consecutive layers no unnecessary crossings 8 /25

  5. Edge Routing place vertical segments between consecutive layers no unnecessary crossings 8 /25

  6. Edge Routing place vertical segments between consecutive layers no unnecessary crossings improve spacing of segments by force-directed method 8 /25

  7. Edge Routing place vertical segments between consecutive layers no unnecessary crossings improve spacing of segments by force-directed method 8 /25

  8. Edge Routing place vertical segments between consecutive layers Extension: B´ ezier Curves no unnecessary crossings improve spacing of segments by force-directed method 8 /25

  9. Edge Routing place vertical segments between consecutive layers Extension: B´ ezier Curves no unnecessary crossings improve spacing of segments by force-directed method Improved Routing 8 /25

  10. Example 3 23 1 40 45 19 10 40 3 29 13 40 ( 3 40 + 1 4 40 ) 21 5 40 3 1 4 13 (3+1) 40 1 13 (8+5) 5 40 3 4 5 13 6 24 ( 15 40 + 9 40 ) 10 40 18 16 40 40 23 ( 3 8 + 1 ( (3 · 5) (8 · 5) + (1 · 8) 5 ) 11 (5 · 8) ) 80 20 120 40 ( 15 40 + 8 40 ) 7 1 17 (15+8) 40 40 40 1 4 1 22 4 3 40 12 20 4 40 14 23 ( 30 80 + 16 80 ) 40 ( 15 40 + 5 40 ) 17 ( 3 8 + 3 8 ) 40 7 8 32 4 1 40 8 2 38 of 358 vertices (10.6 %); 91.1 % of the vertex weight 9 /25

  11. Example 3 23 1 40 45 19 10 40 3 29 13 40 ( 3 40 + 1 4 40 ) 21 5 40 3 1 4 13 (3+1) 40 1 13 (8+5) 5 40 3 4 5 13 6 24 ( 15 40 + 9 40 ) 10 40 18 16 40 40 23 ( 3 8 + 1 ( (3 · 5) (8 · 5) + (1 · 8) 5 ) 11 (5 · 8) ) 80 20 120 40 ( 15 40 + 8 40 ) 7 1 17 (15+8) 40 40 40 1 4 1 22 4 3 40 12 20 4 40 14 23 ( 30 80 + 16 80 ) 40 ( 15 40 + 5 40 ) 17 ( 3 8 + 3 8 ) 40 7 8 32 4 1 40 8 2 38 of 358 vertices (10.6 %); 91.1 % of the vertex weight 9 /25

  12. Example 2 ( 11 9 · 9 2 ) 9 (3 1 3 · 4 1 1 ) 12 1 3 33 11 5 1 3 1 12 2 2 6 24 6 19 4 16 1 5 3 4 ( 6 3 · 4 2 ) ( 11 1 · 3 16 3 2 ) 16 1 6 2 99 6 ( 11 3 · 9 2 ) 99 10 39 16.5 5 6 99 (3 2 3 · 4 1 2 ) (3 4 6 · 4 3 6 ) ( 22 6 · 27 6 ) 15 9 15 3 6 2 8 1 6 ( 6 9 · 4 8 ) (11 · 9) 33 26 1 (3 · 2) 2 2 (11 · 3) (1 · 2) ( 8 3 · 9 2 ) 12 12 14 6 ( 9 3 · 6 2 ) 12 7 2 24 ( 2 3 · 1 2 ) 6 72 7 3 5 7 1 12 3 88 3 6 6 4.7 % of 1031 vert.; 75.9 % vertex weight; 74.1 % edge weight 10 /25

  13. – Planar Output Example 2 24 ( 6 3 · 4 4 2 ) 6 7 3 5 12 1 (11 · 3) 7 2 33 3 (1 · 2) 15 3 6 2 2 (11 · 9) (3 1 3 · 4 1 99 1 ) (3 · 2) 16 3 6 16.5 6 ( 11 1 · 3 2 ) 12 2 19 4 33 16 1 6 5 3 2 99 ( 11 3 · 9 594 594 2 ) (3 2 3 · 4 1 5 16 1 2 ) 6 36 3 22 49 27 99 11 (3 4 6 · 4 3 6 ) 6 1 ( 22 6 · 27 6 ) 8 1 13 ( 2 3 · 1 ( 8 3 · 9 2 ) 2 ) 6 12 12 14 8 ( 11 9 · 9 2 ) 6 ( 6 9 · 4 8 ) 24 12 88 72 9 6 4.3 % of 1031 vert.; 76.6 % vertex weight; 70.2 % edge weight 10 /25

  14. Remarks runtime for graph with 1031 vertices and 1549 edges to A4 paper: ≈ 3 s 11 /25

  15. Remarks runtime for graph with 1031 vertices and 1549 edges to A4 paper: ≈ 3 s most of it for edge routing 11 /25

  16. Remarks runtime for graph with 1031 vertices and 1549 edges to A4 paper: ≈ 3 s most of it for edge routing preprocessing removing very light vertices yielded speedup + heavier outputs 11 /25

  17. Remarks runtime for graph with 1031 vertices and 1549 edges to A4 paper: ≈ 3 s most of it for edge routing preprocessing removing very light vertices yielded speedup + heavier outputs especially with vertex/edge reinsertion: no significant influence of layer assignment algorithm 11 /25

  18. General Graphs e o a b w f u d n c g t p v h i x q j z k y m r s l 12 /25

  19. General Graphs e o a b w f u d n c g t p v h i x q j z k y m r s l 12 /25

  20. General Graphs e o a b w f u d n c g t p v h i x q j z k y m r s l 12 /25

  21. General Graphs d n c g t p h i x q k 12 /25

  22. General Graphs e o a b w f u d n c g t p v h i x q j z k y m r s l 12 /25

  23. General Graphs e e o o a b b w w f f u u d d n n c c g g t t p p v v h h i i x x q q j j z z k k y y m m r r s s l l 12 /25

  24. General Graphs e e o o ab b w w f f u u d d n n c c g g t t p p v v h h i i x x q q j j z z k k y y m m r r s s l l 12 /25

  25. General Graphs a o o u u f f b b e e c c w w n n d d g g p p t t v v h h i i q q x x j j k k y y z z m m s s r r l l 12 /25

  26. General Graphs – Basic Ideas use force-directed approach + standard forces a o o u u f f b b e e c c w w n n d d g g p p t t v v h h i i q q x x j j k k y y z z m m s s r r l l 13 /25

  27. General Graphs – Basic Ideas use force-directed approach + standard forces keep drawing in prescribed frame a o o u u f f b b e e c c w w n n d d g g p p t t v v h h i i q q x x j j k k y y z z m m s s r r l l 13 /25

  28. General Graphs – Basic Ideas use force-directed approach + standard forces keep drawing in prescribed frame a o o u u f f b b e e c c compare [Fruchterman, w w n n d d Reingold ’91] g g p p t t v v h h i i q q x x j j k k y y z z m m s s r r l l 13 /25

  29. General Graphs – Basic Ideas use force-directed approach + standard forces keep drawing in prescribed frame a o o u u f f b b keep drawing in frame e e c c compare [Fruchterman, w w n n d d Reingold ’91] slowly shrink frame g g p p t t v v h h i i q q x x j j k k y y z z m m s s r r l l 13 /25

  30. General Graphs – Basic Ideas use force-directed approach + standard forces keep drawing in prescribed frame a o o u u f f b b keep drawing in frame e e c c compare [Fruchterman, w w n n d d Reingold ’91] slowly shrink frame g g p p t t remove vertices/edges if v v h h i i necessary after shrinking q q x x j j find new equilibrium k k y y z z m m s s r r l l 13 /25

  31. General Graphs – Outline start with some initial drawing 14 /25

  32. General Graphs – Outline start with some initial drawing compute equilibrium layout 14 /25

  33. General Graphs – Outline start with some initial drawing compute equilibrium layout initialize frame F around drawing 14 /25

  34. General Graphs – Outline start with some initial drawing compute equilibrium layout initialize frame F around drawing while F too large: 14 /25

  35. General Graphs – Outline start with some initial drawing compute equilibrium layout initialize frame F around drawing while F too large: – shrink F – find new equilibrium 14 /25

  36. General Graphs – Outline start with some initial drawing compute equilibrium layout initialize frame F around drawing while F too large: – shrink F – find new equilibrium – if necessary remove vertices/edges 14 /25

  37. General Graphs – Outline start with some initial drawing compute equilibrium layout initialize frame F around drawing while F too large: – shrink F – find new equilibrium – if necessary remove vertices/edges postprocessing: transform straight-line edges to B´ ezier curves 14 /25

  38. Forces repulsion between vertices v 2 v 1 15 /25

  39. Forces repulsion between vertices v 2 v 1 attraction between adjacent vertices v 2 v 1 15 /25

  40. Forces repulsion between vertices � [Fruchterman, v 2 Reingold 1991] v 1 parameterized by desired edge length attraction between adjacent vertices v 2 v 1 15 /25

  41. Forces repulsion between vertices � [Fruchterman, v 2 Reingold 1991] v 1 parameterized by desired edge length attraction between adjacent vertices v 2 v 1 edge-vertex repulsion i v 3 v 1 v 2 [Bertault, 2000] v 3 15 /25

  42. Forces repulsion between vertices � [Fruchterman, v 2 Reingold 1991] v 1 parameterized by desired edge length frame boundary: cut off movement attraction between adjacent vertices v 2 v 1 edge-vertex repulsion v i v 3 v 1 v 2 [Bertault, 2000] v 3 15 /25

  43. Handling the Frame 16 /25

  44. Handling the Frame F 16 /25

  45. Handling the Frame F 16 /25

  46. Handling the Frame iteratively shrink frame F F ′ 16 /25

  47. Handling the Frame iteratively shrink frame push vertices into frame F F ′ v 1 v 1 v 1 v 2 v 2 v 2 16 /25

  48. Handling the Frame iteratively shrink frame push vertices into frame F compute new equilibrium layout F ′ v 1 v 1 v 1 v 2 v 2 v 2 16 /25

  49. Handling the Frame iteratively shrink frame push vertices into frame F compute new equilibrium layout remove vertices/edges if necessary F ′ distances too short ↔ desired edge length v 1 v 1 v 1 v 2 v 2 v 2 16 /25

  50. Handling the Frame iteratively shrink frame push vertices into frame F compute new equilibrium layout remove vertices/edges if necessary F ′ distances too short ↔ desired edge length average edge length small: remove a vertex v 1 v 1 v 1 v 2 v 2 v 2 16 /25

  51. Handling the Frame iteratively shrink frame push vertices into frame F compute new equilibrium layout remove vertices/edges if necessary F ′ distances too short ↔ desired edge length average edge length small: remove a vertex otherwise: remove an edge v 1 v 1 v 1 v 2 v 2 v 2 16 /25

  52. Removing vertices – Pressure and Stress remove lightest vertex remove vertex with worst weight-area ratio 17 /25

  53. Removing vertices – Pressure and Stress ✗ remove lightest vertex remove vertex with worst weight-area ratio 17 /25

  54. Removing vertices – Pressure and Stress ✗ remove lightest vertex ✗ remove vertex with worst weight-area ratio 17 /25

  55. Removing vertices – Pressure and Stress ✗ remove lightest vertex ✗ remove vertex with worst weight-area ratio also take current drawing into account: compute pressure based on forces 17 /25

  56. Removing vertices – Pressure and Stress ✗ remove lightest vertex ✗ remove vertex with worst weight-area ratio also take current drawing into account: compute pressure based on forces idea: forces in opposite directions v 17 /25

  57. Removing vertices – Pressure and Stress ✗ remove lightest vertex ✗ remove vertex with worst weight-area ratio also take current drawing into account: compute pressure based on forces idea: forces in opposite directions v pressure P ( v ) 17 /25

  58. Removing vertices – Pressure and Stress ✗ remove lightest vertex ✗ remove vertex with worst weight-area ratio also take current drawing into account: compute pressure based on forces v 17 /25

  59. Removing vertices – Pressure and Stress ✗ remove lightest vertex ✗ remove vertex with worst weight-area ratio also take current drawing into account: compute pressure based on forces v 17 /25

  60. Removing vertices – Pressure and Stress ✗ remove lightest vertex ✗ remove vertex with worst weight-area ratio also take current drawing into account: compute pressure based on forces – compare with opposite octants v 17 /25

  61. Removing vertices – Pressure and Stress ✗ remove lightest vertex ✗ remove vertex with worst weight-area ratio also take current drawing into account: compute pressure based on forces 2 3 – compare with opposite octants – worst pair → pressure 1 v 6 17 /25

  62. Removing vertices – Pressure and Stress ✗ remove lightest vertex ✗ remove vertex with worst weight-area ratio also take current drawing into account: compute pressure based on forces 2 3 3 2 1 4 v v v 7 6 17 /25

  63. Removing vertices – Pressure and Stress ✗ remove lightest vertex ✗ remove vertex with worst weight-area ratio also take current drawing into account: compute pressure based on forces remove vertex with highest stress value 2 3 P ( v ) 3 S ( v ) = 2 w ( v ) · ( d ( v )+0.001) 1 4 v v v 7 6 17 /25

Recommend


More recommend