This procedural project was done in Houdini. The recursive algorithm was written in Python, which provided the steps for changing the rods. After storing the steps, the smallest disk corresponding to the rod changes its position. Based on that, I create primitives that can be used as paths with the primuv() function. For a smoother animations, the path is filtered with chops.
Procedural animation of Tower of Hanoi using the recursive algorithm
https://www.youtube.com/watch?v=rf6uf3jNjbo
The algorithm returns an array of steps (from rod start to rod end)
A better visualization and algorithm explanation are in "Towers of Hanoi: A Complete Recursive Visualization" - https://www.youtube.com/watch?v=rf6uf3jNjbo
Applying the steps from the array to the corresponding disks returns the start and end positions of the disk.