implement cspline interpollation, begin first small step in modularization of engine.js