public boolean equals(Material m) {
      if (m == null)
         return false;
      for (int i = 0 ; i < 3 ; i++)
         if (ambient[i] != m.ambient[i]) return false;
      for (int i = 0 ; i < 3 ; i++)
         if (diffuse[i] != m.diffuse[i]) return false;
      for (int i = 0 ; i < 4 ; i++)
         if (specular[i] != m.specular[i]) return false;
      if (transparency != m.transparency) return false;
      return true;
   }