def tkPolar( x1, y1, x2, y2 ):
      '''Calculate the direction (in radians, 3 o'clock is 0,
      down is 1/2 PI, etc.) and distance (in pixels) between to points.
      All arguments should be in the same units (python float or int).
      The result is in the same units as the arguments.'''
      import math
      deltaX = math.fabs( x1 - x2 )
      deltaY = math.fabs( y1 - y2 )

      direction = math.atan2( deltaY, deltaX )
      distance  = math.sqrt( math.pow(deltaX, 2) + math.pow(deltaY, 2) )

      return direction, distance
Calculate the direction (in radians, 3 o'clock is 0,
      down is 1/2 PI, etc.) and distance (in pixels) between to points.
      All arguments should be in the same units (python float or int).
      The result is in the same units as the arguments.
recipes/Python/552745_tkMath_convert_between_pixels_inches_cm/recipe-552745.py