javascript - Hyperbolic / Radial Tree Layout Algorithm -


i need obtain (x,y) coordinates rendering tree data structure made of single nodes. know there algorithms example:

wikipedia: radial tree

wikipedia: hyperbolic tree

my tree looks this:

treenode=function(data,parent){ this.data=data; this.parent=parent; this.children=[]; return this; }; treenode.prototype.addchild=function(data){ this.children.push(new treenode(data,this)); return this; }; 

how ever, cant seem figure out how implement these algorithms or library me.

i using html canvas draw nodes javascrypt. need position of each node acoording 1 of stated before algorithms.

how can implement algorithm? there library can use?


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -