basecurve: ported thorsten's scattered data dumper to c.

next steps would be fitting the monotonic hermite.