private void visualizeRTreeEntry(SVGPlot svgp,Element layer,ProjectionParallel proj,AbstractRStarTree<? extends N,E,?> rtree,E entry,int depth,int step){
  final int dim=proj.getVisibleDimensions();
  double[] min=proj.fastProjectDataToRenderSpace(SpatialUtil.getMin(entry));
  double[] max=proj.fastProjectDataToRenderSpace(SpatialUtil.getMax(entry));
  assert (min.length == dim && max.length == dim);
  SVGPath path=new SVGPath();
  for (int i=0; i < dim; i++) {
    path.drawTo(getVisibleAxisX(i),Math.max(min[i],max[i]));
  }
  for (int i=dim - 1; i >= 0; i--) {
    path.drawTo(getVisibleAxisX(i),Math.min(min[i],max[i]));
  }
  path.close();
  Element intervals=path.makeElement(svgp);
  SVGUtil.addCSSClass(intervals,INDEX + depth);
  layer.appendChild(intervals);
  if (!entry.isLeafEntry()) {
    N node=rtree.getNode(entry);
    for (int i=0; i < node.getNumEntries(); i++) {
      E child=node.getEntry(i);
      if (!child.isLeafEntry()) {
        visualizeRTreeEntry(svgp,layer,proj,rtree,child,depth + 1,++step);
      }
    }
  }
}

private void visualizeRTreeEntry ( SVGPlot svgp , Element layer , ProjectionParallel proj , AbstractRStarTree < ? extends N , E , ? > rtree , E entry , int depth , int step ) { final int dim = proj . getVisibleDimensions ( ) ; double [ ] min = proj . fastProjectDataToRenderSpace ( SpatialUtil . getMin ( entry ) ) ; double [ ] max = proj . fastProjectDataToRenderSpace ( SpatialUtil . getMax ( entry ) ) ; assert ( min . length == dim && max . length == dim ) ; SVGPath path = new SVGPath ( ) ; for ( int i = 0 ; i < dim ; i ++ ) { path . drawTo ( getVisibleAxisX ( i ) , Math . max ( min [ i ] , max [ i ] ) ) ; } for ( int i = dim - 1 ; i >= 0 ; i -- ) { path . drawTo ( getVisibleAxisX ( i ) , Math . min ( min [ i ] , max [ i ] ) ) ; } path . close ( ) ; Element intervals = path . makeElement ( svgp ) ; SVGUtil . addCSSClass ( intervals , INDEX + depth ) ; layer . appendChild ( intervals ) ; if ( ! entry . isLeafEntry ( ) ) { N node = rtree . getNode ( entry ) ; for ( int i = 0 ; i < node . getNumEntries ( ) ; i ++ ) { E child = node . getEntry ( i ) ; if ( ! child . isLeafEntry ( ) ) { visualizeRTreeEntry ( svgp , layer , proj , rtree , child , depth + 1 , ++ step ) ; } } } }
recursively draw the mbr rectangles .
