In order to see the source code, open the debugging view in your browser (e.g. F12 in Chrome), and inspect the sources for the examples.
A simple 3d quadratic function is used for minimization.