functional simple ray tracer