[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: self-loops in graphs
From: |
Jeff Kingston |
Subject: |
Re: self-loops in graphs |
Date: |
Fri, 19 Jun 1998 08:35:24 +1000 |
Michael Piotrowski wrote that he was not happy with
extend @DiagramPrint @Diag
macro @FinalNode {
@Circle vmargin{0f} @Circle hmargin{0.5f}
}
First of all it ought to be a definition, not a macro:
extend @DiagramPrint @Diag
def @FinalNode right x {
@Circle vmargin { 0f } @Circle hmargin { 0.5f } x
}
Next, the margins look strange but I'd have to fiddle with it
to see why they worked at all. The summary at the end of the
diagrams chapter shows exactly how circles fit over things.
He also wrote:
The way I coded the start state is clumsy, ...
I can see two clumsinesses. First, the invisible node that the
arrow starts from. I think this is basically inevitable; every
arrow has to start from somewhere. But it could perhaps be
packaged up in a definition such as
extend @DiagramPrint @Diag
def @HereIs right label {
label:: @Node outlinestyle { noline } margin { 0c }
}
So that you can write
@HereIs Start
anywhere you like. The other clumsiness is using @DP and || for the
layout of the nodes. As the chapter says, node layout is @Diag's
weak point, but I do think using @Tab is a better option here, since
it gives you some kind of structure that things can be added to.
There is an example of the use of @Tab in diagrams in the @Diag chapter.
Jeff