drawing graphs with nonuniform nodes using potential fields

16
Drawing Graphs with Nonuniform Drawing Graphs with Nonuniform Nodes Using Potential Fields Nodes Using Potential Fields Jen-Hui Chuang Jen-Hui Chuang 1 , , Chun-Cheng Lin Chun-Cheng Lin 2 , Hsu-Ch , Hsu-Ch un Yen un Yen 2 1 Dept. of Computer and Information Science, Dept. of Computer and Information Science, National Chiao-Tung University, Taiw National Chiao-Tung University, Taiw an an 2 Dept. of Electrical Engineering, Dept. of Electrical Engineering, National Taiwan University, Taiwan National Taiwan University, Taiwan

Upload: phillip-todd

Post on 02-Jan-2016

26 views

Category:

Documents


0 download

DESCRIPTION

Drawing Graphs with Nonuniform Nodes Using Potential Fields. Jen-Hui Chuang 1 , Chun-Cheng Lin 2 , Hsu-Chun Yen 2 1 Dept. of Computer and Information Science, National Chiao-Tung University, Taiwan 2 Dept. of Electrical Engineering, National Taiwan University, Taiwan. Outline. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Drawing Graphs with Nonuniform Nodes Using Potential Fields

Drawing Graphs with Nonuniform NoDrawing Graphs with Nonuniform Nodes Using Potential Fieldsdes Using Potential Fields

Jen-Hui ChuangJen-Hui Chuang11, , Chun-Cheng LinChun-Cheng Lin22, Hsu-Chun Yen, Hsu-Chun Yen22

11 Dept. of Computer and Information Science, Dept. of Computer and Information Science,National Chiao-Tung University, TaiwanNational Chiao-Tung University, Taiwan

22 Dept. of Electrical Engineering, Dept. of Electrical Engineering,National Taiwan University, TaiwanNational Taiwan University, Taiwan

Page 2: Drawing Graphs with Nonuniform Nodes Using Potential Fields

OutlineOutline

IntroductionIntroduction Force-directed Method using Force-directed Method using

Potential FieldsPotential Fields Experimental ResultsExperimental Results ConclusionConclusion

Page 3: Drawing Graphs with Nonuniform Nodes Using Potential Fields

DefinitionDefinition

GraphGraph– G = ( V, E )G = ( V, E )

V : the set of nodesV : the set of nodes E : the set of edgesE : the set of edges

Graph with nonuniform nodesGraph with nonuniform nodes– G = ( P, E )G = ( P, E )

P : the set of nonuniform nodesP : the set of nonuniform nodes– 2D: polygon2D: polygon– 3D: polyhedron3D: polyhedron

Page 4: Drawing Graphs with Nonuniform Nodes Using Potential Fields

MotivationMotivation

In practice, entities (nIn practice, entities (nodes) may not be zerodes) may not be zero-sized.o-sized.

Harel and Koren, 2002Harel and Koren, 2002– Propose two methods tPropose two methods t

o draw this kind of grapo draw this kind of graphshs Elliptic spring methodElliptic spring method Modified spring methoModified spring metho

dd– Not considering degree Not considering degree

of inclination of each nof inclination of each nonuniform nodeonuniform node

Page 5: Drawing Graphs with Nonuniform Nodes Using Potential Fields

Force-directed methodForce-directed method( a.k.a. Spring ( a.k.a. Spring algorithm )algorithm )

– Nodes → Nodes → chargescharges

→ → repulsive repulsive forceforce

– Edges → Edges → springssprings

→ → attractive attractive forceforce

let it go

Page 6: Drawing Graphs with Nonuniform Nodes Using Potential Fields

Extended force-directed Extended force-directed methodmethod

– Nonuniform nodesNonuniform nodes→ → uniformly chargeduniformly charged→ → repulsive forcerepulsive force

& torque& torque

– EdgesEdges→ → springssprings→ → attractive forceattractive force

& torque& torque

Page 7: Drawing Graphs with Nonuniform Nodes Using Potential Fields

Our ModelOur Model

3 formulas in our model3 formulas in our model– Attractive force ( spring force )Attractive force ( spring force )

ffaa( ( dd ) = ) = CC1 × log ( 1 × log ( dd / / CC2 )2 )

– Repulsive forceRepulsive force

– TorqueTorque

Page 8: Drawing Graphs with Nonuniform Nodes Using Potential Fields

Potential Field MethodPotential Field Method

Motion planning or Path planningMotion planning or Path planning ( Chuang and Ahuja, 1998)( Chuang and Ahuja, 1998)

++

+++++

+++++

+++

+ + ++ ++ +

+

++

++

++

+

++

S

G

Page 9: Drawing Graphs with Nonuniform Nodes Using Potential Fields

The repulsive force on each border line bi of Bdue to A

A

B

2-D force model2-D force model((Chuang and AhujaChuang and Ahuja, 1998 ), 1998 )

rV

1 413121111 abababab

r ffffFb

A

B

a1

a2

a3

a4

b1

The potential at a pointdue to a point charge 2

1

1a

a rVThe potential at a point

due to a line segment charge

1

2 0 32 ')'()(

'1

u

u

d

u duduuur

uuaF

The repulsive forcebetween two line segments

433323133

423222122

ababababrb

ababababrb

ffffF

ffffF

b2

b3The repulsive force on border line b1

due to A

rrrrB bbb FFFF 321 The repulsive force on B due to A

The repulsive torque on B due to A rrrrB bbb TTTT 321

The attractive force on B due to A

The attractive torque on B due to A

aaaB ffF 21 aBT

The repulsive force on B due to A

= Σ ( The repulsive force on each border line of B due to A )

= Σ Σ ( The repulsive force on each border line of B due to each border line of A )

Page 10: Drawing Graphs with Nonuniform Nodes Using Potential Fields

3-D force model3-D force model(Chuang, 1998 )(Chuang, 1998 )

Assume that the potential is inversely proportional tothe distance of the third order.The potential at a point due to a surface is expressed as

z

zylxzylxR

dS

iiiiiiiii

S

),,(),,( 3,3,3

222

13 tan

1),,(

zyxy

xz

zzyxwhere

2222222

22

2

222

1

3

2222222

2223

22222

3

))((

)(tan

,))((

)2(,

)(

zyxzyyxz

yxxy

z

zyxy

xz

z

zyxzyyx

zyxx

yzyxyx

y

xwhere

zi

iiiiiiiiizyx iz

zylxzylxffff 2,3,3 ,,(),,(),,(

The force at a point due to a surface is formulated as

Those functions are analytically tractable.

AB

The force at a point due to the polyhedron A is formulated as

6

1jj

ri fF

The repulsive force on B due to A is formulated as

)pointssampling(#

1i

rrB i

FF

The repulsive force on B due to A

= Σ ( The repulsive force on each sampling point of B due to A )

= Σ Σ ( The repulsive force on each sampling point of B due to each surface of A )

Page 11: Drawing Graphs with Nonuniform Nodes Using Potential Fields

2-D Mesh structure2-D Mesh structure

Initial drawing Final drawing

Page 12: Drawing Graphs with Nonuniform Nodes Using Potential Fields

3-D Cases3-D Cases

(A) Mesh. (B) Cube.

(D) Hypercube.(C) Flower.

Page 13: Drawing Graphs with Nonuniform Nodes Using Potential Fields

Application to Clustered Application to Clustered GraphsGraphs

Page 14: Drawing Graphs with Nonuniform Nodes Using Potential Fields

Application to Clustered Application to Clustered Graphs (cont)Graphs (cont)

Advantage of our approachAdvantage of our approach– Suppose new nodes are added to or Suppose new nodes are added to or

deleted from a clustered graph.deleted from a clustered graph.

Instead of running the drawing algorithm Instead of running the drawing algorithm on the new graph on the new graph all over againall over again,,

our approach allows us to our approach allows us to keep the internal keep the internal drawings of those unaffected clusters drawings of those unaffected clusters intactintact, while the redrawing only need to be , while the redrawing only need to be applied to a much smaller graph,applied to a much smaller graph,

giving rise to a much better performancegiving rise to a much better performance

Page 15: Drawing Graphs with Nonuniform Nodes Using Potential Fields

ConclusionConclusion

A potential-based approach, coupled with A potential-based approach, coupled with a force-directed method, has been a force-directed method, has been proposed and implemented for drawing proposed and implemented for drawing graphs with nodes of different sizes and graphs with nodes of different sizes and shapesshapes

The formulas are analytically tractable, The formulas are analytically tractable, making our algorithm computationally making our algorithm computationally efficientefficient

An application to clustered graphs has An application to clustered graphs has been proposedbeen proposed

Page 16: Drawing Graphs with Nonuniform Nodes Using Potential Fields

The EndThe End

Thank you~Thank you~