function isDot(contour, maxStroke) {
  if (contour.length !== 8) return false;
  let nearestOn;
  if (contour[1].on) {
    const onOffTest = !contour[2].on && !contour[3].on && contour[4].on
      && contour[5].on && !contour[6].on && !contour[7].on;
    if (!onOffTest) return false;
    nearestOn = contour[1];
  } else if (contour[7].on) {
    const onOffTest = !contour[1].on && !contour[2].on && contour[3].on
      && contour[4].on && !contour[5].on && !contour[6].on;
    if (!onOffTest) return false;
    nearestOn = contour[7];
  } else return false;
  return dist(tuple(contour[0]), tuple(nearestOn)) < maxStroke &&
  rad2deg(angle(tuple(contour[2]), tuple(contour[1]), tuple(contour[0]))) < 180;
}
Check if the contour is a dot
@param { Contour } contour 
@returns { boolean }