private boolean axisOfSeparation(Point2D[] tPoints, Point2D[] oPoints) {
        // loop over this Sprite's bounding box's segments.
        // Vectors describing the segments travel clockwise around the bounding box.

        for (int i = 0; i < 4; i++) {
            Point2D q = tPoints[i];
            Point2D r = tPoints[(i + 1) % 4];

            //log.d("Comparing segment " + q + "->" + r);

            // vector b pointing in the direction of this segment from q to r.

            int bx = (int) (r.getX() - q.getX());
            int by = (int) (r.getY() - q.getY());

            // vector n is the normal vector to b and a (0,0,1) defined by a x b.

            int nx = by;
            int ny = 0 - bx;

            // compute denominator for alpha test

            int denom = bx * ny - by * nx;
            if (denom == 0)
                denom = 1;

            // assume no collision until proved that a collision is still possible.

            boolean impossible = true;

            // loop through each point in the other polygon to check whether it is above or below the current segment.

            for (int j = 0; j < 4; j++) {
                Point2D p = oPoints[j];
                double alpha = (bx * (p.getY() - q.getY()) + by * (q.getX() - p.getX())) / denom;

                //log.d("...to Point " + p);

                // alpha < 0 if other's point is below current axis of separation. This means that it is probable that there is a collision.

                if (alpha < 0) {
                    impossible = false;
                    break;
                }
            }

            // impossible if all of other's points are above current axis of separation. This means no collision is possible.

            if (impossible)
                return false;
        }
        return true;
    }