code: def bounding_box(self):
          
  
          # We use the solution described in http://stackoverflow.com/a/88020
          # which is to use the parametric equation of an ellipse and to find
          # when dx/dt or dy/dt=0.
  
          cos_angle = np.cos(self.angle)
          sin_angle = np.sin(self.angle)
          tan_angle = np.tan(self.angle)
  
          t1 = np.arctan(-self.height * tan_angle / self.width)
          t2 = t1 + np.pi * u.rad
  
          dx1 = 0.5 * self.width * cos_angle * np.cos(t1) - 0.5 * self.height * sin_angle * np.sin(t1)
          dx2 = 0.5 * self.width * cos_angle * np.cos(t2) - 0.5 * self.height * sin_angle * np.sin(t2)
  
          if dx1 > dx2:
              dx1, dx2 = dx2, dx1
  
          t1 = np.arctan(self.height / tan_angle / self.width)
          t2 = t1 + np.pi * u.rad
  
          dy1 = 0.5 * self.height * cos_angle * np.sin(t1) + 0.5 * self.width * sin_angle * np.cos(t1)
          dy2 = 0.5 * self.height * cos_angle * np.sin(t2) + 0.5 * self.width * sin_angle * np.cos(t2)
  
          if dy1 > dy2:
              dy1, dy2 = dy2, dy1
  
          xmin = self.center.x + dx1
          xmax = self.center.x + dx2
          ymin = self.center.y + dy1
          ymax = self.center.y + dy2
  
          return BoundingBox.from_float(xmin, xmax, ymin, ymax)
docs: The minimal bounding box (`~regions.BoundingBox`) enclosing the
          exact elliptical region.