With these shapes, this can be solved analytically with the equations shown. If this was raytracing, you'd need a lot of rays for such a clean image.