Improve path approximation algorithm
 - Now approximates to a minimum number of segments
 - Increased precision of final points to six decimal points

Also, added an example file