Here are the test results (running main() ) for the three geometry classes. RPF 1/24/05 [PBG4:examps/examps/geom] robertfu% java Vec Empty vector is: [0.0,0.0,0.0] v1 is: [1.0,0.0,1.0] v2 is: [0.0,1.0,0.0] Inner product of v1, v2: 0.0 Outer product of v1, v2: [-1.0,0.0,1.0] Outer product of v2, v1 (other order): [1.0,0.0,-1.0] v3: [3.0,4.0,0.0] Length of v3: 5.0 Normalized copy of v3: [0.6,0.8,0.0] v3 itself normalized. Not a copy: [0.6,0.8,0.0] [PBG4:examps/examps/geom] robertfu% java Mat Unit matrix is: | 1.0000 0.0000 0.0000 0.0000 | | 0.0000 1.0000 0.0000 0.0000 | | 0.0000 0.0000 1.0000 0.0000 | | 0.0000 0.0000 0.0000 1.0000 | Translation matrix: | 1.0000 0.0000 0.0000 1.0000 | | 0.0000 1.0000 0.0000 2.0000 | | 0.0000 0.0000 1.0000 3.0000 | | 0.0000 0.0000 0.0000 1.0000 | Vector to be translated is: [5.0,5.0,5.0] Translated vec is: [6.0,7.0,8.0] Second translation matrix: | 1.0000 0.0000 0.0000 7.0000 | | 0.0000 1.0000 0.0000 11.0000 | | 0.0000 0.0000 1.0000 15.0000 | | 0.0000 0.0000 0.0000 1.0000 | Product of two translations, should be additive: | 1.0000 0.0000 0.0000 8.0000 | | 0.0000 1.0000 0.0000 13.0000 | | 0.0000 0.0000 1.0000 18.0000 | | 0.0000 0.0000 0.0000 1.0000 | [PBG4:examps/examps/geom] robertfu% java Triangle Triangle vertices are: [0.0,0.0,0.0] [100.0,0.0,0.0] [0.0,100.0,0.0] Translation matrix: | 1.0000 0.0000 0.0000 1.0000 | | 0.0000 1.0000 0.0000 2.0000 | | 0.0000 0.0000 1.0000 3.0000 | | 0.0000 0.0000 0.0000 1.0000 | Translated triangle vertices are: [1.0,2.0,3.0] [101.0,2.0,3.0] [1.0,102.0,3.0]