Original Post
I'm attempting to write a simple raytracer but I came across some problems when included planes in the raytracer. Here's what output I'm getting by raytracing a plane with normal = (0,1,0) and d = 1 
Shot at 2007-08-07 The function that's handling ray plane intersection tests is: I don't understand the weird output, what's going on?

Shot at 2007-08-07 The function that's handling ray plane intersection tests is:
collisionInfo CPlane::IntersectRay(const tRay &ray)
{
collisionInfo collInfo;
collInfo.isCollision = false;
float denominator = Dot(ray.dir, normal);
if (fabs(denominator)<EPSILON)
return collInfo;
float numerator = Dot(ray.origin, normal) + d;
float t = -numerator / denominator;
collInfo.isCollision = true;
collInfo.intersection = ray.origin+ray.dir*t;
collInfo.t = t;
collInfo.normal = normal;
collInfo.material = &mat
return collInfo;
}