## A visualization of a computation in tree form

To manipulate the demo below, you must have Wolfram CDF Player installed on your computer. It is available free from the Wolfram website.

This demonstration shows the step by step computation of the value of the expression $3x^2+2(1+y)$ shown as a tree.  By moving the first slider from right to left, you go through the six steps of the computation. You may select the values of $x$ and $y$ with the second and third sliders.  If you click on the plus sign next to a slide, a menu opens up that allows you to make the slider move automatically, shows the values, and other things.

Note that subtrees on the same level are evaluate left to right.  Parallel processing would save two steps.

The code for this demo is in the file  Live evaluation of expressions in TreeForm 3.  The code is ad-hoc.  It might be worthwhile for someone to design a package that produces this sort of tree for any expression.

A previous post related to this post is Making visible the abstraction in algebraic notation.