new method to optimize force-directed layouts of large graphs meva dodo, fenohery andriamanampisoa,...

15
New method to optimize Force- directed layouts of large graphs Meva DODO, Fenohery ANDRIAMANAMPISOA, Patrice TORGUET, Jean Pierre JESSEL IRIT University of Toulouse WSCG 2008

Upload: brendan-griffith

Post on 12-Jan-2016

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: New method to optimize Force-directed layouts of large graphs Meva DODO, Fenohery ANDRIAMANAMPISOA, Patrice TORGUET, Jean Pierre JESSEL IRIT University

New method to optimize Force-

directed layouts of large graphs

Meva DODO, Fenohery ANDRIAMANAMPISOA, Patrice TORGUET, Jean Pierre JESSEL

IRITUniversity of Toulouse

WSCG 2008

Page 2: New method to optimize Force-directed layouts of large graphs Meva DODO, Fenohery ANDRIAMANAMPISOA, Patrice TORGUET, Jean Pierre JESSEL IRIT University

Introduction

Category of graph drawing algorithms : Hierarchical algorithms that distribute nodes according to their

hierarchy Algorithms based on physical models

Main idea : Optimizing the layout by equitably distributing vertices in space Using a numerical optimization to compute the final position of

vertices

Page 3: New method to optimize Force-directed layouts of large graphs Meva DODO, Fenohery ANDRIAMANAMPISOA, Patrice TORGUET, Jean Pierre JESSEL IRIT University

Problem

Different strategies to draw general undirected graph [Ead84a]:

Planar embedding algorithm Using an Eulerian path and use a directed graph drawing algorithm Force-directed algorithms

Spring Model:

Most popular force-directed algorithm, originally developed by Eades[Ead84a], improved by Kamada [Kam89a]

Vertices are initially assigned random position and a system of differential equations is solved to find the state with the minimum energy

Page 4: New method to optimize Force-directed layouts of large graphs Meva DODO, Fenohery ANDRIAMANAMPISOA, Patrice TORGUET, Jean Pierre JESSEL IRIT University

ProblemTotal energy of the system :

2

1

1

1

2/1

n

ij

ijjiij

n

i

lppkE

ijl : the natural length between pi and pj

ijk : the strength of the spring between pi and pj

Two methods to minimize E:

Using a simulation of repulsive and attractive forces

Resolving a system of differential equations

Page 5: New method to optimize Force-directed layouts of large graphs Meva DODO, Fenohery ANDRIAMANAMPISOA, Patrice TORGUET, Jean Pierre JESSEL IRIT University

Solution

Methods combined with Force-directed algorithms : Multilevel technique [Wal03a]: coalesces clusters of vertices to

define a new graph and recursively iterates this procedure to create a hierarchy of increasingly coarse graphs:

MIS (Maximal Independent Set) [Gaj04a]: to create a filtration of vertices of the given graph:

Multi-grid technique of [Fru91a] that allows a portion of graph to be moved

[Dav96a], [Har02a], …

VVVV k10

GGG k,,10

Page 6: New method to optimize Force-directed layouts of large graphs Meva DODO, Fenohery ANDRIAMANAMPISOA, Patrice TORGUET, Jean Pierre JESSEL IRIT University

Our approach

1 - Vertices distribution approachAesthetic criteria :

An equitable distribution of vertices No collision between vertices Minimization of unused space

S0

S01

S02S03

Node2

Node1Node3

Area

Initial sphere

sub-sphere

Page 7: New method to optimize Force-directed layouts of large graphs Meva DODO, Fenohery ANDRIAMANAMPISOA, Patrice TORGUET, Jean Pierre JESSEL IRIT University

Our approach

2 – Attractive forces, repulsive forces

Force applied to a vertex :

ri

aii FFF

aiF Attractive

forceriF Repulsive

forceFinal state of the system is found

when :0

..0..0

ni

ri

ai

ni

i FFF

CentrePceDisnF iai ,tan*

n

ijj

jiri PPceDisRadiusF

,1

,tan

Page 8: New method to optimize Force-directed layouts of large graphs Meva DODO, Fenohery ANDRIAMANAMPISOA, Patrice TORGUET, Jean Pierre JESSEL IRIT University

Our approach

3 – Total energy

According to Kamada & Kawai:

n

i

i

n

ijandj

ji CentrePceDisnPPceDisRadiusE1

2

1

2 ),(tan),(tan21

n

i

iii

n

ijandjjijijijijiji

czzncyyncxxn

zzyyxxRadiuszzyyxxRadiusE

1 222

1

2222222 2

2

1

Page 9: New method to optimize Force-directed layouts of large graphs Meva DODO, Fenohery ANDRIAMANAMPISOA, Patrice TORGUET, Jean Pierre JESSEL IRIT University

Our approach

3 – Total energy

Pi(xi, yi, zi) the initial position of vertex i,

We need to find P’i(x’i, y’i, z’i) the final position of vertex i which minimizes E,

Ti(txi, tyi, tzi) the translation of Pi,

x’i=xi+txi , y’i=yi+tyi, z’i=zi+tz

n

i

iiiiii

n

ijandj jjiijjiijjii

jjiijjiijjii

cztzzncytyyncxtxxn

tzztzztyytyytxxtxxRadius

tzztzztyytyytxxtxxRadius

E1

222

1222

2222

22

1

Page 10: New method to optimize Force-directed layouts of large graphs Meva DODO, Fenohery ANDRIAMANAMPISOA, Patrice TORGUET, Jean Pierre JESSEL IRIT University

Our approach

4 – Minimizing total energy, conjugated gradient[Fle64a]

Final state of the system:

Where Xi = xi+txi, Xj = xj+txj, Yi = yi+tyi, Yj = yj+tyj, Zi = zi+tzi, Zj = zj+tzj

0

iii tzE

tyE

txE

ji

n

ijandj jijiji

jiji

i

ji

n

ijandj jijiji

jiji

i

ji

n

ijandj jijiji

jiji

i

ZZnZZYYXX

ZZRadiusZZ

tz

E

YYnZZYYXX

YYRadiusYY

ty

E

XXnZZYYXX

XXRadiusXX

tx

E

1222

1222

1222

Page 11: New method to optimize Force-directed layouts of large graphs Meva DODO, Fenohery ANDRIAMANAMPISOA, Patrice TORGUET, Jean Pierre JESSEL IRIT University

AlgorithmInitialisation : Assign random placement of vertices (xi, yi, zi), initialize the translations to zero (txi, tyi, tzi)

Compute the gradients of E for all (tx i,tyi, tzi) and compute Δi

Find the vertex m with Δm ≥ Δi

Δm > ε

Compute the optimal translation for the vertex m through the conjugated gradient

Compute the gradients of E for all (tx i, tyi, tzi) and compute Δi with the new translation value of vertex m

Find the vertex m with Δm ≥ Δi , i=1...n

i=1...n

i=1...n

True

End

False

i=1...n

Page 12: New method to optimize Force-directed layouts of large graphs Meva DODO, Fenohery ANDRIAMANAMPISOA, Patrice TORGUET, Jean Pierre JESSEL IRIT University

Application and Results

3D Simulation of large graphs: trees, undirected graph

3D Visualization of network computing system, data structures, databases

15 vertices

110 vertices (0.30s)

660 vertices (2.0s)

1051 vertices (2.0s)

Page 13: New method to optimize Force-directed layouts of large graphs Meva DODO, Fenohery ANDRIAMANAMPISOA, Patrice TORGUET, Jean Pierre JESSEL IRIT University

Result of the computation for the first hierarchy

Result of the computation for the second hierarchy. Each vertex in the first hierarchy has 15 vertices children

Result of the computation for the third hierarchy. Each vertex in the first hierarchy has 15 vertices children

Application and Results

Page 14: New method to optimize Force-directed layouts of large graphs Meva DODO, Fenohery ANDRIAMANAMPISOA, Patrice TORGUET, Jean Pierre JESSEL IRIT University

Conclusion and Future work

Minimization of edges crossing

No collision between vertices

Minimization of unused space

Efficient energy function

Introducing the notion of vertex weight to subdivide the space

Improving the numerical optimization for drawing hypergraphs

Page 15: New method to optimize Force-directed layouts of large graphs Meva DODO, Fenohery ANDRIAMANAMPISOA, Patrice TORGUET, Jean Pierre JESSEL IRIT University

End

Questions ?

www.irit.fr