Post on 02-Jan-2016
description
transcript
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
OutlineOutline
IntroductionIntroduction Force-directed Method using Force-directed Method using
Potential FieldsPotential Fields Experimental ResultsExperimental Results ConclusionConclusion
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
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
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
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
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
Potential Field MethodPotential Field Method
Motion planning or Path planningMotion planning or Path planning ( Chuang and Ahuja, 1998)( Chuang and Ahuja, 1998)
++
+++++
+++++
+++
+ + ++ ++ +
+
++
++
++
+
++
S
G
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 )
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 )
2-D Mesh structure2-D Mesh structure
Initial drawing Final drawing
3-D Cases3-D Cases
(A) Mesh. (B) Cube.
(D) Hypercube.(C) Flower.
Application to Clustered Application to Clustered GraphsGraphs
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
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
The EndThe End
Thank you~Thank you~