function updateFeetIndices(contour, leftFeet, rightFeet) {
  const removedIndices = [];
  leftFeet.forEach(index => {
    removedIndices.push(mod(index+1, contour.length));
    removedIndices.push(mod(index+2, contour.length));
  });
  rightFeet.forEach(index => {
    removedIndices.push(mod(index-1, contour.length));
    removedIndices.push(mod(index-2, contour.length));
  });
  removedIndices.sort((a, b) => a - b);
  let n = 0;
  const indexMap = contour.map((pt, i) => {
    if (removedIndices.indexOf(i) >= 0) n++;
    return i - n;
  })
  return [
    leftFeet.map(index => indexMap[index]),
    rightFeet.map(index => indexMap[index])
  ];
}
The new left feets and right feets of the contour (a few points eliminated)
@param { Contour } contour Original contour without feet removal 
@param { number[] } leftFeet 
@param { number[] } rightFeet 
@returns { [ number[], number[] ] }