Ray tracing and lens equation