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)); }
public static Point Perturb(Point point, Normal toward) { return point + PERTURB * toward; }
public float f(Normal wi, Normal wo) { return (float)(1 / System.Math.PI); }
public Ray(Point origin, Normal direction) { this.Origin = origin; this.Direction = direction; }