You are here:

Advanced Math/Need to find coordinates of intesection on an ellipse wall whenl ine from the center intersects it.

Advertisement


Question
Hello Robi,
I am trying to write a VBA program that will find the coordinates of the intersection of a line that goes from the center of the ellipse to any given point on the wall (we are talking 2-D here).

So in example, if a=15 and b=9 and the line leaving the center has an angle of 31 degrees (.5410 rad) can you help me find an equation that will tell me what the X and Y of the line and perimeter intersection is.

After this, I will be using the equation in a program to give me this information for a variety of angles.  I can compensate for the +/- of the sin, cos, & tan based on the angle.  But I have to know where along the perimeter the various angles will intersect.  Thanks,


Answer
Hi Bill,

I'm sorry for such an incredibly late answer. I had bunch of finals to take. Anyways, from what I understand, you want me to tell you the x and y coordinates of the intersection.

For convenience, we'll place the center of the ellipse in the origin. So the equation of our ellipse is

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

Now, if our angle is t, then the equation of our line is y = xtant.

So we must find the intersection of the ellipse and this line. Substituting our value for y, we get

x^2/a^2 + x^2(tan t)^2/b^2 = 1

x^2 (1/a^2 + (tant)^2/b^2) = 1

so

x^2 = 1 / (1/a^2 + (tant)^2/b^2)

so to find x, simply square root that side. However, that gives you two possible answers for x, a positive 1 and a negative 1. However, you can easily determine which is correct simply by drawing a rough sketch of the entire thing.

To find the y coordinate, simply do the x coordinate times tan t

= xtant.

i hope this helps
Robi

Advanced Math

All Answers


Answers by Expert:


Ask Experts

Volunteer


Robi Bhattacharjee

Expertise

I can answer a variety of questions on mathematics. Questions on trigonometry, calculus(preferably single variable), algebra, geometry, and number theory will be answered. I cannot answer questions on abstract branches of mathematics such as group theory. I also cannot answer questions on statistics. In number theory, I can answer questions on congruences, prime numbers, units, functions, and the riemann-zeta function.

Experience

I have studied advanced math my entire life. I started calculus in sixth grade. I have attended numerous math competitions and I am attending math organizations such as the San-Diego math circle. Also, this year I have been invited to the USAMO which is a prestigious math competition (Every year the USAMO invites 500 students from across the USA to participate in this competition. The top 6 go to represent the USA in the International Math Olympiad).

Organizations
I am in the San Diego Math Circle

Education/Credentials
I am entering high school and have received a perfect score and the STAR test 5 times in a row. I also have gotten recognitions in the AMC 10, AIME, Math Counts, and ARML. Additionally, I have won the San Diego Math Olimpiad twice in a row.

©2012 About.com, a part of The New York Times Company. All rights reserved.