Improve Curve

Now it includes 'end' in the curve's range.

AND it's more clever : if it detects a loop in the curve it will
beautifully "link" the two extremes with a correct outline.