Serge's World

Blogging about software development, astronomy, genealogy and more.

Family Tree Visualisation with Unity 3D

Genealogy has a rather interesting problem. Due to the fact that every person has 2 parents, each generation you go back in time, the number of individuals at that generation increases by a factor of 2 each time. Even at 10 generations back you have 1024 individuals. This poses a bit of a problem when trying to view the data. Most genealogical software only shows you several generations in one view, which, is all that can fit on a screen, which leads to only being able to see small parts of your family tree at a time.

This is where AncestryWeb3D comes in. I chose to write this application in Unity 3D for two reasons. Firstly, I hadwanted to learn how to program with Unity, and secondly, it would give a great way to visually draw the tree.

In the tree, individuals are represented by spheres - red for female and blue for male ancestors. Ancestors with no known parents have a green semi-transparent shell to indicate dead-ends. The individuals are connected by lines of descent.

The application loads a standard GEDCOM file making it useful to visualise any tree.

Each generation is normalised to fit on a circle, and evenly spaced. This is to help with space. While the number of potential individuals at a certain generations increases exponentially, in reality, there are not nearly so many known individuals at a certain generation. This is due to intermarriage amongst ancestors, as well as dead ends. This means there is a managable number of individuals at each generation, and can therefore be shown fairly easily. The size of the spheres also indicates the number of times that individual appears in the family tree, which indicates the number of lines of decent between the root person and that individual. The biger the sphere, the more lines of decent.

This type of visualisation is very good at showing where the tree intertwines. No person’s family history is straightforward. Our ancestors all intermingled in very complex ways, with many intermariages and common lines of descent.

Hovering the mouse cursor over a sphere gives more information on the individual. The camera can be moved around by the arrow keys, and rotated by holding down the left mouse button, and panned by holding down the right mouse button.

I have open-sourced the code, so enjoy playing around with it.

The full source code is available at https://github.com/sjmeunier/ancestry-web-3d.

AncestryWeb3D

Tag Cloud

Algorithms (3) Android (10) Astronomy (25) Audio (1) Audiobooks (1) Barcodes (9) C# (69) Css (1) Deep sky (6) Esoteric languages (3) Family (3) Fractals (10) Gaming (1) Genealogy (14) General (2) Geodesy (3) Google (1) Graphics (3) Hubble (2) Humour (1) Image processing (23) Java (8) Javascript (5) jQuery (3) Jupiter (3) Maths (22) Moon (5) Music (4) Pets (5) Programming (88) Saturn (1) Science (1) Spitzer (4) Sun (4) Tutorials (68) Unity (3) Web (9) Whisky (13) Windows (1) Xamarin (2)