#include <iostream>
#include <cmath>
#include <vector>
#include "boost/shared_ptr.hpp"
using namespace std;
namespace math = lsst::afw::math;
int const nX = 20;
double const xLo = 0;
double const xHi = 2.0*M_PI;
double const range = xHi - xLo;
for (int i = 0; i < nX; ++i) {
x[i] = xLo + static_cast<double>(i)/(nX - 1) * range;
y[i] = sin(x[i]);
}
int const nX2 = 100;
vector<double> x2(nX2);
for (int i = 0; i < nX2; ++i) {
x2[i] = xLo + ( ((nX + 2.0)/nX)*static_cast<double>(i)/(nX2 - 1) - 1.0/nX) * range;
}
for (int i = 0; i < nX2; ++i) {
cout << i << " " << x2[i] << " " <<
yinterpL->interpolate(x2[i]) << " " <<
yinterpS->interpolate(x2[i]) << " " <<
endl;
}
return 0;
}