question: public double [ ] homogeneRelativeVector ( double [ ] v ) { assert ( v . length == dim ) ; double [ ] dv = Arrays . copyOf ( v , dim + 1 ) ; dv [ dim ] = 0.0 ; return dv ; }
target:  Transform a relative vector into homogeneous coordinates.