Graphical Tree Maker

From AbulWiki

Jump to: navigation, search

Dynamic Method

See if I can figure out how to modify the WebSite Graphs thing to make visual representations of the various family trees I am working on. Ideally we want:

  • Take some sort of simple tree description as input (maybe even the trees on the Wiki)
  • Two colors, one for male, one for female
  • Rollover gives full name
  • Click on node takes one to wiki node for person

All of the above may be a tall order, but it would be very cool...

Equal Div Method

GenString = MFFMMF type string. Range = scope of graph... 2 pi for a full circle, pi for a half circle.

Pseudocode:

Theta = 0
G = length(GenString)
For Gen = 1  to G {
     Dir = +1 if GenString(Gen)=M, -1 if GenString(Gen)=F
     Theta = Theta + Dir*Range/2^(Gen+1)
}
r=G
x=r*cos(Theta)
y=r*sin(Theta)

Then scale appropriately to the space available.

Personal tools
Toolbox
 

web tracker