@Override public ShapeTileOctagon bounding_octagon(){
  if (precalc_bounding_octagon != null)   return precalc_bounding_octagon;
  double lx=Integer.MAX_VALUE;
  double ly=Integer.MAX_VALUE;
  double rx=Integer.MIN_VALUE;
  double uy=Integer.MIN_VALUE;
  double ulx=Integer.MAX_VALUE;
  double lrx=Integer.MIN_VALUE;
  double llx=Integer.MAX_VALUE;
  double urx=Integer.MIN_VALUE;
  for (int index=0; index < lines_size(); ++index) {
    PlaPointFloat curr=corner_approx(index);
    lx=Math.min(lx,curr.v_x);
    ly=Math.min(ly,curr.v_y);
    rx=Math.max(rx,curr.v_x);
    uy=Math.max(uy,curr.v_y);
    double tmp=curr.v_x - curr.v_y;
    ulx=Math.min(ulx,tmp);
    lrx=Math.max(lrx,tmp);
    tmp=curr.v_x + curr.v_y;
    llx=Math.min(llx,tmp);
    urx=Math.max(urx,tmp);
  }
  precalc_bounding_octagon=new ShapeTileOctagon(Math.floor(lx),Math.floor(ly),Math.ceil(rx),Math.ceil(uy),Math.floor(ulx),Math.ceil(lrx),Math.floor(llx),Math.ceil(urx));
  return precalc_bounding_octagon;
}

@ Override public ShapeTileOctagon bounding_octagon ( ) { if ( precalc_bounding_octagon != null ) return precalc_bounding_octagon ; double lx = Integer . MAX_VALUE ; double ly = Integer . MAX_VALUE ; double rx = Integer . MIN_VALUE ; double uy = Integer . MIN_VALUE ; double ulx = Integer . MAX_VALUE ; double lrx = Integer . MIN_VALUE ; double llx = Integer . MAX_VALUE ; double urx = Integer . MIN_VALUE ; for ( int index = 0 ; index < lines_size ( ) ; ++ index ) { PlaPointFloat curr = corner_approx ( index ) ; lx = Math . min ( lx , curr . v_x ) ; ly = Math . min ( ly , curr . v_y ) ; rx = Math . max ( rx , curr . v_x ) ; uy = Math . max ( uy , curr . v_y ) ; double tmp = curr . v_x - curr . v_y ; ulx = Math . min ( ulx , tmp ) ; lrx = Math . max ( lrx , tmp ) ; tmp = curr . v_x + curr . v_y ; llx = Math . min ( llx , tmp ) ; urx = Math . max ( urx , tmp ) ; } precalc_bounding_octagon = new ShapeTileOctagon ( Math . floor ( lx ) , Math . floor ( ly ) , Math . ceil ( rx ) , Math . ceil ( uy ) , Math . floor ( ulx ) , Math . ceil ( lrx ) , Math . floor ( llx ) , Math . ceil ( urx ) ) ; return precalc_bounding_octagon ; }
calculates a bounding octagon of the simplex .
