The program works in an iterative loop: creating new nodes and links, and updating the positions of existing nodes (Figure 1)