I NTRODUCTION TO G RAPH DRAWING Fall 2010 Battista, G. D., Eades, P., Tamassia, R., and Tollis, I. G. 1998 Graph Drawing: Algorithms for the Visualization.

Slides:



Advertisements
Similar presentations
Chapter 4 Partition I. Covering and Dominating.
Advertisements

Planar graphs Algorithms and Networks. Planar graphs2 Can be drawn on the plane without crossings Plane graph: planar graph, given together with an embedding.
Orthogonal Drawing Kees Visser. Overview  Introduction  Orthogonal representation  Flow network  Bend optimal drawing.
I NTRODUCTION TO G RAPH DRAWING Fall 2010 Battista, G. D., Eades, P., Tamassia, R., and Tollis, I. G Graph Drawing: Algorithms for the Visualization.
電腦視覺 Computer and Robot Vision I
Sources of the Magnetic Field
Electrical Energy and Electric Potential AP Physics C.
Force-Directed Methods
The Mathematics of Force- Directed Placement Simulating Graphs as Physical Systems To Assist in Computer Chip Layout By Jamey Lewis, St. Michael’s College.
Optimal Rectangle Packing: A Meta-CSP Approach Chris Reeson Advanced Constraint Processing Fall 2009 By Michael D. Moffitt and Martha E. Pollack, AAAI.
Label Placement and graph drawing Imo Lieberwerth.
Chapter 28. Magnetic Field
Beams and Frames.
Motion Planning CS 6160, Spring 2010 By Gene Peterson 5/4/2010.
Self Organization: Competitive Learning
Force directed graph drawing Thomas van Dijk. The problem Given a set of vertices and edges, compute positions for the vertices. If the edges don’t have.
Some Ideas Behind Finite Element Analysis
New Techniques for Visualisation of Large and Complex Networks with Directed Edges Tim Dwyer 1 Yehuda Koren 2 1 Monash University, Victoria, Australia.
A New Force-Directed Graph Drawing Method Based on Edge- Edge Repulsion Chun-Cheng Lin and Hsu-Chen Yen Department of Electrical Engineering, National.
Localized Techniques for Power Minimization and Information Gathering in Sensor Networks EE249 Final Presentation David Tong Nguyen Abhijit Davare Mentor:
VLSI Layout Algorithms CSE 6404 A 46 B 65 C 11 D 56 E 23 F 8 H 37 G 19 I 12J 14 K 27 X=(AB*CD)+ (A+D)+(A(B+C)) Y = (A(B+C)+AC+ D+A(BC+D)) Dr. Md. Saidur.
CSE351/ IT351 Modeling and Simulation
Optimization via Search CPSC 315 – Programming Studio Spring 2009 Project 2, Lecture 4 Adapted from slides of Yoonsuck Choe.
MAE 552 – Heuristic Optimization Lecture 6 February 6, 2002.
Nature’s Algorithms David C. Uhrig Tiffany Sharrard CS 477R – Fall 2007 Dr. George Bebis.
CSE 6405 Graph Drawing Text Books T. Nishizeki and M. S. Rahman, Planar Graph Drawing, World Scientific, Singapore, G. Di Battista,
SIMS 247: Information Visualization and Presentation jeffrey heer
Randomized Planning for Short Inspection Paths Tim Danner Lydia E. Kavraki Department of Computer Science Rice University.
Force Directed Algorithm Adel Alshayji 4/28/2005.
2-Layer Crossing Minimisation Johan van Rooij. Overview Problem definitions NP-Hardness proof Heuristics & Performance Practical Computation One layer:
Force Directed Algorithm Adel Alshayji 4/28/2005.
Tirgul 13. Unweighted Graphs Wishful Thinking – you decide to go to work on your sun-tan in ‘ Hatzuk ’ beach in Tel-Aviv. Therefore, you take your swimming.
Chapter 5: Path Planning Hadi Moradi. Motivation Need to choose a path for the end effector that avoids collisions and singularities Collisions are easy.
1 University of Denver Department of Mathematics Department of Computer Science.
CSE554SimplificationSlide 1 CSE 554 Lecture 7: Simplification Fall 2014.
Electrical Energy and Electric Potential
Radial Basis Function Networks
Physics 121: Electricity & Magnetism – Lecture 11 Induction I Dale E. Gary Wenda Cao NJIT Physics Department.
Face Recognition Using Neural Networks Presented By: Hadis Mohseni Leila Taghavi Atefeh Mirsafian.
Graph partition in PCB and VLSI physical synthesis Lin Zhong ELEC424, Fall 2010.
I NTRODUCTION TO G RAPH DRAWING Fall 2010 Battista, G. D., Eades, P., Tamassia, R., and Tollis, I. G Graph Drawing: Algorithms for the Visualization.
GRAPH Learning Outcomes Students should be able to:
World space = physical space, contains robots and obstacles Configuration = set of independent parameters that characterizes the position of every point.
I NTRODUCTION TO G RAPH DRAWING Fall 2010 Battista, G. D., Eades, P., Tamassia, R., and Tollis, I. G Graph Drawing: Algorithms for the Visualization.
New method to optimize Force-directed layouts of large graphs Meva DODO, Fenohery ANDRIAMANAMPISOA, Patrice TORGUET, Jean Pierre JESSEL IRIT University.
CSE554SimplificationSlide 1 CSE 554 Lecture 7: Simplification Fall 2013.
Thursday March 31, PHYS Dr. Andrew Brandt PHYS 1444 – Section 02 Lecture #16 Thursday Mar 31, 2011 Dr. Andrew Brandt HW7 Ch 27 is due Fri.
Paradigms for Graph Drawing Graph Drawing: Algorithms for the Visualization of Graphs - Chapter 2 Presented by Liana Diesendruck.
C OMPARING T HREE H EURISTIC S EARCH M ETHODS FOR F UNCTIONAL P ARTITIONING IN H ARDWARE -S OFTWARE C ODESIGN Theerayod Wiangtong, Peter Y. K. Cheung and.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
CS270 Project Overview Maximum Planar Subgraph Danyel Fisher Jason Hong Greg Lawrence Jimmy Lin.
Chapter 2-OPTIMIZATION G.Anuradha. Contents Derivative-based Optimization –Descent Methods –The Method of Steepest Descent –Classical Newton’s Method.
Week 4 Functions and Graphs. Objectives At the end of this session, you will be able to: Define and compute slope of a line. Write the point-slope equation.
Network Partition –Finding modules of the network. Graph Clustering –Partition graphs according to the connectivity. –Nodes within a cluster is highly.
Visualization of Biological Information with Circular Drawings.
Chapter 22 Electric Fields The Electric Field: The Electric Field is a vector field. The electric field, E, consists of a distribution of vectors,
Right-hand Rule 2 gives direction of Force on a moving positive charge Right-Hand Rule Right-hand Rule 1 gives direction of Magnetic Field due to current.
CORRELATION-REGULATION ANALYSIS Томский политехнический университет.
I NTRODUCTION TO G RAPH DRAWING Fall 2010 Battista, G. D., Eades, P., Tamassia, R., and Tollis, I. G Graph Drawing: Algorithms for the Visualization.
Algorithms and Networks
Graph Drawing.
Electric Force Unit 7.3.
ME 521 Computer Aided Design 15-Optimization
Craig Schroeder October 26, 2004
Haim Kaplan and Uri Zwick
Lecture 10 Biot-Savart’s Law.
Introduction Wireless Ad-Hoc Network
traveling salesman problem
Chapter 27 Magnetism HW #6 Due Monday, April 15
Electric Force Unit 11.2.
Presentation transcript:

I NTRODUCTION TO G RAPH DRAWING Fall 2010 Battista, G. D., Eades, P., Tamassia, R., and Tollis, I. G Graph Drawing: Algorithms for the Visualization of Graphs. 1st. Prentice Hall PTR.

F ORCE D IRECTED METHODS

F ORCE -D IRECTED M ETHODS Use a physical analogy to draw graphs View a graph as a system of objects with forces acting between them. Goal: Find a configuration of the objects or vertices with locally minimal energy Find a position for each object such that the sum of the forces on each object is zero.

E XAMPLE a)A graph where vertices have been replaced with electrically charged particles that repel each other and edges have been replaced by springs that connect particles and attract them. b)An equilibrium configuration, were the sum of the forces on each particle is zero. c)The interpretation of (b) as a straight-line drawing of the graph (a) (b) (c)

F ORCE -D IRECTED M ETHODS Vertex: Object of the system; Interacting with each other based on “some” force(s). Edge: A different type of object; Not interacting with each other; Add new force(s) to vertex object. Equilibrium configuration: the sum of forces on each vertex object is zero

D IFFERENT FD METHODS The model: a forced system defined by the vertices and edges which provides a physical model for the graph. The algorithm: the technique for finding a balance state of the force system, that is the position for each vertex such that the total force on every vertex is zero.

T HEY ARE POPULAR The physical analogy makes them easy to understand and easy to code. The result can be good.!!! They have been in use before applications in graph visualization, for pure mathematics and layout of printed circuit boards

S OME WELL - KNOWN FD METHODS Springs and electrical forces The Barycenter method Forces simulating graph theoretic distances Magnetic fields

S PRING AND ELECTRICAL FORCES Vertex: Electrically charged particles; Repel each other. Edge: Spring that connect particles; Attraction force when longer than the natural length; Repulsion force when shorter than the natural length. The model The algorithm

F ORCES ON EACH VERTEX The force on each vertex is the combination of spring forces and electrical forces: f follows the Hook’s low: it is proportional to the difference between the distance between u and v and the zero-energy length of the spring. g follows the inverse square low.

The x component of F(v): d ( p u, p v ) : Euclidian distance between p u and p v p v =( x v, y v ): the position of vertex v l uv : the natural (zero energy) length of the spring between u and v. (What if the spring has the length l uv ? ) :the stiffness of the spring between u and v :the strength of the electrical repulsion between u and v.

A IMS TO SATISFY AESTHETICS : The spring force between adjacent vertices is aimed to ensure that the distance between adjacent vertices u and v is approximately equal l uv. The electrical force aims to ensure that vertices should not be too close together One may choose parameters l uv, k (1) uv and k (2) uv to customize the appearance e of the drawing or to express semantic features of the graph.

G OAL OF THE ALGORITHM Find an equilibrium configuration of the forces that are on each vertex. Find a drawing in which the total force F(v) for each vertex v is zero. Find a drawing in which the energy is locally minimal with respect to the vertex positions.

H OW THIS A LGORITHM W ORK ? Regardless of the exact nature of the forces in the virtual physical system, force directed algorithms. Compute a locally minimum energy layout of the nodes. This is usually achieved by computing the forces on each node and iterating the system in discrete time steps. The forces are applied to each node and the positions are updated accordingly

S TEPS Vertices are initially placed at random locations At each iteration the force F(v) on each vertex v is computed Each vertex v is moved in the direction of F(v) by a small amount proportional to magnitude of F(v).

17 Layout Energy Initial (random) layoutFinal (nice) layoutIteration 1:Iteration 2:Iteration 3:Iteration 4:Iteration 5:Iteration 6:Iteration 7:Iteration 8:Iteration 9: FD G RAPH D RAWING Graph drawing = Energy minimization Hence, the drawing algorithm is an iterative optimization process

A DVANTAGES Relatively simple & easy to implement Good flexibility Smooth evolution of the drawing into the final configuration helps preserving the user’s mental map Can be extended to 3D Often able to display symmetries Works well in practice for small graphs with regular structure

D ISADVANTAGES Slow running time Results are acceptable, but not brilliant Few theoretical results on the quality of the drawings produced Difficult to extend to orthogonal & polyline drawings Limited constraint satisfaction capability

S CALING WITH L ARGE G RAPHS Traditional force-directed methods are limited to a few hundred nodes Problems when drawing large graphs: Visualization issue: not enough drawing area Cures: dynamic navigation, clustering, fish-eye view, hyperbolic space,… Algorithmic issue: convergence to a nice layout is too slow

2. B ARYCENTER M ETHOD Use springs with natural length 0, and attractive force proportional to the distance between vertices Pin down the vertices of the external face to form a given convex polygon (position constraint) Let the system go… The model The algorithm

A S A VARIATION OF THE PREVIOUS METHOD l uv = 0, k 1 u,v = 1, no electrical force 0 0 1

Partition V into two sets: fixed vertex (at least 3, nailed down) and free vertex To achieve equilibrium, choose p v so that F x (v) = 0 for all free vertices; Similarly, choose p v so that F y (v) = 0 for all free vertices. Therefore, Based on the definition of Barycenter: Where: deg(v) is the degree of v, N 0 (v): set of fixed neighbors of v ; N 1 (v): set of free neighbors of v.

The equations are linear. The number of equations and the number of unknown variables are both equal to the number of free vertices. Solving them equals to placing each free vertex at the barycenter of its neighbors. So the name ‘barycenter method’.

B ARYCENTER DRAW A LGORITHM Input: graph G=(V,E) Partition V=V 0 U V 1 (V 0 fixed vertices and V 1 free vertices) Strictly convex polygon P with |V 0 | vertices Output: A position p v for each vertex of V, such that the fixed vertices form a convex polygon P 1.Place each fixed vertex u in V 0 at a vertex of P and each free vertex in V 1 at the origin of P 2. Repeat For each free vertex v do 3. Until x v and y v converge for all free vertices v.

A N E XAMPLE OUTPUT OF THE ALGORITHM The energy of a drawing is the sum of the squares of the lengths of the edges.

F ORCE S IMULATING G RAPH T HEORETIC D ISTANCE Models graph theoretic distance with Euclidian distance. Let G=(V,E) be a connected graph and u,v in V, the Graph Theoretic Distance δ(u,v) of u and v is the number of edges on a shortest path between u and v The goal is to find a drawing in which, for each pair u,v of vertices, the Euclidian distance between u and v d(p u,p v ) is approximately proportional to δ(u,v) The system has the force proportional to: d(p u,p v )- δ(u,v) between vertices u and v. [Kamada Kawai 89] The model The algorithm

Potential energy in the spring between u and v : Kamada chooses Thus the energy in ( u,v ) is:

Energy in the whole drawing is the sum of these individual energies: The algorithm is looking for a position p v =(x v,y v ) for v to minimize η How?

H OW IT WORKS These equations are nonlinear, however, iterative approach can solve the equation At each step, a vertex is moved to a position that minimizes energy, while other vertices remain fixed Choose a vertex that has the largest force acting on it, that is

M AGNETIC F IELDS Variations: Some or all of the springs are magnetized There is a global magnetic field that acts on the spring Magnetic field can be used to control the orientation of edges Basic types of magnetic fields Parallel: all magnetic forces operate in the same direction Concentric: the force operates in concentric circles Radial: the forces operate radially outward from a point The model The algorithm [SM95]

The three basic magnetic fields can be combined encourage orthogonal edges with a combination of parallel forces in the horizontal & vertical directions The springs can be magnetized in two ways: Unidirectional: the spring tends to align with direction of the magnetic field Bidirectional: the spring tends to align with the magnetic field, but in either direction A spring may not be magnetized at all O PTIONS

The magnetic field induces a torsion or rotational force on the magnetic springs. For a unidirectionally magnetized spring representing ( u,v ), the force is proportional to: d(p u, p v )    Where: d(p u, p v ): Euclidean distance between p u and p v   : angle between the magnetic field and the line from p u to p v   and  are constant θ Unidirectional magnetic spring Direction of the magnetic field O PTIONS pupu pvpv

The magnetic forces are combined with the spring & electrical force Algorithm to find equilibrium: Vertices are positioned initially at random position and at each iteration the vertices move to positions with a lower energy Can handle directed graphs (unidirectional springs with one of the 3 fields) arcs point downward: downward parallel field Outward: radial field Counterclockwise: concentric field H OW IT WORKS

Can be applied to orthogonal drawings: combined vertical & horizontal field with bidirectional springs Applied with success to mixed graphs (graph with both directed & undirected edges)

T WO E XAMPLES Vertical magnetic field Vertical and horizontal magnetic field and

G ENERAL E NERGY F UNCTION Broaden the class of aesthetic criteria by including discrete energy function for example: The number of edge crossings The number of horizontal & vertical edges The number of bends in edges Solution: The linear combination of several types of energy: η i : a measure for an aesthetic criterion, may include spring, electrical or magnetic energy λ i : is a constant

Where: similar to electrical repulsion (vertices do not come too close together) r u, l u, t u, b u : Euclidean distance between vertex u and the four side lines of rectangular area (vertices do not come too close to the border of the screen) ensures that edges do not become too long η 4 : is the number of edge crossings in the drawing. E XAMPLE : ENERGY FUNCTION FOR STRAIGHT LINE DRAWINGS [ Davidson & Harel 96]

Flexibility of general energy function: allow variety of aesthetics by adjusting i [BBS97]: user can choose & adjust system parameters [Mendonca94]: how these coefficients can be automatically adjusted to user’s preference Main problem: computationally expensive to find a minimum energy state (very slow) simulated annealing [DH96]….. Genetic algorithm [BBS97]… Flexibility ensures popularity

[D AVIDSON & H AREL 96] SIMULATED ANNEALING Energy function takes into account vertex distribution, edge-lengths, and edge-crossings Given drawing region acts as wall Simulated annealing: flexible optimization technique Efficiency: very slow 30 nodes and 50 edges Able to deal with optimization problem in a discrete configuration space Aim: to minimize (or maximize) the cost function