2012-04-09 77 views
0

我正在寻找绘制如图http://mitpress.mit.edu/sicp/full-text/book/ch3-Z-G-35.gif, http://mitpress.mit.edu/sicp/full-text/book/ch3-Z-G-49.gif,http://mitpress.mit.edu/sicp/full-text/book/ch3-Z-G-51.gif的方式,在SICP中以signal-flow diagram命名。我尝试了一些方法,但失败了。我在等你的帮助。我试过graphviz并编写下面的代码。我想得到斐波那契数列流的图。绘制信号流程图,如SICP

digraph G { 
    add [shape = box]; 
    cons_1 [shape = box, label = "cons"]; 
    cons_2 [shape = box, label = "cons"]; 
    fibs [shape = point]; 
    Efibs [shape = point]; 
    single_0 [shape = none, label = "0"]; 
    single_1 [shape = none, label = "1"]; 
    subgraph cluster_0 { 
     add -> cons_1 -> Efibs -> cons_2 -> fibs; 
    } 
    single_0 -> cons_1 [style = dotted]; 
    single_1 -> cons_2 [style = dotted]; 
    Efibs -> add; 
    fibs -> add; 
} 

但结果很尴尬。有没有简单的工具(我更喜欢WYTIWYG)或教程来绘制这种图?

非常感谢。

回答

0

如果你对LaTeX感到满意,TiKz package可以产生很好的图表。虽然如果你之前没有用过它,那么可能不值得为此学习。

+0

谢谢。几天前,我学习了TiKz并画出了一些流程图。现在我开始阅读TAOCP了。 – 2012-07-27 03:46:06