init ray tracing code