示例#1
0
文件: Ray.cs 项目: tgy/CSharp
 public Ray(Vector3D origin, Vector3D direction, double intensity)
 {
     Origin = origin;
     double n = direction.Norm();
     Direction = new Vector3D(direction.X/n, direction.Y/n, direction.Z/n);
     Intensity = intensity;
 }
示例#2
0
        public Ray(Vector3D origin, Vector3D direction, double intensity)
        {
            Origin = origin;
            double n = direction.Norm();

            Direction = new Vector3D(direction.X / n, direction.Y / n, direction.Z / n);
            Intensity = intensity;
        }
示例#3
0
        public static double ReflectedRayAngleCos(Ray ray, Vector3D intersectionNormale)
        {
            double cos = Vector3D.Scalar(ray.Direction, intersectionNormale) / (ray.Direction.Norm() * intersectionNormale.Norm());

            return(Math.Pow(-Math.Log(cos + 1), 2));
        }
示例#4
0
文件: Scene.cs 项目: tgy/CSharp
 public static double ReflectedRayAngleCos(Ray ray, Vector3D intersectionNormale)
 {
     double cos = Vector3D.Scalar(ray.Direction, intersectionNormale)/(ray.Direction.Norm()*intersectionNormale.Norm());
     return Math.Pow(-Math.Log(cos + 1), 2);
 }