CLIM mail archive

[Prev][Next][Index][Thread]

What is the default arc-drawer for format-graph-from-roots



    Date: Mon, 15 Nov 1993 22:14 EST
    From: Andrew Philpot <philpot@ptolemy.arc.nasa.gov>

    CLIM2.0, Allegro4.2b

    What is the default for arc-drawing in FORMAT-GRAPH-FROM-ROOTS?

    According to the documentation, arcs between nodes will be drawn with
    (what one would expect to be straight) lines.

    From the Franz online documentation (the printed is essentially
    similar):

	arc-drawer
	      is a function of seven positional and some unspecified
	      keyword arguments that is responsible for drawing the
	      arcs from one node to another; it has dynamic extent.
	      The positional arguments are the stream, the ``from''
	      node, the ``to'' node, the ``from'' x and y position,
	      and the ``to'' x and y position.  The keyword arguments
	      are typically line drawing options, such as for draw-
	      line*.  If arc-drawer is unsupplied, the default
	      behavior is to draw a thin line from the ``from'' node
	      to the ``to'' node using draw-line*.

    I read this as a single segment being drawn with DRAW-LINE*.

    However, I'm seeing a more specialized space-filling  kind of line
    segment being drawn at present.  For example, in a graph where A has
    children B and C and B has child C, we might see something like (I'm
    guessing here, I haven't tried this out).

    A----B----C
     \_______/

In Franz and Symbolics CLIM, there is a magic option to
FORMAT-GRAPH-FROM-ROOTS called :MAXIMIZE-GENERATIONS that causes the
graph formatter to insert "dummy" nodes in the graph.  In Franz CLIM,
the default for :MAXIMIZE-GENERATIONS is T; in Symbolics CLIM, it
defaults to NIL (since I don't think this behavior is what is wanted
as the default).  The dummy nodes are connected by edges drawn by the
arc drawer.

    These kind of "smart" lines are nice but I'd like to know more about
    how I can modify this output.  One of the nice things about straight
    segments is that when a large number of lines converge on a single
    node, you can follow the general angular orientation of a line segment
    linking two nodes and use it to estimate the actual start and finish
    nodes for the link.  With highly curvy lines, this can be harder to
    decipher.  So it would be nice to know what this function is and what
    sort of arc-drawing-options are appropriate for it.  If some
    documentation is in the pipe, could I see a preliminary version?

If you don't like this behavior for this application, just supply
:MAXIMIZE-GENERATIONS NIL.

    (I did apropos and found 
    CLIM-INTERNALS::ARC-DRAWING-OPTIONS
    CLIM-INTERNALS::ARC-DRAWER
    CLIM-INTERNALS::CALL-ARC-DRAWER [function] (STREAM ARC-DRAWER
		    PARENT-OBJECT CHILD-OBJECT ...)
    CLIM-INTERNALS::CALL-ARC-DRAWER-1 [function] (STREAM ARC-DRAWER
		    PARENT-OBJECT CHILD-OBJECT ...)
    :ARC-DRAWING-OPTIONS value: :ARC-DRAWING-OPTIONS
    :ARC-DRAWER         value: :ARC-DRAWER
    )

    And while I've got your attention, can someone explain to me what the
    nodes labeled "1>" and ">1" indicate?  I don't recall seeing these
    before.  I might have imagined that they correspond to a detected
    circularity in my graph, but I don't think I have any such.  They
    correspond to output record elements that look like:

These are "offpage" connectors.  I'll leave it to someone at Franz to
describe their exact semantics.

      #<CLIM-INTERNALS::GRAPH-NODE-CONNECTOR-IN-OUTPUT-RECORD /x 59:77 y
	    120:134/ @ #x158f762> 
      #<CLIM-INTERNALS::GRAPH-NODE-CONNECTOR-OUT-OUTPUT-RECORD /x
	    1950:1968 y 128:142/ @ #x158f6c2>

    I don't know about this.  Note that one of these belongs in the root
    rank of the graph and is indeed recorded in the ROOT-NODES slot of the
    output record.

    And finally, how big should a graph get before one decides to use the
    RTREE stuff instead of the STANDARD-TREE-OUTPUT-HISTORY?  Or do I have
    something confused.  My graph in the end has about 750 "graph node
    filler output record 1" objects (link segments?) and 53 nodes.

    Thanks for any insight you can provide.

Graphs are built on STANDARD-SEQUENCE-OUTPUT-RECORD.  You can't
control that.  Even if you could control it, there would be no benefit
to using R-trees, since the contents of a graph output record are
largely non-overlapping.


Main Index | Thread Index