rewrite basic_convolution
basic convolution works via the 1 weird trick of using the distance function to actually compute and return the coefficient