Resample a path into n equidistance points, JavaScript. Read Kristensonn's SHARK paper, they offhandedly mentioned this, wanted to see how hard it was to code up.