I trying to find a set of equations to fidn the tangent point of a line and a rotated ellipse. Set of given parameters are; semi-major, a=320, semi-minor, b=120, angle of rotation abou tthe ellipse center is 6.4 degrees, ellipse origin is at 0,0. The line is sloping up to the left at 10 degrees relative to the x-axis. The resultant equations will be used in a CAD C++ application.

Some of the formulas I have been trying;

y = mx + b

x^2/a^2 + y^2/b^2 = 1

y = -x/m * (b/a)^2

paramteric equations for an ellipse

x = a * cos(t)

y = b * sin(t)

0 <= t <=2pi

X = a * cos(t) * cos(ra) - b * sin(t) *sin(ra)

Y = a * cos (t) * cos(ra) + b * sin(t) * cos(ra)

ra = the angle of rotation of the ellipse

But no luck in solving this one. It's been a long time since I had my math classes.

I have been trying to come up with two equations, one for the X coordinate and the Y coordinate of the tangent point. I also understand there will be two solutions, (x,y) and (-x,-y). I require equations so the application can use different values for the parameters, such the slope (angle) of the line will change, the semi-major/semi-minor/angle rotation of the ellipe will change.

Any help will be greatly appreciated!

Thanks in advanced.

Willie