First steps to implement principal curves.