CodePlexProject Hosting for Open Source Software

Four examples are provided in the GraphSynth download, and more will be available soon for more complicated (albeit mechanical engineering) applications.

rules/swirlRuleSet.rsxml

rules/swirlRule1.grxml

rules/swirlVertices.cs

Swirl is a simple 1 rule system. That makes counter-clockwise patterns from either end of a simple seed. The magic of this is found primarily in the parametric rule application that updates the position of vertices (not nodes! this is also an example of how inherited classes can be used) by increasing the edge slope and the edge length.

rules/loopExampleRuleSet.rsxml

rules/loopRule1.grxml

output/loopResult.gxml

Loop is also a 1 rule system. The rule expands an existing loop and wreaks havoc on the direction of the arcs. This example is mainly to show the use of embedding rules. Note that this works despite the lack of commonality between the left and right hand sides of the rule.

rules/seedBurst5rule1.grxml

rules/seedBurst3rule2.grxml

rules/seedBurst2rule3.grxml

rules/seedBurst1rule4.grxml

rules/seedBurstRuleSet.rsxml

output/seedBurstStartWith29.gxml

SeedBurst is an interesting example of both parametric recognize and choose functions. Given a seed that is a single node, the four rules of SeedBurst create a unique tree for the integer where each leaf of the tree is represented with a value of “1”. One additional thing to notice about this system, is that the rule set is Automatic and not Design (see description on rule set page).

rules/Routerule1.grxml

rules/Routerule2.grxml

rules/Routerule3.grxml

rules/RouteGetToSpanningRuleSet.rsxml

rules/RouteGetToCompleteRuleSet.rsxml

Route is an example of how more than one rule set can work together to create a candidate solution. Here, the first rule set transitions the graph from just a list of unconnected nodes to a spanning tree (the minimum spanning tree is easily identified with Prim’s or Kruskal’s algorithm which could be implemented in an intelligent choosing function—that minimum spanning tree is shown in the output directory). Afterwards, we would like to add additional routes between cities for convenience in traveling from any location to any other location. The two rule sets will create a random candidate—”you’re free to move about the country”.

Home | Getting Started | Methodology Overview | Graph Basics | Grammar Basics | Grammars: Recognition | Grammars: Application | Grammars: Rulesets | Generation | Search Process | Navigating GraphSynth | Examples | Download

Last edited Feb 5, 2014 at 5:50 AM by camanion, version 2