moved generateZ back into SurfaceFlattener. added command-line interface
update doc