code: protected void calculateRadius() {
          boundingCircleRadius = 0;
          
          for(int i=0;i<points.length;i+=2) {
              float temp = ((points[i] - center[0]) * (points[i] - center[0])) + 
                      ((points[i + 1] - center[1]) * (points[i + 1] - center[1]));
              boundingCircleRadius = (boundingCircleRadius > temp) ? boundingCircleRadius : temp;
          }
          boundingCircleRadius = (float)Math.sqrt(boundingCircleRadius);
      }
docs: Calculate the radius of a circle that can completely enclose this shape.