Examples 3


These examples demonstrate the possibilities of 'dot' and S-Dot. Below each graph the S-Dot source code is listed. Click on the element and attribute names to get a documentation.

Sponsored links:


The charts were generated automatically from a XABSL document using XSLT.

Example 1/2:
Source code:
(graph ((ranksep "0.3"))
(cluster ((id "option") (label "option handle-ball-at-left-and-right-border") (fontname "Arial") (fontcolor "#005A9C") (fontsize "11") (fillcolor "#F4F4F4") (style "filled"))
(cluster ((id "states") (style "filled") (fillcolor "#F4F4F4") (color "#F4F4F4"))
(node ((label "do\nsideward\nkick") (fontcolor "#005A9C") (fontsize "11") (style "filled") (fillcolor "#FFFFFF") (fontname "Arial") (id "state_do_sideward_kick") (shape "circle")))
(node ((label "turn\naround\nball") (fontcolor "#005A9C") (fontsize "11") (style "filled") (fillcolor "#FFFFFF") (fontname "Arial") (id "state_turn_around_ball") (shape "circle")))
(node ((label "do\narm\nkick") (fontcolor "#005A9C") (fontsize "11") (style "filled") (fillcolor "#FFFFFF") (fontname "Arial") (id "state_do_arm_kick") (shape "circle")))
(node ((label "go\nto\nball") (fontname "Arial") (fontcolor "#005A9C") (fontsize "11") (style "dashed") (fillcolor "#FFFFFF") (id "state_go_to_ball") (shape "Mcircle"))))
(cluster ((id "decision_tree") (label "state go-to-ball") (fillcolor "#FFFFFF") (fontname "Arial") (fontcolor "#005A9C") (fontsize "11") (style "filled"))
(node ((id "start") (shape "point")))
(record ((color "#FFFFFF") (fontsize "11") (height "0.15") (fontname "Arial"))
(node ((id "start_0") (label "if")))
(node ((id "start_1") (label "else"))))
(edge ((from "start") (to "start_0") (dir "none") (style "solid")))
(node ((id "start_0_") (shape "box") (fontsize "11") (style "solid") (fontname "Arial") (label "just seen\nball")))
(edge ((from "start_0") (to "start_0_") (dir "none") (style "solid")))
(record ((color "#FFFFFF") (fontsize "11") (height "0.15") (fontname "Arial"))
(node ((id "start_0__0") (label "if")))
(node ((id "start_0__2") (label "else if")))
(node ((id "start_0__3") (label "else"))))
(edge ((from "start_0_") (to "start_0__0") (dir "none") (style "solid")))
(node ((id "start_0__0_") (shape "box") (fontsize "11") (style "solid") (fontname "Arial") (label "close\nto ball\n(sideward-kick)")))
(edge ((from "start_0__0") (to "start_0__0_") (dir "none") (style "solid")))
(record ((color "#FFFFFF") (fontsize "11") (height "0.15") (fontname "Arial"))
(node ((id "start_0__0__0") (label "if")))
(node ((id "start_0__0__2") (label "else"))))
(edge ((from "start_0__0_") (to "start_0__0__0") (dir "none") (style "solid")))
(node ((id "start_0__0__0_") (shape "box") (fontsize "11") (style "solid") (fontname "Arial") (label "arrived\nat kick\nangle")))
(edge ((from "start_0__0__0") (to "start_0__0__0_") (dir "none") (style "solid")))
(edge ((from "start_0__0__0_") (minlen "2") (style "solid") (to "state_do_sideward_kick")))
(edge ((from "start_0__0__2") (minlen "2") (style "solid") (to "state_turn_around_ball")))
(node ((id "start_0__2_") (shape "box") (fontsize "11") (style "solid") (fontname "Arial") (label "close\nto ball\n(arm-kick)")))
(edge ((from "start_0__2") (to "start_0__2_") (dir "none") (style "solid")))
(record ((color "#FFFFFF") (fontsize "11") (height "0.15") (fontname "Arial"))
(node ((id "start_0__2__0") (label "if")))
(node ((id "start_0__2__2") (label "else"))))
(edge ((from "start_0__2_") (to "start_0__2__0") (dir "none") (style "solid")))
(node ((id "start_0__2__0_") (shape "box") (fontsize "11") (style "solid") (fontname "Arial") (label "arrived\nat kick\nangle")))
(edge ((from "start_0__2__0") (to "start_0__2__0_") (dir "none") (style "solid")))
(edge ((from "start_0__2__0_") (minlen "2") (style "solid") (to "state_do_arm_kick")))
(edge ((from "start_0__2__2") (minlen "2") (style "solid") (to "state_turn_around_ball")))
(edge ((from "start_0__3") (minlen "2") (style "solid") (to "state_go_to_ball")))
(edge ((from "start_1") (minlen "2") (style "solid") (to "state_go_to_ball"))))))
Example 2/2:
Source code:
(graph ((ranksep "0.3"))
(cluster ((id "option") (label "option go-to-kickoff-position") (fontname "Arial") (fontcolor "#005A9C") (fontsize "11") (fillcolor "#F4F4F4") (style "filled"))
(cluster ((id "states") (style "filled") (fillcolor "#F4F4F4") (color "#F4F4F4"))
(node ((label "localize") (fontname "Arial") (fontcolor "#005A9C") (fontsize "11") (style "dashed") (fillcolor "#FFFFFF") (id "state_localize") (shape "Mcircle")))
(node ((label "dont\nmove") (fontcolor "#005A9C") (fontsize "11") (style "filled") (fillcolor "#FFFFFF") (fontname "Arial") (id "state_dont_move") (shape "circle")))
(node ((label "turn") (fontcolor "#005A9C") (fontsize "11") (style "filled") (fillcolor "#FFFFFF") (fontname "Arial") (id "state_turn") (shape "circle")))
(node ((label "go") (fontcolor "#005A9C") (fontsize "11") (style "filled") (fillcolor "#FFFFFF") (fontname "Arial") (id "state_go") (shape "circle"))))
(cluster ((id "decision_tree") (label "state localize") (fillcolor "#FFFFFF") (fontname "Arial") (fontcolor "#005A9C") (fontsize "11") (style "filled"))
(node ((id "start") (shape "point")))
(record ((color "#FFFFFF") (fontsize "11") (height "0.15") (fontname "Arial"))
(node ((id "start_0") (label "if")))
(node ((id "start_1") (label "else if")))
(node ((id "start_2") (label "else if")))
(node ((id "start_3") (label "else if")))
(node ((id "start_4") (label "else"))))
(edge ((from "start") (to "start_0") (dir "none") (style "solid")))
(node ((id "start_0_") (shape "box") (fontsize "11") (style "solid") (fontname "Arial") (label "state\nrunning\nless than\n3 seconds")))
(edge ((from "start_0") (to "start_0_") (dir "none") (style "solid")))
(edge ((from "start_0_") (minlen "2") (style "solid") (to "state_localize")))
(node ((id "start_1_") (shape "box") (fontsize "11") (style "solid") (fontname "Arial") (label "head switch\npressed\n(>100ms)")))
(edge ((from "start_1") (to "start_1_") (dir "none") (style "solid")))
(edge ((from "start_1_") (minlen "2") (style "solid") (to "state_dont_move")))
(node ((id "start_2_") (shape "box") (fontsize "11") (style "solid") (fontname "Arial") (label "waited\ntoo long")))
(edge ((from "start_2") (to "start_2_") (dir "none") (style "solid")))
(edge ((from "start_2_") (minlen "2") (style "solid") (to "state_turn")))
(node ((id "start_3_") (shape "box") (fontsize "11") (style "solid") (fontname "Arial") (label "not localized")))
(edge ((from "start_3") (to "start_3_") (dir "none") (style "solid")))
(edge ((from "start_3_") (minlen "2") (style "solid") (to "state_localize")))
(edge ((from "start_4") (minlen "2") (style "solid") (to "state_go"))))))
Sponsored links

 Copyright 2006-2010 by Martin Loetzsch (http://martin-loetzsch.de), all rights reserved. See the S-Dot licence for details.