This script automatically displays an array in Binary Tree format, whether or not it is a complete binary tree. For this demo the test array contains the first 30 natural numbers.

It can be used in genealogy to display an individual's ancestral tree, which is binary, unlike the descendants tree which is non-binary.

Note: if we commence numbering the nodes of a binary tree at 1, then for any child of node number N_{c} , the node number of its parent is given by the following formula:

N_{p} = (N_{c} - N_{c}%2)/2