title: Ray Tracing - traversing the tree
body: <p>I wrote a ray-tracing program and everything seems to be functioning apart from the algorithm I use to traverse the ray tree which I'm not sure is correct. At every collision point, the program stores the colour of the object, its reflectiveness index and the light intensity at that point (specular and diffuse, ambient is a constant). Can someone please help me and explain to me how exactly I'm supposed to be combining the colours of the objects and the light intensities as I'm traversing the ray tree? </p>