Building up of a ray tracer algorithm based on info from www.scratchapixel.com