300 likes | 779 Views
Spatial Graph Grammar and Application. Meikang Qiu Department of Computer Science The University of Texas at Dallas Email: qiumeikang@utdallas.edu. Table of Content. Introduction Spatial Graph Grammar Application Future Work and Conclusion. 1. Introduction .
E N D
Spatial Graph Grammar and Application Meikang Qiu Department of Computer Science The University of Texas at Dallas Email:qiumeikang@utdallas.edu
Table of Content • Introduction • Spatial Graph Grammar • Application • Future Work and Conclusion
1. Introduction • An overview of visualization - Visualization refers to the representation of ideas and concepts in some meaningful and intuitive formats. -The power of information visualization has become synonymous with percept ualization and a novel mode of communication. But …
A graph grammar formalism • The “Reserved Graph Grammar” (RGG) formalism defines context-sensitive graph grammars for diagrammatic visual languages. • It is expressive in defining various types of graph formalisms; and efficient in parsing most types of graphs. D-Q. Zhang and K. Zhang, and J. Cao, A Context-Sensitive Graph Grammar Formalism for the Specification of Visual Languages, The Computer Journal, Oxford University Press, Vol.44, No.3, 2001, 186-200.
Museum Direct Hall Name Hall Item Item Topic Topic Photo Demo Name Photo Name Demo XMLtreeformuseumstructure
Node structure super-vertex M Hall T B I vertex
The node-edge form of the Museum XML tree Museum D H N Name Hall M M Direction M Hall M T I T I Topic H Item H Topic H Item H P D P D N N Name I Photo I Demo I Name I Photo I Demo I
A production’s L-application and R-application L-application: find in the host graph a match to the left graph, and then replace the match by the right graph. L-application defines the language. R-application: find in the host graph a match to the right graph, and then replace the match by the left graph. R-application is used to parse a graph and validate whether the graph belongs to the language.
mark right graph left graph A graph rewriting rule (production) in RGG 1:M 1:M Hall[1] Hall[1] 3:T 2:I 3:T 2:I := H par Item 4:N 5:P 6:D 4:N 5:P 6:D
A grammar specifying the Museum XML and its transformation to a multimedia representation <2> Museum-Hall <1> Museum Museum[1] Museum[1] smil 3:N 2:D 1:H 1:H 3:N 2:D Museum[1] := := 3:N 2:D 1:H M body div head Hall[2] N D H T I T I <3> Museum-Name-Direction Museum[1] Museum[1] 1:H D N 2:D 1:H 3:N := M M h1[2] img[3] Name[2] Direction[3]
smil body layout img div h1 div par par h2 h2 img video img video h3 h3 SMIL tree for multimedia museum representation
A grammar specifying the Museum XML and its transformation to a multimedia representation <5> Hall-Item <4> Hall-Topic 1:M M 1:M M Hall[1] Hall[1] Hall[1] Hall[1] 3:T 2:D 3:T 2:D 3:T 2:D T 2:D := := H par I Item[2] h3 Topic P D N N P D <6> Item-Name-Photo-Demo 1:H H Item[1] Item[1] N P D 4:N 3:P 2:D := I I I video[4] h3[2] img[3] Demo[4] Photo[3] Name[2]
Graph transformations from Museum XML to SMIL <3> Museum <4> <5> Museum Direction Name Hall img Hall h1 Hall Hall Item h2 Item Item Topic h2 Item Topic video video img Photo h3 Demo img Name h3 Photo Name Demo <6> <6> (b) (a) smil <1> Museum <2> head body Hall img h1 Hall div img h1 div par h2 par h2 par par h2 h2 video video img h3 img h3 video video img h3 img h3 (c) (d)
2. Spatial Graph Grammar • How to represent the information of direction, distance and size? • Direction Specification • Distance Specification • Size Specification
NW N NE E1 W C E2 S SE SW Direction Specification • The central area : the super vertex itself. • the eight areas : eight directions • Each of these directions indicates relative position of the node connected to the current node.
A B a b A B c d Alignment Relation • use dark bolded line segment ----the part that at same horizontal ( vertical ) level
Distance Specification • Three dynamic relations between two nodes • Postfix “+” on vertex label :distance increase • Postfix “-” for distance decrease • Postfix blank for no distance change • Distance > zero B- A-
A B a b A B c d Touch and Untouch relation • Untouched: Distance > Zero • Touched: Distance == Zero • use dotted line: for the touched parts
Overlap and Partial Overlap • Distance < zero • Overlap :The node under (use dotted line) A B B A
A B a b A B c Overlap and Partial Overlap • partial overlap : overlapped part of under node (use dotted line)
Contain Relation • Distance < |Ra-Rb| • Draw the node inside by dark bolded line. B A
Size Specification • use “+” in center grid of a node: enlarge • Use “-“ for shrink the size • no sign: node size will not be changed. - + A B
3. Application 1). Transforming Web Graphics for Mobile Devices • rapid development of Internet more graphs to be delivery on the Web • Client: varying screen size, style preference • mobile device: PDA (Personal Digital Assistants) layout need to be changed
A A B C B C (a) (b) A B C (a) A B C (b) Web Transformation • From Web page mobile interface
Pics <2> <1> Title := <3> 1 Link Links Content Doc Doc := 1 Link := 1 2 Head Link 2 <4> 2 1 := Links Link 2 1 <5> S-Title 1 Section := End 2 Head 1 <7> 1 <6> Section 1 Section := Content 1 Section := 2 Section 2 End Figure 7 Graph grammar S-Con 2 Transformation Rule
4.Future Work And Conclusion • Animation : interactive communication dynamic capture and access, authoring time and spatial specifications • Temporal Aspects: during, before, meet Relations Temporal specifications determine the sequence of presentation
Conclusion • Extended context-sensitive graph grammar formalism with spatial specifications • The parsing algorithm of SGG has polynomial time complexity in most cases • The parser performs an automatic validation on the layout structure
Conclusion • SGG: wide range of applications - web page layout transformation - multimedia interfaces - electronic publishing - XML document conversion