def _projectPoly(poly, normal):
 pMin = numpy.dot(normal, poly[0])
 pMax = pMin
 for n in xrange(1, len(poly)):
  p = numpy.dot(normal, poly[n])
  pMin = min(pMin, p)
  pMax = max(pMax, p)
 return (pMin, pMax)

def _projectPoly ( poly , normal ) : pMin = numpy . dot ( normal , poly [ 0 ] ) pMax = pMin for n in xrange ( 1 , len ( poly ) ) : p = numpy . dot ( normal , poly [ n ] ) pMin = min ( pMin , p ) pMax = max ( pMax , p ) return ( pMin , pMax )
project a convex polygon on a given normal .