private Point2D computeCenter(ArrayList<Point2D> points){
  final Point center=new Point(0,0);
  if (points.size() > 0) {
    for (    Point2D aPt : points) {
      center.x+=(int)aPt.getX();
      center.y+=(int)aPt.getY();
    }
    center.x/=points.size();
    center.y/=points.size();
  }
  return center;
}

private Point2D computeCenter ( ArrayList < Point2D > points ) { final Point center = new Point ( 0 , 0 ) ; if ( points . size ( ) > 0 ) { for ( Point2D aPt : points ) { center . x += ( int ) aPt . getX ( ) ; center . y += ( int ) aPt . getY ( ) ; } center . x /= points . size ( ) ; center . y /= points . size ( ) ; } return center ; }
computes the center for a set of points
