Python ray tracing