Perfectly focusing refractive surface On reading Feynman's lecture on physics, in the geometrical optics section he said that a curve which focuses all the rays coming from a point to another fixed point beyond  the refracting surface perfectly is a complicated fourth degree curve which is actually the locus of all point with its distance $Op$ from one point, $O$ plus the distance $O_1p$, from another point $o_1$ times a number $n$ (refractive index of the material beyond the refractive surface) is a constant independent of point $p$ on the curve.
But I don't know how to derive this curve, or as a matter of fact, how to even begin to. Any derivation would be greatly appreciated (simple preferred).given below is the excerpt from feynman's lectures which is what i reffered to in my question.

 A: Let's try the hard way without Feynman's argument. Just Snell's law.
We can choose a frame $(x,z)$ where $z$ is along $OO'$ and $O$ is at $(0,0)$. We suppose the curve equation is written $z=f(x)$ where $(x,z)$ is the location of point $P$. The vector normal to the curve at $P$ can be written $\vec N = (1,-1/f'(x))$. Now, knowing Snell's law, you can write $\sin\theta =n\sin\theta'$, and rewrite it with vector products as $$\frac{\vec{OP}\times\vec N}{OP\;\;N}=-n\frac{\vec{O'P}\times\vec N}{O'P\;\; N}$$
where $N$ can be eliminated on the denominator.
Expressing all terms as a function of $x$ and $z=f(x)$, you can obtain a differential equation on $f(x)$.
$$[x+f(x)f'(x)]\sqrt{(x'-x)^2+(z'-f(x))^2}+n[(x'-x)+(z'-f(x))f'(x)]\sqrt{x^2+f(x)^2}=0$$
That seems really difficult to solve unless there is some  clever calculus to do.
In fact, Feynman argument saying that the light should take the same time to travel that distance, whatever the trajetory, is very clever. It should not be absolutely necessary to use that, but it simplifies the problem: $OP+nO'P=\mathrm{cste}=C$. This translates into $$\sqrt{x^2+z^2}+n\sqrt{(x'-x)^2+(z'-z)^2}=C$$
which you can rewrite as a fourth order equation.
