|p - c|^2 = r^2$$ |p - c|^2 = r^2 $$
With a line expressed as p = p0 + μv\$p = p0 + \mu v\$ (where v is a vector, http://en.wikipedia.org/wiki/Euclidean_vector), you insert the line into the circle formula and get
|p0 + μv - c|^2 = r^2$$|p0 + \mu v - c|^2 = r^2$$
(p0 + μv - c)•(p0 + μv - c) = r^2$$(p0 + \mu v - c)•(p0 + \mu v - c) = r^2$$
Define a = c - p0\$a = c - p0\$ and rewrite to (μv - a)•(μv - a) = r^2\$(\mu v - a)•(\mu v - a) = r^2\$
Perform the dot product and we get μ^2(v•v) - 2μ(a•v) + a•a = r^2\$\mu ^2(v•v) - 2\mu (a•v) + a•a = r^2\$
Assume that |v| = 1\$|v| = 1\$ and we have
μ^2 - 2μ(a•v) + |a|2 - r^2 = 0$$\mu ^2 - 2\mu (a•v) + |a|2 - r^2 = 0$$
*μ = a • v +- sqrt((a • v)^2 a^2 – r^2)$$\mu = a • v +- sqrt((a • v)^2 *a^2 – r^2)$$
If μ < 0\$\mu < 0\$, the line of the ship in your case does not intersect with the planets orbit.
If μ = 0\$\mu = 0\$, the line of the ship will simply touch the circle in one point.
Otherwise, this gives us two μ\$\mu \$-values that corresponds to two points on the orbit!
So we can define a line for the ship, and out of that we get either 0, 1 or 2 μ\$\mu \$-values. If we get 1 value, use that one. If we get 2, simply choose one of them.
p = p0 + μv\$p = p0 + \mu v\$ gives us the coordinate, and the μv\$\mu v\$-component gives us how far is will have to travel. Simply divide this last component with the speed of your ship to get how much time it will take for it to get there!
x = c + r*cos(θ)$$x = c + r*cos(θ)$$
y = c + r*sin(θ)$$y = c + r*sin(θ)$$
And since you had the speed of you ship, and we have the time it will take for the ship to reach the orbit, and where it will collide, we simply move the planet back t*angularVelocity\$t*angularVelocity\$ degrees in it's orbit, and we are done!