Fibonacci Machine

This is an example of a visual representation of a recursive algorithm. Procedures are boxes. Arguments are passed into procedures through the dark grey strip along the top, and results are deposited into the dark gray strip along the bottom. When a procedure is called, it gets nested in miniature inside the procedure that called it. "Flow of control" is displayed in cyan.

- Ken Perlin

Instructions: click on the picture, then type a digit. The Fibonacci function will be computed for that digit. To examine partial results, click on any component to zoom into it.

Fibonacci( n ) = F( n , 0 , 1 )
F( n , a , b ) = if n > 0 then F( n-1 , b , a+b ) else a