docs: public double[] unhomogeneVector(double[] v) {
      assert (v.length == dim + 1);
      // TODO: this only works properly when trans[dim][dim] == 1.0, right?
      double[] dv = new double[dim];
      double scale = v[dim];
      assert (Math.abs(scale) > 0.0);
      for(int i = 0; i < dim; i++) {
        dv[i] = v[i] / scale;
      }
      return dv;
    }