+ public static Matrix reflect(Vec v) {
+ Vec reflectionPlaneNormal = v.norm();
+ float a = reflectionPlaneNormal.x;
+ float b = reflectionPlaneNormal.y;
+ float c = reflectionPlaneNormal.z;
+ return
+ new Matrix( 1-2*a*a, -2*a*b, -2*a*c, 0,
+ -2*a*b, 1-2*b*b, -2*b*c, 0,
+ -2*a*c, -2*b*c, 1-2*c*c, 0,
+ 0, 0, 0, 1);
+ }
+
+ public Vec getTranslationalComponent() {
+ return new Vec(d, h, l);
+ }
+