Old code, better comment.
Generate polynomial paths.
Updated demo to use library function instead.