public class Surface{ double[] origCoeff; double[] coefficients; Matrix3D tf; material m; final int INFTY=10500; final static Vector e0=new Vector(new double[]{0,0,1}); void setMaterial(material ms){ m=new material(); m.copy(ms); } void setTransfo(Matrix3D tfs){ tf=new Matrix3D(); tf.copy(tfs); tf.invert(); tf.transpose(); tf.transform(origCoeff, coefficients); } void cube(material ms){ } double[] intersections(double[] v, double[] w){ //yields t where the ray enters and leaves the surface, // adding 0 (or -infty?) or +infty if necessary return new double[]{0}; } Vector getNormal(double[] position){ return new Vector(new double[]{0}); } double[] shade(light[] lights, double[]v, double[]w, double t, int howManyRefl, hw9 call, double refrInd){ return new double[] {0}; } public double[] shade(Surface[] obj, Light[] lights, double[] v, double[] ws, double t, int howManyRefl, hw9 calling){ return new double[] {0}; } void setCenter(double[] c){ } }