Wrote code to generate NLP equations from an arc.

Still pretty rough, and mostly untested. Updated the example a little to test
the "new" features of function generation.