code: public int[] screenProjectionBaseRatio(double... coord) {
          double[] sc = new double[2];
          sc[0] = baseScreenCoords[0][0];
          sc[1] = baseScreenCoords[0][1];
  
          for (int i = 0; i < canvas.base.dimension; i++) {
              sc[0] += coord[i] * (baseScreenCoords[i + 1][0] - baseScreenCoords[0][0]);
              sc[1] += coord[i] * (baseScreenCoords[i + 1][1] - baseScreenCoords[0][1]);
          }
  
          return new int[]{(int) sc[0], (int) sc[1]};
      }
docs: Project logical coordinates in base ratio to Java2D coordinates.