Add rect jittering to vignette

Also fix minor bug in resolution calculation
Segments should inherit from rects
Fix bug in DP distance.

A priori, there is no reason that the distance between the line and the point must decrease as you add more points. This ensures that it does by never allowing the distance to be greater than the previous maximum.