function detectFeet(contour, { 
  maxStroke = 10, longestFoot = 100, angleTol = 2
} = {}) {
  let leftFeet = [], rightFeet = [];
  contour.forEach((pt1, i) => {
    const pt2 = contour[mod(i+1, contour.length)],
          pt3 = contour[mod(i+2, contour.length)], 
          pt4 = contour[mod(i+3, contour.length)],
          pt5 = contour[mod(i+4, contour.length)],
          pt6 = contour[mod(i+5, contour.length)],
          pt7 = contour[mod(i+6, contour.length)];
    if (isLeftFoot(pt1, pt2, pt3, pt4, pt5, pt6, pt7, { 
    maxStroke, longestFoot, angleTol })) {
      leftFeet.push(mod(i+1, contour.length));
    }
    const isRight = isLeftFoot(...[ pt7, pt6, pt5, pt4, pt3, pt2, pt1 ].map(
      pt => ({ x: 1000 - pt.x, y: pt.y, on: pt.on })), 
      { maxStroke, longestFoot, angleTol });
    if (isRight) rightFeet.push(mod(i+5, contour.length));
  });
  return [ leftFeet, rightFeet ];
}
Feet detection
@param { Contour } contour 
@param { { maxStroke: number?, longestFoot: number?, 
angleTol: number? } } config 
@returns { [ number[], number[] ] }