# Thread: Line tangent to ellipse

1. ## Line tangent to ellipse

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!

Willie

2. ## Re: HELP with line tangent to ellipse

You seem to be missing one thing and you may have overlooked another.

$\frac{x^{2}}{a^{2}} + \frac{y^{2}}{b^{2}} = 1$ is NOT rotated.

The parametric representation is a bit misleading. That 't' is important, and it will trace the entire curve, but t = pi/6 wont give you the point on the ellipse that produces a line through the origin with an elevation of pi/6 above the x-axis.

3. ## Re: HELP with line tangent to ellipse

I agreed that the x^2/a^2 + y^2/b^2 = 1 is not rotated, but that is one of the first equation I was trying without rotation.
And I also agree with the parameter t; changes in t creates the ellipse.
I have a solution for an ellipse with an angle of rotation = 0, but once I start rotating the ellipse is where I have the problem.