
public abstract class Shape {
   int traceRay(double v[], double w[], double t[]) { return 0; }
   int traceRay(double V[], double t[]) { return 0; }
   void computeNormal(double p[], double n[]) {}

   double matrix[][] = new double[4][4];
   double theta = 0, sin = 0, cos = 1, x = 0, y = 0, z = 0;
   Material material;
   void rotate(double theta) {
      this.theta += theta;
      sin = Math.sin(this.theta);
      cos = Math.cos(this.theta);
   }
   void transform() { }
   void transform(double[][] m) { }
   static void normalize(double v[]) {
      double s = Math.sqrt(v[0]*v[0] + v[1]*v[1] + v[2]*v[2]);
      v[0] /= s;
      v[1] /= s;
      v[2] /= s;
   }
}


