Finding the polar form of an ellipse rotated about its focus

43 Views Asked by At

I'm working on an assignment, and I have to calculate the time spent eclipsed by a planet in an orbit. We've been shown how to do it for a circular orbit, but that's easy / boring and I want to take it further, for eccentric orbits.

As the planet rotates about the sun, the angle of the shadow will change. To model this, I am having an ellipse rotate about its focus, as shown below.

At 0 rad

At ~0.4 rad

The equation for this ellipse:

$(\frac{\cos^{2}(\alpha)}{a^2})(x-c\cos(\alpha))^{2}+2\cos(\alpha)\sin(\alpha)(\frac{1}{a^2}-\frac{1}{b^2})(x-c\cos(\alpha))(y-c\sin(\alpha))+(\frac{\cos^{2}(\alpha)}{b^{2}}+\frac{\sin^{2}(\alpha)}{a^{2}})(y-c\sin(\alpha))^2=1$

where $a$ is semi major axis, $b$ is semi minor axis, $c$ is the distance from the focus to the centre and $\alpha$ is the angle of the ellipse.

My plan is to find the equation in polar form, find where $r\sin\theta$ is equal to the radius of the planet and use those $\theta$ values to find the area of the sector.

To solve this, I need to convert this behemoth into polar form. Is there any way to do this, or any way to solve it without converting to polar form? I've tried it numerically in python, making huge x and y arrays and plotting all the points where the equation is satisfied, but that'll take about a month to calculate for 360 angles.

Thanks in advance.

Edit: Also tried putting it into Wolfram Alpha with $x=r\cos\theta$ and $y=r\sin\theta$ and solve for $r$, but the answer I got didn't match up with my graph.