Finding a point on an ellipse

helto

New member
Joined
May 16, 2008
Messages
2
I need to be able to plot points on an ellipse at equal intervals. I will know the width(2a), height(2b) and the interval(say 16). So I will need 16 points and the angle from the origin will increase by 360 / 16 = 22.5

I have already got this working within the first quadrant using this link: http://mathforum.org/library/drmath/view/54922.html

t = 22.5 * (PI / 180)
q = arctan(a*tan(t)/ b)
x = a * cos(q)
y = b * sin(q)

So what I need is a way to tweak this formula to work in the other quadrants. I am at a loss for where to start.
 
helto said:
I have already got this working within the first quadrant...

So what I need is a way to tweak this formula to work in the other quadrants. I am at a loss for where to start.
If the ellipse is centered at the origin, shouldn't there be symmetry that you can take advantage of...? :shock:

Eliz.
 
Hello, helto!

I need to be able to plot points on an ellipse at equal intervals.
I will know the width \(\displaystyle (2a)\), height \(\displaystyle (2b)\) and the interval (say, 16).
So I will need 16 points and the angle from the origin will increase by: \(\displaystyle \frac{360^o}{16}\:=\:22.5^o\)

\(\displaystyle \text{I would use the parametric equations of an ellipse: }\;\begin{array}{ccc}x &=& a\cos\theta \\ y &=& b \sin\theta \end{array}\)

. . \(\displaystyle \text{and let: }\,\theta \:=\:(22.5^o)n\;\text{ for }n \:=\:0,1,2,3,\hdots,15\)

 
brilliant soroban,

that works much faster than what i was trying to do :

Given a specific angle, say, pi/n, where n is some positive integer, the angles t=0,pi/n,2*pi/n,...,(n-1)*pi/n divide the circle about the origin into n equal sectors. You want to know the intersection with the ellipse of the rays from the origin with these angles, as measured from the positive x-axis counterclockwise.

The ellipse is x^2/a^2 + y^2/b^2 = 1. ( It is easy to be mislead by the second representation of the ellipse because the angle q is not the same as the angles you want). So, solving the equations x^2/a^2 + y^2/b^2 = 1 and cos(2*k*pi/n)*y =x*sin(2*k*pi/n), k=0,1,2,...,n-1.

We find two solutions:

x = -((a*b*cos[(2*k*pi)/n])/sqrt[b^2*cos[(2*k*pi)/n]^2 + a^2*sin[(2*k*pi)/n]^2])

y = -((a*b*sin[(2*k*pi)/n])/sqrt[b^2*cos[(2*k*pi)/n]^2 + a^2*sin[(2*k*pi)/n]^2])

and

x = ((a*b*cos[(2*k*pi)/n])/sqrt[b^2*cos[(2*k*pi)/n]^2 + a^2*sin[(2*k*pi)/n]^2])

y = ((a*b*sin[(2*k*pi)/n])/sqrt[b^2*cos[(2*k*pi)/n]^2 + a^2*sin[(2*k*pi)/n]^2])

Given n, for a specific value of k you need only to choose the solution that is in the quadrant containing the terminal side of the angle. Note that the signs of the answers also depend upon the factors cos[(2*k*pi)/n] and sin[(2*k*pi)/n]

thanks a lot!!
 
Top