Somewhat-working resampling. The demo page produces coherent results.