def getAreaLoop(loop):
 areaLoopDouble = 0.0
 for (pointIndex, point) in enumerate(loop):
  pointEnd = loop[((pointIndex + 1) % len(loop))]
  areaLoopDouble += ((point.real * pointEnd.imag) - (pointEnd.real * point.imag))
 return (0.5 * areaLoopDouble)

def getAreaLoop ( loop ) : areaLoopDouble = 0.0 for ( pointIndex , point ) in enumerate ( loop ) : pointEnd = loop [ ( ( pointIndex + 1 ) % len ( loop ) ) ] areaLoopDouble += ( ( point . real * pointEnd . imag ) - ( pointEnd . real * point . imag ) ) return ( 0.5 * areaLoopDouble )
get the area of a complex polygon .