Example #1
0
 public Color L(Point point, out Point lightPos, out Normal lightDir)
 {
     Vector dir = this.Position - point;
     float dist = dir.Magnitude();
     lightDir = new Normal(dir);
     lightPos = this.Position;
     return (this.E / (dist * dist));
 }
Example #2
0
 public static Point Perturb(Point point, Normal toward)
 {
     return point + PERTURB * toward;
 }
Example #3
0
 public float f(Normal wi, Normal wo)
 {
     return (float)(1 / System.Math.PI);
 }
Example #4
0
 public Ray(Point origin, Normal direction)
 {
     this.Origin = origin;
     this.Direction = direction;
 }