1#!/bin/csh 2# 3# SCCS-info %W% %E% 4# $Id: demo.csh.tpl,v 1.9 1994/08/09 09:17:11 sander Exp sander $ 5# 6# ====================== Change area ============================ 7 8alias OUTP /bin/echo 9 10# ================== End of Change area ========================= 11 12OUTP "Configuring ..." 13 14set mvcgn = "../src/xvcg" 15 16if (! -x $mvcgn) then 17 set mvcgn = "`echo $BINDIR`xvcg" 18endif 19if (! -x $mvcgn) then 20 set mvcgn = "/usr/local/bin/xvcg" 21endif 22if (! -x $mvcgn) then 23 set mvcgn = "xvcg" 24endif 25if (! -x $mvcgn) then 26 OUTP "Sorry, I cannot find a " $mvcgn 27 exit 1 28endif 29 30OUTP "Vcg is" $mvcgn 31 32OUTP "" 33loop: 34 OUTP "Please select the window system." 35 OUTP "If the VCG tool has problems with colors on " 36 OUTP "your display installation, please select a " 37 OUTP "monochromatic version even on a color screen." 38 OUTP "1 : X11 with colors 2 : Sunview with colors " 39 OUTP "3 : X11 monochromatic 4 : Sunview monochromatic" 40 set wsys = $< 41 switch ($wsys) 42 case 1: 43 alias MYVCG $mvcgn -geometry 700x700+20-20 44 breaksw 45 case 2: 46 alias MYVCG $mvcgn 47 breaksw 48 case 3: 49 alias MYVCG $mvcgn -geometry 700x700+20-20 -nocolors 50 breaksw 51 case 4: 52 alias MYVCG $mvcgn -nocolors 53 breaksw 54 default: 55 OUTP "" 56 OUTP "*** invalid input ***" 57 goto loop 58 endsw 59 60set mycat = "/bin/cat" 61set myrm = "/bin/rm" 62set mysleep = "/bin/sleep" 63set mysed = "/bin/sed" 64set mywc = "/bin/wc" 65set mygrep = "/bin/fgrep" 66set myclear = "/bin/clear" 67 68alias CAT $mycat 69alias RM $myrm 70alias SLEEP $mysleep 71alias SED $mysed 72alias WCNT $mywc 73alias GREP $mygrep 74alias CLEAR $myclear 75 76 77OUTP 78OUTP "Cleanup ..." 79OUTP "Test" > demoaaa.vcg 80OUTP "Test" > animaaa.vcg 81OUTP "Test" > rbtreeaaa.vcg 82RM demo*.vcg anim*.vcg rbtree*.vcg 83 84OUTP "" 85OUTP "Press Carriage Return key to start the demonstration ..." 86set f = $< 87if ("$f" == "QUIT") goto finishup 88 89CLEAR 90OUTP "DEMONSTRATION OF THE VCG TOOL" 91OUTP "=============================" 92OUTP "" 93OUTP "Welcome to a tour around the VCG tool ..." 94OUTP "" 95OUTP "NOTE: you can leave the tour at any point by answering" 96OUTP " QUIT (uppercase) on a request of input." 97 98OUTP "" 99OUTP "In the following, we will show several visualizations" 100OUTP "from different applications. Not all features of the " 101OUTP "VCG tool can be demonstrated, but the important once." 102OUTP "Some of the demonstrations are generated by the program" 103OUTP "vcgdemomaker, others are from the directory expl, others" 104OUTP "are animations." 105OUTP "" 106OUTP "To go from one demonstration to the next demonstration," 107OUTP "you should finish the VCG tool by pressing the key q " 108OUTP "or selecting the menu item Quit." 109OUTP "The menu is shown when pressing the (left) mouse button" 110OUTP "in the VCG window." 111OUTP "Press Carriage Return key to continue ..." 112 113set f = $< 114if ("$f" == "QUIT") goto finishup 115 116OUTP "The keyboard commands of the VCG tool are:" 117OUTP "" 118OUTP " q - quit the VCG tool" 119OUTP " r - show or hide the ruler" 120OUTP " f - load another file" 121OUTP " g - reload the same file" 122OUTP " l - display/hide labels of edges" 123OUTP " 1..9 - hide/expose corresponding edge class" 124OUTP " i or I or J - show info fields of nodes" 125OUTP "" 126OUTP "Press Carriage Return key to continue ..." 127set f = $< 128if ("$f" == "QUIT") goto finishup 129OUTP "" 130OUTP "Scrolling commands:" 131OUTP "" 132OUTP " a " 133OUTP " d c (arrow keys) - scroll to the left/right/up/down" 134OUTP " b " 135OUTP " o - go to the origin (0,0) " 136OUTP " p - pick position with the mouse" 137OUTP " P - enter position by co-ordinates" 138OUTP " n - position such that a node is centered" 139OUTP " e - follow an edge (center target/source)" 140OUTP "" 141OUTP "Scaling commands" 142OUTP "" 143OUTP " + or = - stretch " 144OUTP " - or _ - shrink " 145OUTP " 0 - (null) set scale factor to normal" 146OUTP "" 147OUTP "" 148OUTP "Press Carriage Return key to start ..." 149set f = $< 150if ("$f" == "QUIT") goto finishup 151 152CLEAR 153OUTP "Example from the sociology: Theory of civilisation" 154OUTP "--------------------------------------------------" 155OUTP "This graph shows the dependencies between the " 156OUTP "invention of wheels, the modern comunism and the " 157OUTP "computer science, etc." 158OUTP "The following graph is scaled by a factor 0.5 and" 159OUTP "uses the layoutalgorithm MINBACKWARD (-D0)." 160OUTP "Other possible layoutalgorithms are MINDEPTH, MAXDEPTH" 161OUTP "and TREE (-D-, -D+ and -Dtree) and many more." 162OUTP "" 163vcgcount < ../expl/civ.vcg 164OUTP "" 165OUTP "Remind: most important keybord commands of vcg" 166OUTP " q - quit the VCG tool" 167OUTP " a " 168OUTP " d c (arrow keys) - scroll to the left/right/up/down" 169OUTP " b " 170OUTP " + - stretch " 171OUTP " - - shrink " 172OUTP "" 173OUTP "After the visualization of this, press q into " 174OUTP "the VCG window to go to the next demonstration." 175 176OUTP "Press Carriage Return key to start visualization ..." 177set f = $< 178if ("$f" == "QUIT") goto finishup 179 180MYVCG ../expl/civ.vcg 181 182CLEAR 183OUTP "Example: Color test" 184OUTP "-------------------" 185OUTP "This examples shows the default colors that are available." 186OUTP "If your X11 installation has problems with colors, " 187OUTP "use -nocolors. In this case, or if the display is " 188OUTP "monochrom, you will not see the colors." 189OUTP "" 190vcgcount < ../expl/colors.vcg 191OUTP "" 192OUTP "Remind: most important keybord commands of vcg" 193OUTP " q - quit the VCG tool" 194OUTP " a " 195OUTP " d c (arrow keys) - scroll to the left/right/up/down" 196OUTP " b " 197OUTP " + - stretch " 198OUTP " - - shrink " 199OUTP "" 200OUTP "After the visualization of this, press q into " 201OUTP "the VCG window to go to the next demonstration." 202 203OUTP "Press Carriage Return key to start visualization ..." 204set f = $< 205if ("$f" == "QUIT") goto finishup 206 207MYVCG ../expl/colors.vcg 208 209CLEAR 210OUTP "Example: More Colors" 211OUTP "--------------------" 212OUTP "This examples show how to access to the color map." 213OUTP "Up to 256 colors can be used at the same time." 214OUTP "It is even possible to replace the default colors by" 215OUTP "other red/green/blue values." 216OUTP "" 217vcgcount < ../expl/morecol.vcg 218OUTP "" 219OUTP "Remind: most important keybord commands of vcg" 220OUTP " q - quit the VCG tool" 221OUTP " a " 222OUTP " d c (arrow keys) - scroll to the left/right/up/down" 223OUTP " b " 224OUTP " + - stretch " 225OUTP " - - shrink " 226OUTP "" 227OUTP "After the visualization of this, press q into " 228OUTP "the VCG window to go to the next demonstration." 229 230OUTP "Press Carriage Return key to start visualization ..." 231set f = $< 232if ("$f" == "QUIT") goto finishup 233 234MYVCG ../expl/morecol.vcg 235 236 237CLEAR 238OUTP "Example: Character set" 239OUTP "----------------------" 240OUTP "The VCG tool uses a fully scalable character set. This character" 241OUTP "set is compatible to the ISO Latin 1 PostScript Encoding Vector" 242OUTP "and contains the special national characters for the most" 243OUTP "European and North American countrys." 244OUTP "If the computer system does not support 8 Bit character codes," 245OUTP "the special characters can be accessed by ISO code escapes." 246OUTP "For instance, \\fi252 is the german umlaut ue." 247OUTP "Next, we will see the character set." 248OUTP "" 249OUTP "Remind: most important keybord commands of vcg" 250OUTP " q - quit the VCG tool" 251OUTP " a " 252OUTP " d c (arrow keys) - scroll to the left/right/up/down" 253OUTP " b " 254OUTP " + - stretch " 255OUTP " - - shrink " 256OUTP "" 257OUTP "After the visualization of this, press q into " 258OUTP "the VCG window to go to the next demonstration." 259 260OUTP "Press Carriage Return key to start visualization ..." 261set f = $< 262if ("$f" == "QUIT") goto finishup 263 264MYVCG ../expl/charset.vcg 265 266 267CLEAR 268OUTP "Example: Form test" 269OUTP "------------------" 270OUTP "This examples shows the different forms of nodes and" 271OUTP "edges that are available." 272OUTP "Nodes can be stretched and shrinked individually," 273OUTP "width, height, textmode and border can be set to " 274OUTP "many values. Edges can be dashed or dotted, at " 275OUTP "different sizes with different arrow sizes." 276OUTP "" 277vcgcount < ../expl/forms.vcg 278OUTP "" 279OUTP "Remind: most important keybord commands of vcg" 280OUTP " q - quit the VCG tool" 281OUTP " a " 282OUTP " d c (arrow keys) - scroll to the left/right/up/down" 283OUTP " b " 284OUTP " + - stretch " 285OUTP " - - shrink " 286OUTP "" 287OUTP "After the visualization of this, press q into " 288OUTP "the VCG window to go to the next demonstration." 289 290OUTP "Press Carriage Return key to start visualization ..." 291set f = $< 292if ("$f" == "QUIT") goto finishup 293 294MYVCG ../expl/forms.vcg 295 296CLEAR 297OUTP "Example: More forms" 298OUTP "-------------------" 299OUTP "This examples shows further forms of nodes and" 300OUTP "edges that are available: boxes, ellipses, rhombs" 301OUTP "and triangles." 302OUTP "" 303vcgcount < ../expl/forms2.vcg 304OUTP "" 305OUTP "Remind: most important keybord commands of vcg" 306OUTP " q - quit the VCG tool" 307OUTP " a " 308OUTP " d c (arrow keys) - scroll to the left/right/up/down" 309OUTP " b " 310OUTP " + - stretch " 311OUTP " - - shrink " 312OUTP "" 313OUTP "After the visualization of this, press q into " 314OUTP "the VCG window to go to the next demonstration." 315 316OUTP "Press Carriage Return key to start visualization ..." 317set f = $< 318if ("$f" == "QUIT") goto finishup 319 320MYVCG ../expl/forms2.vcg 321 322 323CLEAR 324OUTP "Example: Ports and Arrow Modes" 325OUTP "------------------------------" 326OUTP "Edge arrows appear at the port of nodes. Port sharing" 327OUTP "means that multiple edges may be adjacent to one port." 328OUTP "This occurs, if the arrows of all these edges have the" 329OUTP "same visual appearance (size, color, ...)." 330OUTP "If we use port sharing, it is recommended to use only" 331OUTP "a fixed set of rotated arrows. Otherwise, the port looks" 332OUTP "like a thick spot since all arrows are differently rotated" 333OUTP "and overlap. This is the arrow mode 'fixed'." 334OUTP "If we don't use port sharing, arrows can be rotated individually." 335OUTP "This is the arrow mode 'free'." 336OUTP "" 337OUTP "Next, we see four times the same graph. At the left examples," 338OUTP "we use port sharing, but at the right examples, there is no" 339OUTP "port sharing. At the upper examples, we use arrow mode fixed," 340OUTP "and at the lower examples, we use arrow mode free." 341OUTP "" 342vcgcount < ../expl/pshar1.vcg 343OUTP "" 344OUTP "Remind: most important keybord commands of vcg" 345OUTP " q - quit the VCG tool" 346OUTP " a " 347OUTP " d c (arrow keys) - scroll to the left/right/up/down" 348OUTP " b " 349OUTP " + - stretch " 350OUTP " - - shrink " 351OUTP "" 352OUTP "After visualization of this, first, press q into" 353OUTP "the VCG windows at the left sides." 354OUTP "Then, press q into the right VCG windows to go to " 355OUTP "the next demonstration." 356 357OUTP "Press Carriage Return key to start visualization ..." 358set f = $< 359if ("$f" == "QUIT") goto finishup 360 361MYVCG -silent ../expl/pshar1.vcg & 362SLEEP 2 363MYVCG -silent ../expl/pshar3.vcg & 364SLEEP 2 365MYVCG -silent ../expl/pshar2.vcg & 366SLEEP 2 367MYVCG ../expl/pshar4.vcg 368SLEEP 1 369 370 371 372CLEAR 373OUTP "Example: A diagram" 374OUTP "------------------" 375OUTP "This examples shows the influences of different computer" 376OUTP "systems in the context of the development of the computer" 377OUTP "Xerox Star (see Johnson, Roberts, e.a.: The Xerox Star," 378OUTP "a Retrospective, IEEE Computer; 11-29, Sept. 1989)." 379OUTP "We did some changes in the diagram in order to show the " 380OUTP "possibilities of visualization, but not in order to " 381OUTP "clarify information in the diagram." 382OUTP "" 383vcgcount < ../expl/xerox.vcg 384OUTP "" 385OUTP "Remind: most important keybord commands of vcg" 386OUTP " q - quit the VCG tool" 387OUTP " a " 388OUTP " d c (arrow keys) - scroll to the left/right/up/down" 389OUTP " b " 390OUTP " + - stretch " 391OUTP " - - shrink " 392OUTP "" 393OUTP "After the visualization of this, press q into " 394OUTP "the VCG window to go to the next demonstration." 395 396OUTP "Press Carriage Return key to start visualization ..." 397set f = $< 398if ("$f" == "QUIT") goto finishup 399 400MYVCG ../expl/xerox.vcg 401 402CLEAR 403OUTP "Example: A flow diagram" 404OUTP "-----------------------" 405OUTP "This examples shows a funny flow diagram about the actions" 406OUTP "of a software maintainer if something does not work." 407OUTP "The text is in german. If I tried to translate it, the gags" 408OUTP "would probably disappear." 409OUTP "One speciality here: the centers of the nodes are aligned onto" 410OUTP "a raster by using the attributes xraster and yraster." 411OUTP "Thus, we have many rectangular edges." 412OUTP "" 413vcgcount < ../expl/softmain.vcg 414OUTP "" 415OUTP "Remind: most important keybord commands of vcg" 416OUTP " q - quit the VCG tool" 417OUTP " a " 418OUTP " d c (arrow keys) - scroll to the left/right/up/down" 419OUTP " b " 420OUTP " + - stretch " 421OUTP " - - shrink " 422OUTP "" 423OUTP "After the visualization of this, press q into " 424OUTP "the VCG window to go to the next demonstration." 425 426OUTP "Press Carriage Return key to start visualization ..." 427set f = $< 428if ("$f" == "QUIT") goto finishup 429 430MYVCG ../expl/softmain.vcg 431 432 433CLEAR 434OUTP "Example: Orthogonal layout" 435OUTP "--------------------------" 436OUTP "Flowcharts look much better if all edges consist of" 437OUTP "orthogonal line segments. This is the orthogonal layout" 438OUTP "or manhatten layout." 439OUTP "For the manhatten layout, we use a special method to" 440OUTP "place the nodes: the priority method with the straight" 441OUTP "line detection. It is recommended to use these methods" 442OUTP "when manhatten layout is switched on." 443OUTP "" 444OUTP "Next, we see the previous flow diagram at the left side" 445OUTP "and the same diagram with manhatten layout at the right side." 446OUTP "" 447OUTP "Remind: most important keybord commands of vcg" 448OUTP " q - quit the VCG tool" 449OUTP " a " 450OUTP " d c (arrow keys) - scroll to the left/right/up/down" 451OUTP " b " 452OUTP " + - stretch " 453OUTP " - - shrink " 454OUTP "" 455OUTP "After visualization of this, first, press q into" 456OUTP "the VCG window at the left side." 457OUTP "Then, press q into the right VCG window to go to " 458OUTP "the next demonstration." 459 460OUTP "Press Carriage Return key to start visualization ..." 461set f = $< 462if ("$f" == "QUIT") goto finishup 463 464MYVCG -silent ../expl/softmain.vcg & 465SLEEP 2 466MYVCG ../expl/softmain2.vcg 467SLEEP 1 468 469 470CLEAR 471OUTP "Example: A control flow graph of a program" 472OUTP "------------------------------------------" 473OUTP "This example shows the control flow graph of a program." 474OUTP "The decision branches are formed by rhombs and bent nearedges." 475OUTP "Nearedges are horizontal edges that constain the two adjacent" 476OUTP "nodes to be placed directly neighbored at the same level." 477OUTP "Bent nearedges are edges that are bent at the label, and" 478OUTP "the source node and the edge label form a near edge. This gives" 479OUTP "the typical appearance of decision branches." 480OUTP "" 481vcgcount < ../expl/cfg.vcg 482OUTP "" 483OUTP "Remind: most important keybord commands of vcg" 484OUTP " q - quit the VCG tool" 485OUTP " a " 486OUTP " d c (arrow keys) - scroll to the left/right/up/down" 487OUTP " b " 488OUTP " + - stretch " 489OUTP " - - shrink " 490OUTP "" 491OUTP "After the visualization of this, press q into " 492OUTP "the VCG window to go to the next demonstration." 493 494OUTP "Press Carriage Return key to start visualization ..." 495set f = $< 496if ("$f" == "QUIT") goto finishup 497 498MYVCG ../expl/cfg.vcg 499 500 501CLEAR 502OUTP "Example: Another control flow graph" 503OUTP "-----------------------------------" 504OUTP "The next example shows another control flow graph." 505OUTP "Here, the bent nearedges are simulated by some nearedges and" 506OUTP "auxiliary nodes. Again, we use manhatten layout with the" 507OUTP "priority method and the straight line detection." 508OUTP "" 509vcgcount < ../expl/flchrt.vcg 510OUTP "" 511OUTP "Remind: most important keybord commands of vcg" 512OUTP " q - quit the VCG tool" 513OUTP " a " 514OUTP " d c (arrow keys) - scroll to the left/right/up/down" 515OUTP " b " 516OUTP " + - stretch " 517OUTP " - - shrink " 518OUTP "" 519OUTP "After the visualization of this, press q into " 520OUTP "the VCG window to go to the next demonstration." 521 522OUTP "Press Carriage Return key to start visualization ..." 523set f = $< 524if ("$f" == "QUIT") goto finishup 525 526MYVCG ../expl/flchrt.vcg 527 528 529CLEAR 530OUTP "Example: Anchorpoint test" 531OUTP "-------------------------" 532OUTP "This example shows how to use anchorpoints." 533OUTP "It is possible to anchor an edge at each labelline" 534OUTP "of a node. Nodes representing structs look nice" 535OUTP "in this mode. Note but this restricts of course" 536OUTP "the usage of nearedges." 537OUTP "If you select one of the submenus of the menu item" 538OUTP "Node Information and then pick into the large node" 539OUTP "you can see how to use background text." 540OUTP "" 541vcgcount < ../expl/anchors.vcg 542OUTP "" 543OUTP "Remind: most important keybord commands of vcg" 544OUTP " q - quit the VCG tool" 545OUTP " a " 546OUTP " d c (arrow keys) - scroll to the left/right/up/down" 547OUTP " b " 548OUTP " + - stretch " 549OUTP " - - shrink " 550OUTP "" 551OUTP "After the visualization of this, press q into " 552OUTP "the VCG window to go to the next demonstration." 553 554OUTP "Press Carriage Return key to start visualization ..." 555set f = $< 556if ("$f" == "QUIT") goto finishup 557 558MYVCG ../expl/anchors.vcg 559 560 561CLEAR 562OUTP "Example: More anchorpoints" 563OUTP "--------------------------" 564OUTP "This example shows a list of C structs. It demonstrates" 565OUTP "the usage of anchorpoints for visualized debugging" 566OUTP "of data structures." 567OUTP "" 568vcgcount < ../expl/structs.vcg 569OUTP "" 570OUTP "Remind: most important keybord commands of vcg" 571OUTP " q - quit the VCG tool" 572OUTP " a " 573OUTP " d c (arrow keys) - scroll to the left/right/up/down" 574OUTP " b " 575OUTP " + - stretch " 576OUTP " - - shrink " 577OUTP "" 578OUTP "After the visualization of this, press q into " 579OUTP "the VCG window to go to the next demonstration." 580 581OUTP "Press Carriage Return key to start visualization ..." 582set f = $< 583if ("$f" == "QUIT") goto finishup 584 585MYVCG ../expl/structs.vcg 586 587CLEAR 588OUTP "Example: Level test" 589OUTP "-------------------" 590OUTP "This examples shows how to use level specifications." 591OUTP "It is possible to give the nodes arbitrary levels" 592OUTP "for instance to place a node artificially on the top" 593OUTP "of the graph. Normally, the following would be layouted" 594OUTP "as a tree with the root at level 0. But we have specified" 595OUTP "which nodes are at level 0, 1 and 2, such that the root" 596OUTP "is in the center." 597OUTP "" 598vcgcount < ../expl/levels.vcg 599OUTP "" 600OUTP "Remind: most important keybord commands of vcg" 601OUTP " q - quit the VCG tool" 602OUTP " a " 603OUTP " d c (arrow keys) - scroll to the left/right/up/down" 604OUTP " b " 605OUTP " + - stretch " 606OUTP " - - shrink " 607OUTP "" 608OUTP "After the visualization of this, press q into " 609OUTP "the VCG window to go to the next demonstration." 610 611OUTP "Press Carriage Return key to start visualization ..." 612set f = $< 613if ("$f" == "QUIT") goto finishup 614 615MYVCG ../expl/levels.vcg 616 617 618CLEAR 619OUTP "Example: Horizantal layer sorting" 620OUTP "---------------------------------" 621 622OUTP "The VCG tool reorders the nodes in the levels to avoid" 623OUTP "crossings. But sometimes, the writer of a graph specification" 624OUTP "knows a better order of the nodes into the levels." 625OUTP "He can specify this by the attribute horizontal_order at" 626OUTP "the nodes. If all nodes of a level have this attribute," 627OUTP "the reordering of this level is suppressed." 628OUTP "" 629OUTP "Warning: this feature works only for connected graphs." 630OUTP "Nonconnected parts are layouted separately, such that" 631OUTP "the order of the nodes of a connected component is predictable", 632OUTP "at a level, but not the order of all nodes at a level." 633OUTP "Is is recommended to use this feature only together with" 634OUTP "level specifications, or at trees, where it is clear at" 635OUTP "which level a node apprears." 636OUTP "" 637OUTP "Next, we see a graph where we want to have the nodes" 638OUTP "sorted at the levels in alphabethic order." 639OUTP "Left, we see the original graph by the standard layout" 640OUTP "algorithm. Here, the ordering at the levels is arbitrary." 641OUTP "At the right side, we use the attribute horizontal_order" 642OUTP "on the same graph to yield an alphabethic ordering at the" 643OUTP "Levels." 644 645OUTP "" 646vcgcount < ../expl/hsort.vcg 647OUTP "" 648OUTP "Remind: most important keybord commands of vcg" 649OUTP " q - quit the VCG tool" 650OUTP " a " 651OUTP " d c (arrow keys) - scroll to the left/right/up/down" 652OUTP " b " 653OUTP " + - stretch " 654OUTP " - - shrink " 655OUTP "" 656OUTP "After visualization of this, first, press q into" 657OUTP "the VCG window at the left side." 658OUTP "Then, press q into the right VCG window to go to " 659OUTP "the next demonstration." 660 661OUTP "Press Carriage Return key to start visualization ..." 662set f = $< 663if ("$f" == "QUIT") goto finishup 664 665MYVCG -silent ../expl/hunsort.vcg & 666SLEEP 2 667MYVCG ../expl/hsort.vcg 668SLEEP 1 669 670 671CLEAR 672OUTP "Example: Unary tree of depth 100" 673OUTP "--------------------------------" 674 675vcgdemomaker demo001.vcg -unarytree 100 676 677OUTP "This graph is very simple. All edges have class 2." 678OUTP "You can try to hide the edges, expose them or to" 679OUTP "fold regions." 680OUTP "" 681vcgcount < demo001.vcg 682OUTP "" 683OUTP "Remind: most important keybord commands of vcg" 684OUTP " q - quit the VCG tool" 685OUTP " a " 686OUTP " d c (arrow keys) - scroll to the left/right/up/down" 687OUTP " b " 688OUTP " + - stretch " 689OUTP " - - shrink " 690OUTP "" 691OUTP "After the visualization of this, press q into " 692OUTP "the VCG window to go to the next demonstration." 693 694OUTP "Press Carriage Return key to start visualization ..." 695set f = $< 696if ("$f" == "QUIT") goto finishup 697 698MYVCG demo001.vcg 699 700CLEAR 701OUTP "Example: Binary tree of depth 5" 702OUTP "-------------------------------" 703 704vcgdemomaker demo002.vcg -binarytree 5 705CAT demo002.vcg | SED -e "s/xmax/shrink: 2 &/" > demo003.vcg 706 707OUTP "This graph is very simple. All edges have class 2." 708OUTP "Ary-trees look very nice if we use a layout_downfactor." 709OUTP "Here, we used layout_downfactor: 8." 710OUTP "" 711vcgcount < demo003.vcg 712OUTP "" 713OUTP "Remind: most important keybord commands of vcg" 714OUTP " q - quit the VCG tool" 715OUTP " a " 716OUTP " d c (arrow keys) - scroll to the left/right/up/down" 717OUTP " b " 718OUTP " + - stretch " 719OUTP " - - shrink " 720OUTP "" 721OUTP "After the visualization of this, press q into " 722OUTP "the VCG window to go to the next demonstration." 723 724OUTP "Press Carriage Return key to start visualization ..." 725set f = $< 726if ("$f" == "QUIT") goto finishup 727 728MYVCG demo003.vcg 729 730CLEAR 731OUTP "Example: Binary tree of depth 5" 732OUTP "-------------------------------" 733 734CAT demo003.vcg | SED -e "s/layout_downfactor: 8/layout_downfactor: 1/" > demo004.vcg 735 736OUTP "To compare with, we show the same binary tree with" 737OUTP "layout_downfactor: 1." 738OUTP "" 739vcgcount < demo004.vcg 740OUTP "" 741OUTP "Remind: most important keybord commands of vcg" 742OUTP " q - quit the VCG tool" 743OUTP " a " 744OUTP " d c (arrow keys) - scroll to the left/right/up/down" 745OUTP " b " 746OUTP " + - stretch " 747OUTP " - - shrink " 748OUTP "" 749OUTP "After the visualization of this, press q into " 750OUTP "the VCG window to go to the next demonstration." 751 752OUTP "Press Carriage Return key to start visualization ..." 753set f = $< 754if ("$f" == "QUIT") goto finishup 755 756MYVCG demo004.vcg 757 758 759CLEAR 760OUTP "Example: Layout of trees" 761OUTP "-------------------------" 762 763OUTP "Beside the normal layout algorithm, there is a specialized" 764OUTP "algorithm TREE, that lays out trees even without specifying" 765OUTP "a layout_downfactor." 766OUTP "This specialized algorithm can be used for all graphs that" 767OUTP "can be layouted like downward trees, i.e. their edges form" 768OUTP "unshared branches." 769OUTP "This specialized algorithm is often faster than then normal." 770OUTP "algorithm with layout_downfactor." 771 772OUTP "Left, we see a syntax tree by the standard layout algorithm." 773OUTP "At the right side, we see the same tree with the specialized" 774OUTP "algorithm for trees." 775 776OUTP "" 777vcgcount < ../expl/tree1.vcg 778OUTP "" 779OUTP "Remind: most important keybord commands of vcg" 780OUTP " q - quit the VCG tool" 781OUTP " a " 782OUTP " d c (arrow keys) - scroll to the left/right/up/down" 783OUTP " b " 784OUTP " + - stretch " 785OUTP " - - shrink " 786OUTP "" 787OUTP "After visualization of this, first, press q into" 788OUTP "the VCG window at the left side." 789OUTP "Then, press q into the right VCG window to go to " 790OUTP "the next demonstration." 791 792OUTP "Press Carriage Return key to start visualization ..." 793set f = $< 794if ("$f" == "QUIT") goto finishup 795 796MYVCG -silent ../expl/tree1.vcg & 797SLEEP 2 798MYVCG ../expl/tree2.vcg 799SLEEP 1 800 801 802CLEAR 803OUTP "Example: More trees" 804OUTP "-------------------" 805 806OUTP "Trees look very nice, if a special version of the manhatten" 807OUTP "layout method is used: the single line manhatten layout." 808OUTP "Here, all horizontal edge segments share the same" 809OUTP "horizontal line. If the graph is not a tree, then this" 810OUTP "will confuse the user, since it might be not anymore clear," 811OUTP "which vertical lines are connected by the horizontal" 812OUTP "line. But for trees, it looks nice." 813 814OUTP "We see the same syntax tree as before, but now, we use the" 815OUTP "single line manhatten tree layout for the left graph." 816 817OUTP "" 818vcgcount < ../expl/tree2.vcg 819OUTP "" 820OUTP "Remind: most important keybord commands of vcg" 821OUTP " q - quit the VCG tool" 822OUTP " a " 823OUTP " d c (arrow keys) - scroll to the left/right/up/down" 824OUTP " b " 825OUTP " + - stretch " 826OUTP " - - shrink " 827OUTP "" 828OUTP "After visualization of this, first, press q into" 829OUTP "the VCG window at the left side." 830OUTP "Then, press q into the right VCG window to go to " 831OUTP "the next demonstration." 832 833OUTP "Press Carriage Return key to start visualization ..." 834set f = $< 835if ("$f" == "QUIT") goto finishup 836 837MYVCG -silent -dtree -smanhatten ../expl/tree1.vcg & 838SLEEP 2 839MYVCG ../expl/tree2.vcg 840SLEEP 1 841 842 843 844 845CLEAR 846OUTP "Example: Edge priorities" 847OUTP "------------------------" 848 849OUTP "Sometimes, we have a graph consisting of two intermixed" 850OUTP "graphs. Or we have one basic graph and additionally, we have" 851OUTP "edges as annotations. In these cases, we want to recognize " 852OUTP "the structure of the basic graph, but the structure is" 853OUTP "interwoven with the additional edges. But the layout is based" 854OUTP "on all edges, which may result in visualizations where " 855OUTP "the structure of the basic graph is not recognizable anymore." 856OUTP "" 857OUTP "In this case, edge priority comes in. We give the edges of" 858OUTP "the basic graph a higher priority. Then, the additional " 859OUTP "annotation edges are neglected during the layout and are" 860OUTP "drawn rather ugly, but the basic graph is visualized nicely." 861OUTP "" 862OUTP "Next, we will see a tree (thick edges) interwoven with some" 863OUTP "additional edges. Left, we show this graph by the standard" 864OUTP "layout algorithm, where the tree is not recognizable." 865OUTP "At the right side, we use priorities, and then we will recognize" 866OUTP "the tree structure." 867 868OUTP "" 869vcgcount < ../expl/annot1.vcg 870OUTP "" 871OUTP "Remind: most important keybord commands of vcg" 872OUTP " q - quit the VCG tool" 873OUTP " a " 874OUTP " d c (arrow keys) - scroll to the left/right/up/down" 875OUTP " b " 876OUTP " + - stretch " 877OUTP " - - shrink " 878OUTP "" 879OUTP "After visualization of this, first, press q into" 880OUTP "the VCG window at the left side." 881OUTP "Then, press q into the right VCG window to go to " 882OUTP "the next demonstration." 883 884OUTP "Press Carriage Return key to start visualization ..." 885set f = $< 886if ("$f" == "QUIT") goto finishup 887 888MYVCG -silent ../expl/annot1.vcg & 889SLEEP 2 890MYVCG -silent ../expl/annot2.vcg 891SLEEP 1 892 893 894CLEAR 895OUTP "Example: Fisheyes" 896OUTP "-----------------" 897 898OUTP "Large graphs have normally the disadvantage that we either" 899OUTP "see the whole graph but no details, because the graph is" 900OUTP "shrinked very much, or we see some details at the point of" 901OUTP "interest but lose the overview of the entire graph structure," 902OUTP "because the window is too small. A good solution of this" 903OUTP "conflict is the fisheye view that distorts the graph such" 904OUTP "that the focus point is magnified while the remaining parts" 905OUTP "of the graph are demagnified smoothly such that the whole" 906OUTP "graph is visible." 907OUTP "A fisheye view is a coordinate transformation and has" 908OUTP "similiarities with the corresponding photo camera lenses." 909OUTP "" 910OUTP "Next, we will see a large graph. Left, we show the graph" 911OUTP "by the standard view. Right, we see the same graph by the" 912OUTP "cartesian fisheye view. The focus point can be selected" 913OUTP "interactively by the operation Pick Position." 914 915OUTP "" 916vcgcount < ../expl/fishex3c.vcg 917OUTP "" 918OUTP "Remind: most important keybord commands of vcg" 919OUTP " q - quit the VCG tool" 920OUTP " a " 921OUTP " d c (arrow keys) - scroll to the left/right/up/down" 922OUTP " b " 923OUTP " + - stretch " 924OUTP " - - shrink " 925OUTP "" 926OUTP "After visualization of this, first, press q into" 927OUTP "the VCG window at the left side." 928OUTP "Then, press q into the right VCG window to go to " 929OUTP "the next demonstration." 930 931OUTP "Press Carriage Return key to start visualization ..." 932set f = $< 933if ("$f" == "QUIT") goto finishup 934 935MYVCG -silent -ypos 170 ../expl/fishex3c.vcg & 936SLEEP 2 937MYVCG -silent -xpos 518 -ypos 1790 -view cfish ../expl/fishex3b.vcg 938SLEEP 1 939 940 941CLEAR 942OUTP "Example: Cartesian fisheyes and polar fisheyes" 943OUTP "----------------------------------------------" 944 945OUTP "Cartesian fisheyes transform the cartesian coordinate system" 946OUTP "while polar fisheyes transform the polar coordinate system." 947OUTP "A polar fisheye can be seen as a mapping of the space onto a" 948OUTP "spheric ball. The polar fisheye does not preserve horizontal" 949OUTP "and vertical lines, while the cartesian fisheye does." 950OUTP "Note that fisheyes may introduce additional bendings of lines" 951OUTP "and crossings that do not appear in the plane view." 952OUTP "However, these effects are seldom and occur due to efficiency" 953OUTP "reasons." 954OUTP "" 955OUTP "Next, we will see the same graph as before. Left, we show the" 956OUTP "graph by the polar fisheye view. Right, we see the graph again" 957OUTP "by the carthesian fisheye view." 958 959OUTP "" 960OUTP "Remind: most important keybord commands of vcg" 961OUTP " q - quit the VCG tool" 962OUTP " a " 963OUTP " d c (arrow keys) - scroll to the left/right/up/down" 964OUTP " b " 965OUTP " + - stretch " 966OUTP " - - shrink " 967OUTP "" 968OUTP "After visualization of this, first, press q into" 969OUTP "the VCG window at the left side." 970OUTP "Then, press q into the right VCG window to go to " 971OUTP "the next demonstration." 972 973OUTP "Press Carriage Return key to start visualization ..." 974set f = $< 975if ("$f" == "QUIT") goto finishup 976 977MYVCG -silent -xpos 518 -ypos 1790 -view pfish ../expl/fishex3a.vcg & 978SLEEP 2 979MYVCG -silent -xpos 518 -ypos 1790 -view cfish ../expl/fishex3b.vcg 980SLEEP 1 981 982 983CLEAR 984OUTP "Example: Fisheyes with fixed radius" 985OUTP "-----------------------------------" 986 987OUTP "If not the whole graph but only a fixed area around the focus" 988OUTP "point is of interest, we use the fisheyes with fixed radius." 989OUTP "Then, not the whole graph is visible but only the region around" 990OUTP "the focus point." 991OUTP "While for normal (self adaptable) fisheyes, the location of the" 992OUTP "focus point moves in the window relatively to its movement in" 993OUTP "the graph, the focus point of the fisheyes with fixed radius is" 994OUTP "always centered in the window." 995OUTP "" 996OUTP "Next, we will see a graph with fisheyes of fixed radius. Left," 997OUTP "we show the graph by the cartesian fisheye view. Right, we see" 998OUTP "the graph again by the polar fisheye view." 999 1000OUTP "" 1001vcgcount < ../expl/fishex2a.vcg 1002OUTP "" 1003OUTP "Remind: most important keybord commands of vcg" 1004OUTP " q - quit the VCG tool" 1005OUTP " a " 1006OUTP " d c (arrow keys) - scroll to the left/right/up/down" 1007OUTP " b " 1008OUTP " + - stretch " 1009OUTP " - - shrink " 1010OUTP "" 1011OUTP "After visualization of this, first, press q into" 1012OUTP "the VCG window at the left side." 1013OUTP "Then, press q into the right VCG window to go to " 1014OUTP "the next demonstration." 1015 1016OUTP "Press Carriage Return key to start visualization ..." 1017set f = $< 1018if ("$f" == "QUIT") goto finishup 1019 1020MYVCG -silent -xpos 2300 -ypos 253 -view fcfish ../expl/fishex2a.vcg & 1021SLEEP 2 1022MYVCG -silent -xpos 2300 -ypos 253 -view fpfish ../expl/fishex2b.vcg 1023SLEEP 1 1024 1025 1026CLEAR 1027OUTP "Example: Another diagram" 1028OUTP "-------------------------" 1029 1030OUTP "This diagram (Gansner, Koutsofios, e.a.: A Technique" 1031OUTP "for Drawing Graphs; IEEE Trans. Soft. Eng. 19, 3, March 93)" 1032OUTP "shows the dependencies of different shells." 1033OUTP "Here we see a combination of features of the VCG tool." 1034OUTP "First, the graph is made connected by 3 invisible edges." 1035OUTP "The priority of these edges is set to zero such that" 1036OUTP "they do not influence the layout too much. As contrast," 1037OUTP "the layout_downfactor and layout_upfactor is set to 100." 1038OUTP "The attribute level is used to set the nodes at the" 1039OUTP "appropriate time axis. The attribute horizontal_order" 1040OUTP "is used to get the time axis at the left side of the" 1041OUTP "graph. Further, we have used splines for the edges." 1042 1043OUTP "" 1044vcgcount < ../expl/shells.vcg 1045OUTP "" 1046OUTP "Remind: most important keybord commands of vcg" 1047OUTP " q - quit the VCG tool" 1048OUTP " a " 1049OUTP " d c (arrow keys) - scroll to the left/right/up/down" 1050OUTP " b " 1051OUTP " + - stretch " 1052OUTP " - - shrink " 1053OUTP "" 1054OUTP "After the visualization of this, press q into " 1055OUTP "the VCG window to go to the next demonstration." 1056 1057OUTP "Press Carriage Return key to start visualization ..." 1058set f = $< 1059if ("$f" == "QUIT") goto finishup 1060 1061MYVCG ../expl/shells.vcg 1062 1063 1064CLEAR 1065OUTP "Example: Ternary tree of depth 7" 1066OUTP "---------------------------------" 1067OUTP "Wait half a minute ..." 1068 1069vcgdemomaker demo005.vcg -ternarytree 7 1070CAT demo005.vcg | SED -e "s/xmax/shrink: 2 &/" > demo006.vcg 1071 1072OUTP "Now a first torture test. This graph is a ternary tree" 1073OUTP "with about 3000 nodes and 3000 edges." 1074OUTP "We use the normal algorithm with downfactor: 8." 1075OUTP "We need about 20 seconds (on a Sparc ELC) to layout it." 1076OUTP "WARNING: the visualization may fail on small computers" 1077OUTP " because of memory exhausted." 1078OUTP "" 1079vcgcount < demo006.vcg 1080OUTP "" 1081OUTP "Remind: most important keybord commands of vcg" 1082OUTP " q - quit the VCG tool" 1083OUTP " a " 1084OUTP " d c (arrow keys) - scroll to the left/right/up/down" 1085OUTP " b " 1086OUTP " + - stretch " 1087OUTP " - - shrink " 1088OUTP "" 1089OUTP "After the visualization of this, press q into " 1090OUTP "the VCG window to go to the next demonstration." 1091 1092OUTP "Press Carriage Return key to start visualization ..." 1093set f = $< 1094if ("$f" == "QUIT") goto finishup 1095 1096MYVCG demo006.vcg 1097 1098 1099CLEAR 1100OUTP "Example: Two level cross graph" 1101OUTP "------------------------------" 1102 1103vcgdemomaker demo007.vcg -twolevelcross 1000 1104 1105OUTP "This is a torture test for bary centering." 1106OUTP "This graph is specified in an ugly format with a lot" 1107OUTP "of unnecessary crossings. The tool removes these " 1108OUTP "crossings." 1109OUTP "" 1110vcgcount < demo007.vcg 1111OUTP "" 1112OUTP "Remind: most important keybord commands of vcg" 1113OUTP " q - quit the VCG tool" 1114OUTP " a " 1115OUTP " d c (arrow keys) - scroll to the left/right/up/down" 1116OUTP " b " 1117OUTP " + - stretch " 1118OUTP " - - shrink " 1119OUTP "" 1120OUTP "After the visualization of this, press q into " 1121OUTP "the VCG window to go to the next demonstration." 1122 1123OUTP "Press Carriage Return key to start visualization ..." 1124set f = $< 1125if ("$f" == "QUIT") goto finishup 1126 1127MYVCG demo007.vcg 1128 1129CLEAR 1130OUTP "Example: Nearedge test" 1131OUTP "----------------------" 1132 1133vcgdemomaker demo008.vcg -leveltree 4 1134CAT demo008.vcg | SED -e "s/xmax/shrink: 4 &/" > demo009.vcg 1135 1136OUTP "This is a torture test for near edge layout." 1137OUTP "This tree is has a lot of near edges, i.e. " 1138OUTP "edges between nodes at the same level." 1139OUTP "The nodes of a near edge should be neighboured." 1140OUTP "" 1141vcgcount < demo009.vcg 1142OUTP "" 1143OUTP "Remind: most important keybord commands of vcg" 1144OUTP " q - quit the VCG tool" 1145OUTP " a " 1146OUTP " d c (arrow keys) - scroll to the left/right/up/down" 1147OUTP " b " 1148OUTP " + - stretch " 1149OUTP " - - shrink " 1150OUTP "" 1151OUTP "After the visualization of this, press q into " 1152OUTP "the VCG window to go to the next demonstration." 1153 1154OUTP "Press Carriage Return key to start visualization ..." 1155set f = $< 1156if ("$f" == "QUIT") goto finishup 1157 1158MYVCG demo009.vcg 1159 1160CLEAR 1161OUTP "Example: Complete graphs" 1162OUTP "------------------------" 1163 1164vcgdemomaker demo010.vcg -allconnect 5 1165 1166OUTP "The complete graph has edges between all nodes." 1167OUTP "If we have n nodes, then we have about n*n/2 edges." 1168OUTP "Here we test the speed of the VCG tool, because " 1169OUTP "such graphs are very difficult to layout." 1170OUTP "An complete graph of 5 nodes is layouted very fast." 1171OUTP "" 1172vcgcount < demo010.vcg 1173OUTP "" 1174OUTP "Remind: most important keybord commands of vcg" 1175OUTP " q - quit the VCG tool" 1176OUTP " a " 1177OUTP " d c (arrow keys) - scroll to the left/right/up/down" 1178OUTP " b " 1179OUTP " + - stretch " 1180OUTP " - - shrink " 1181OUTP "" 1182OUTP "After the visualization of this, press q into " 1183OUTP "the VCG window to go to the next demonstration." 1184 1185OUTP "Press Carriage Return key to start visualization ..." 1186set f = $< 1187if ("$f" == "QUIT") goto finishup 1188 1189MYVCG demo010.vcg 1190 1191CLEAR 1192OUTP "Example: Complete graphs" 1193OUTP "------------------------" 1194 1195vcgdemomaker demo011.vcg -allconnect 10 1196CAT demo011.vcg | SED -e "s/xmax/shrink: 10 stretch: 7 &/" > demo012.vcg 1197 1198OUTP "An complete graph of 10 nodes needs a few seconds." 1199OUTP "" 1200vcgcount < demo012.vcg 1201OUTP "" 1202OUTP "Remind: most important keybord commands of vcg" 1203OUTP " q - quit the VCG tool" 1204OUTP " a " 1205OUTP " d c (arrow keys) - scroll to the left/right/up/down" 1206OUTP " b " 1207OUTP " + - stretch " 1208OUTP " - - shrink " 1209OUTP "" 1210OUTP "After the visualization of this, press q into " 1211OUTP "the VCG window to go to the next demonstration." 1212 1213OUTP "Press Carriage Return key to start visualization ..." 1214set f = $< 1215if ("$f" == "QUIT") goto finishup 1216 1217MYVCG demo012.vcg 1218 1219CLEAR 1220OUTP "Example: Complete graphs" 1221OUTP "------------------------" 1222 1223vcgdemomaker demo013.vcg -allconnect 20 1224CAT demo013.vcg | SED -e "s/xmax/shrink: 100 stretch: 32 &/" > demo014.vcg 1225 1226OUTP "An complete graph of 20 nodes needs about 25 seconds" 1227OUTP "on a Sparc ELC." 1228OUTP "" 1229vcgcount < demo014.vcg 1230OUTP "" 1231OUTP "Remind: most important keybord commands of vcg" 1232OUTP " q - quit the VCG tool" 1233OUTP " a " 1234OUTP " d c (arrow keys) - scroll to the left/right/up/down" 1235OUTP " b " 1236OUTP " + - stretch " 1237OUTP " - - shrink " 1238OUTP "" 1239OUTP "After the visualization of this, press q into " 1240OUTP "the VCG window to go to the next demonstration." 1241 1242OUTP "Press Carriage Return key to start visualization ..." 1243set f = $< 1244if ("$f" == "QUIT") goto finishup 1245 1246MYVCG demo014.vcg 1247 1248CLEAR 1249OUTP "Example: Complete graphs" 1250OUTP "------------------------" 1251 1252vcgdemomaker demo015.vcg -allconnect 30 1253CAT demo015.vcg | SED -e "s/xmax/shrink: 10 stretch: 2 &/" > demo016.vcg 1254 1255OUTP "An complete graph of 30 nodes needs about 110 seconds" 1256OUTP "on a Sparc ELC." 1257OUTP "" 1258vcgcount < demo016.vcg 1259OUTP "" 1260OUTP "Remind: most important keybord commands of vcg" 1261OUTP " q - quit the VCG tool" 1262OUTP " a " 1263OUTP " d c (arrow keys) - scroll to the left/right/up/down" 1264OUTP " b " 1265OUTP " + - stretch " 1266OUTP " - - shrink " 1267OUTP "" 1268OUTP "After the visualization of this, press q into " 1269OUTP "the VCG window to go to the next demonstration." 1270 1271OUTP "Press Carriage Return key to start visualization ..." 1272set f = $< 1273if ("$f" == "QUIT") goto finishup 1274 1275MYVCG demo016.vcg 1276 1277CLEAR 1278OUTP "Example: Complete graphs" 1279OUTP "------------------------" 1280 1281OUTP "If we have such complex graphs, it is often not necessary" 1282OUTP "to have a nice layout, because the graphs are to large " 1283OUTP "to see all details at the same time." 1284OUTP "In this case, we set the fast flag (option -f) that reduces" 1285OUTP "the number of iterations of various layout steps." 1286OUTP "Next, we see the same complete graph of 30 nodes as before, however" 1287OUTP "now the fast flag is set." 1288OUTP "Then, we need only 15 seconds (compared to 100 seconds before)," 1289OUTP "but the layout is very ugly." 1290 1291OUTP "" 1292OUTP "Remind: most important keybord commands of vcg" 1293OUTP " q - quit the VCG tool" 1294OUTP " a " 1295OUTP " d c (arrow keys) - scroll to the left/right/up/down" 1296OUTP " b " 1297OUTP " + - stretch " 1298OUTP " - - shrink " 1299OUTP "" 1300OUTP "After the visualization of this, press q into " 1301OUTP "the VCG window to go to the next demonstration." 1302 1303OUTP "Press Carriage Return key to start visualization ..." 1304set f = $< 1305if ("$f" == "QUIT") goto finishup 1306 1307MYVCG -f demo016.vcg 1308 1309 1310CLEAR 1311OUTP "Example: Intermediate representation of a compiler (HIR)" 1312OUTP "--------------------------------------------------------" 1313 1314OUTP "The next example comes from the REAL WORLD." 1315OUTP "It shows the High Intermediate Representation (HIR)" 1316OUTP "of a CLaX program. It is a syntax tree annotated by" 1317OUTP "types." 1318OUTP "You see the procedure declarations. The main module is" 1319OUTP "actually folded (see the green triangle)." 1320OUTP "If you select the menu point Hide edges, you will recognize" 1321OUTP "that the edge classes are named in this example." 1322OUTP "We use the layout algorithm TREE." 1323OUTP "" 1324vcgcount < ../expl/tstree.vcg 1325OUTP "" 1326OUTP "Remind: most important keybord commands of vcg" 1327OUTP " q - quit the VCG tool" 1328OUTP " a " 1329OUTP " d c (arrow keys) - scroll to the left/right/up/down" 1330OUTP " b " 1331OUTP " + - stretch " 1332OUTP " - - shrink " 1333OUTP "" 1334OUTP "We need a few seconds to visualize this. Please wait." 1335OUTP "After the visualization of this, press q into " 1336OUTP "the VCG window to go to the next demonstration." 1337 1338OUTP "Press Carriage Return key to start visualization ..." 1339set f = $< 1340if ("$f" == "QUIT") goto finishup 1341 1342MYVCG ../expl/tstree.vcg 1343 1344CLEAR 1345OUTP "Example: Intermediate representation of a compiler (CCMIR)" 1346OUTP "----------------------------------------------------------" 1347 1348OUTP "The next example again comes from the REAL WORLD." 1349OUTP "It shows the Common Compare Medium Intermediate" 1350OUTP "Representation (CCMIR) of a very simple C program." 1351OUTP "This graph was generated by the ACE C frontend and a trivial" 1352OUTP "additional visualization engine. The edge classes 1-5" 1353OUTP "are hidden, otherwise the layout would be to ugly." 1354OUTP "They can be exposed by menu selections." 1355OUTP "" 1356vcgcount < ../expl/ccmir.vcg 1357OUTP "" 1358OUTP "Remind: most important keybord commands of vcg" 1359OUTP " q - quit the VCG tool" 1360OUTP " a " 1361OUTP " d c (arrow keys) - scroll to the left/right/up/down" 1362OUTP " b " 1363OUTP " + - stretch " 1364OUTP " - - shrink " 1365OUTP "" 1366OUTP "After the visualization of this, press q into " 1367OUTP "the VCG window to go to the next demonstration." 1368 1369OUTP "Press Carriage Return key to start visualization ..." 1370set f = $< 1371if ("$f" == "QUIT") goto finishup 1372 1373MYVCG ../expl/ccmir.vcg 1374 1375 1376CLEAR 1377OUTP "Example: Animation demo 1 (communication by touching)" 1378OUTP "-----------------------------------------------------" 1379OUTP "We show a small animation that demonstrate the " 1380OUTP "communication between the VCG tool and a controller " 1381OUTP "program called animation3." 1382OUTP "The controller program sends signals to the VCG tool." 1383OUTP "The VCG tool indicates the completion of vizualization" 1384OUTP "by touching its input file." 1385OUTP "This demonstration shows a sequence of insertions into" 1386OUTP "a red black tree. We see rotations that rebalance the tree." 1387OUTP "IMPORTANT: Do not quit the VCG tool. Do not give any " 1388OUTP " input (keypress, menu selection) to the VCG tool." 1389OUTP " Wait ! The animation is finished automatically." 1390 1391OUTP "" 1392OUTP "Press Carriage Return key to start the animation ..." 1393set f = $< 1394if ("$f" == "QUIT") goto finishup 1395 1396animation3 1397 1398OUTP "Ready ! Press Carriage Return key to continue ..." 1399set f = $< 1400if ("$f" == "QUIT") goto finishup 1401 1402CLEAR 1403OUTP "Example: Animation demo 2 (communication by signals)" 1404OUTP "----------------------------------------------------" 1405OUTP "We show another small animation that demonstrate the " 1406OUTP "communication between the VCG tool and a controller " 1407OUTP "program called animation1." 1408OUTP "The controller program sends signals to the VCG tool." 1409OUTP "The VCG tool indicates the completion of vizualization" 1410OUTP "by sending a signal back to the controlling program." 1411OUTP "IMPORTANT: Do not quit the VCG tool. Do not give any " 1412OUTP " input (keypress, menu selection) to the VCG tool." 1413OUTP " Wait ! The animation is finished automatically." 1414 1415OUTP "" 1416OUTP "Press Carriage Return key to start the animation ..." 1417set f = $< 1418if ("$f" == "QUIT") goto finishup 1419 1420animation2 1421 1422OUTP "Ready ! Press Carriage Return key to finish the demonstration." 1423 1424 1425finishup: 1426CLEAR 1427OUTP "This was the demonstration of the vcg tool" 1428 1429OUTP "" 1430loopa: 1431 OUTP "Should the directory be cleaned ?" 1432 OUTP "1 : yes 0 : no " 1433 OUTP "y : yes n : no " 1434 set wsys = $< 1435 switch ($wsys) 1436 case y: 1437 case 1: 1438 OUTP "Cleanup ..." 1439 OUTP "Test" > demoaaa.vcg 1440 OUTP "Test" > animaaa.vcg 1441 OUTP "Test" > rbtreeaaa.vcg 1442 RM demo*.vcg anim*.vcg rbtree*.vcg 1443 breaksw 1444 case n: 1445 case 0: 1446 breaksw 1447 default: 1448 OUTP "" 1449 OUTP "*** invalid input ***" 1450 goto loopa 1451 endsw 1452OUTP "Goodbye ..." 1453 1454