I need a formula that will give me all points of random ellipse and circle intersection (ok, not fully random, the center of circle is laying on ellipse curve)
I need step by step solution (algorithm how to find it) if this is possible.
Choose a coordinate system where the x axis is parallel to the ellipse major semiaxis, y axis parallel to the ellipse minor semiaxis, and origin where they intersect ("center of ellipse"). If a is the semi-major axis and b the semi-minor axis, and
Assuming we have a nondegenerate ellipse (an ellipse with nonzero area), then , and we can write above as
A circle of radius centered at fulfills
which we can also expand into
To find the point (x,y) where the circle and the ellipse intersects, you need to solve the pair of equations, for example (1b) and (2b).
The system of equations has essentially form
where
One efficient way of solving (3) is to substract the first equation from the second, and solve for x. You'll find exactly one algebraic solution for x (that depends on y). Substitute it back into the first equation, and you have a quartic equation in y, which has zero, one, two, three, or four solutions. Solve that, then substitute the numeric value or values of y back into the algebraic solution for x, and you have the solution, which is either no intersection, one point of intersection, or two points of intersection.