public Color Trace(Vector3D start, Vector3D direction, double tmin,
			double tmax, Vector3D eyePt, int depth) {
		direction = Vector3D.Normalize(direction);
		Color color = scene.getBackgroundColor();
		// is hit
		HitRecord hitRecord = getHitRecord(start, direction, tmin, tmax);
		if (hitRecord != null) {
			color = Color.DotMultiply(scene.getAmbientLight().getAmbient(),
					Scene.testMaterial.getAmbient());
			Triangle surface = (Triangle) hitRecord.getSurface();

			for (Light light : scene.getLightList()) {
				Light interfereLight = light.Clone();
				Color interfereColor = getInterfereLight(hitRecord.getHitPt(), light, surface.getNormal(), Scene.testMaterial, hitRecord);
				interfereLight.setDiffuse(interfereColor);
				interfereLight.setSpecular(interfereColor);
				Color diffuse = getDiffuseColor(hitRecord.getHitPt(), interfereLight,
						surface.getNormal(), Scene.testMaterial);
				if (diffuse != null) {
					color = Color.Add(color, diffuse);
				}
				Color specular = getSpecularColor(hitRecord.getHitPt(), interfereLight,
						surface.getNormal(), Scene.testMaterial, eyePt);
				if (specular != null) {
					color = Color.Add(color, specular);
				}

			}

			/* recursive part */
			if(false){
			//if (depth != MAX_DEPTH) {
				
				/* color += reflect * R + refract * (1-R) */
				double cos = Math.abs(Vector3D.cos(surface.getNormal(), direction));
				double R0 = Scene.testMaterial.getR0();
				double R = R0 + (1 - R0) * Math.pow(1 - cos, 5);
				System.out.println("\t\t\t\t\tR = " + R);
				
				// reflective specular
				double nd = Vector3D.DotProduct(surface.getNormal(), direction);
				Vector3D reflectRay = Vector3D.Add(direction,
						Vector3D.Scale(surface.getNormal(), nd * 2));
				Color reflectLight = Trace(hitRecord.getHitPt(), reflectRay, tmin, tmax,
						eyePt, depth + 1);
				Color relectiveSpecular = Color.DotMultiply(
						Scene.testMaterial.getSpecular(),reflectLight);
				relectiveSpecular.Scale(R);
				
				color = Color.Add(color, relectiveSpecular);
			
				//refraction
				Vector3D d = Vector3D.Normalize(direction);
				Vector3D n = Vector3D.Normalize(surface.getNormal());
				double nt = Scene.testMaterial.getRfrcIdx();
				Vector3D left = Vector3D.Add(d, Vector3D.Scale(n, cos));//here cos > 0
				Vector3D scaledLeft = Vector3D.Scale(left, 1 / nt);
				double rightScale = Math.sqrt(1 - (1 - cos*cos) / (nt*nt));
				Vector3D t = Vector3D.Substract(scaledLeft, Vector3D.Scale(n, rightScale));
				double thickness = 0.1;
				t.Print("\t\t\t\t\t\t t ");
				Vector3D outPt = Vector3D.Add(hitRecord.getHitPt(), Vector3D.Scale(t, thickness));
				Color refractLight = Trace(outPt, direction, tmin, tmax,
						eyePt, depth + 1);
				//Color refractLight = Trace(hitRecord.getHitPt(), direction, 0.1, tmax,
				//		eyePt, depth + 1);
				if(refractLight != null){System.out.println("dd");}
				//refractLight.Scale(1 - R);
				color.Print("before refract");
				refractLight.Print("refractLight");
				color = Color.Add(color, refractLight);
			}
			color.ToColor255().Print("final");
		}
		return color;
	}