GLG Graph Layout Demo

  • Overview
  • User Interface
  • OVERVIEW
    This demo demonstrates a spring-based graph layout algorithm to position nodes of a given arbitrary graph. The demo is an example of how dynamic GLG objects may be used to visualize nodes of a graph, display additional node-related information and a node's dynamic properties. The Graph Layout component is a part of the GLG Extended API.

    Changing the UpdateRate option shows either layout progress in slow motion, or just the final result of the layout.

    The demo also allows user iteraction with the layout algorithm: you can move graph nodes with the mouse to help find the best layout, or just disturb the layout and see how it responds.

    The demo provides options for creating graphs of two different types and changing the number of nodes in the graph.


    Source Code
    USER INTERFACE
    BUTTONS
    SLIDERS
    MOUSE
    The demo is interactive and allows the movement of nodes with the mouse to disturb the algorithm, or to help it find a better layout
    when the algorithm gets stuck in a local extrema, resulting in a semi-optimal layout for some graph chains.

    To move the node, click on it with the left mouse button and drag. The selected node will be highlighted using the dynamic properties of
    the node, and the layout algorithm will adjust the graph to accomodate the new node position.