Refraction at a spherical interface

A spherical interface intersects the optical axis at $(x=0,y=0)$. The interface has a radius $R$ and is centered at $C$. For $R>0$ the interface is convex and for $R<0$ the interface is concave. The index of refraction is $n_1 = 1$ to the left of the interface and $n_2$ to the right of the interface. A light ray (red) leaves an object $o$ on the left of the interface and strikes the interface at point $P$. Part of the ray is reflected and part is refracted. The angles between the red rays and the gray normal to the interface obey Snell's law $n_1\sin\theta_1 = n_2\sin\theta_2$. The incident ray and the normal to the interface define a plane. The reflected ray and the refracted ray lie in this plane. For the drawings below, the $z-$components of the incident ray and the normal vector are set to zero so that the plane is always the $x-y$ plane.

Light Source

$x_o = $ [cm]
$y_o = $ [cm]
$\phi = $ [deg]

 

Interface

$R = $ [cm]
$n_1 = 1,\,\, n_2 = $
Your browser does not support the canvas element.

Question