public static Translater newIntoRegion(Rectangle2D into,Rectangle2D from){
  double scaleX=into.getWidth() / from.getWidth();
  double scaleY=into.getHeight() / from.getHeight();
  double deltaX=into.getCenterX() - (scaleX * from.getCenterX());
  double deltaY=into.getCenterY() - (scaleY * from.getCenterY());
  return new Point2dUtils.DoubleTranslater(Point2dUtils.newScaleTranslater(scaleX,scaleY),Point2dUtils.newDeltaTranslater(deltaX,deltaY));
}

public static Translater newIntoRegion ( Rectangle2D into , Rectangle2D from ) { double scaleX = into . getWidth ( ) / from . getWidth ( ) ; double scaleY = into . getHeight ( ) / from . getHeight ( ) ; double deltaX = into . getCenterX ( ) - ( scaleX * from . getCenterX ( ) ) ; double deltaY = into . getCenterY ( ) - ( scaleY * from . getCenterY ( ) ) ; return new Point2dUtils . DoubleTranslater ( Point2dUtils . newScaleTranslater ( scaleX , scaleY ) , Point2dUtils . newDeltaTranslater ( deltaX , deltaY ) ) ; }
provide a translater that maps nodes in the from region to the into region . nodes in the center ( and corners ) go to the same location in the into regions . other nodes are shifted proportionately .
