public double[] homogeneVector(double[] v){
  assert (v.length == dim);
  double[] dv=Arrays.copyOf(v,dim + 1);
  dv[dim]=1.0;
  return dv;
}

public double [ ] homogeneVector ( double [ ] v ) { assert ( v . length == dim ) ; double [ ] dv = Arrays . copyOf ( v , dim + 1 ) ; dv [ dim ] = 1.0 ; return dv ; }
transform an absolute vector into homogeneous coordinates .
