Simple ray tracer in Scala