Ray tracing Computer Graphics implementation - C++