Implemented curve.cpp