Creating a ray tracer using Scala