gen_path function

Generates a curve of the field