ray tracing sphere framework