Added endpoint interpolation

TODO: Need to handle the case were the curve loops back on itself.