Optical raytracing based on Python