家系图算法
我正在开发一个 ruby 程序,它应该能够在网页上绘制家系图。
因此,我正在寻找一种用于绘制家系图或类似树结构的算法。 我更喜欢 ruby 中的算法,但其他语言也可以,或者一些解释此类算法背后原理的参考文献
C++ 中的递归算法已在此处发布,但没有以允许我使用它的方式进行记录。
任何有关如何实现家系图的帮助都会非常感激
I am developing a ruby program that should be able to draw a genogram on a web page.
I am therefore looking for an algorithm for drawing a genogram or a similar tree-structure.
I prefer an algorithm in ruby but also other languages will do or some references explaning the principles behind such an algorithm
A recursive algorithm in c++ has been published here but it is not documented in a way that allows me to use it.
Any help about how to implement a genogram would be much apriciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
AFAIK,渲染树的规范作品是 Sven Moen 的“绘制动态树”。通过谷歌搜索,您应该能够找到这篇论文或他的折线算法的实现。
您还可以查看 Graphviz 因为它可以处理树以及任意图形。
AFAIK, the canonical work on rendering trees is "Drawing Dynamic Trees" by Sven Moen. You should be able to find the paper or an implementation of his polyline algorithm with a bit of googling.
You could also have a look at Graphviz as that can handle trees as well as arbitrary graphs.