Consider an ellipse where one of the foci is at the pole:

The eccentricity of an ellipse is:
The directrix of an ellipse lies at:
The focal parameter is the distance from the focus to the nearest directrix. For the positive side:
Let point \(A\) be a random point in the ellipse. In polar coordinates, \(A= (\theta_A, r(\theta_A))\). For simplicity, let \(r_A = r(\theta_A)\), so \(A= (\theta_A, r_A))\):

Let \(d\) be the shortest distance from \(A\) to the directrix:

The dotted line below has the length \(r_A \cos(\theta_A)\):

The focal parameter is the distance from the focus to the directrix. This means the sum of the length of the dotted line and the distance \(d\) should give the focal parameter:
Let's figure out the value of \(d\). Since the distance from \(A\) to the focus divided by the distance from \(A\) to the directrix is \(e\), then:
Therefore:
Multiplying both sides by \(e\):
Making \(r_A\) the subject:
Through similar line of reasoning, you can derive an equation for the ellipse if the other focus was at the pole instead. For this, you will have to consider the other directrix:
Similarly, if the major axis was on the \(y\)-axis: