Implement grid approximation using B-splines.