Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How to find the major and minor axes of an ellipse with known centre and a single point?

Subject: How to find the major and minor axes of an ellipse with known centre and a single point?

From: Steven

Date: 23 Oct, 2012 09:28:07

Message: 1 of 4

Given :
 the centre (xc, yc),
 a point on the ellipse (x, y)
 the ratio of the length of the major (a) to minor (b) semiaxes (r = b/a)
 and the angle of rotation of the major semiaxis from the positive x-axis (t)

then, the following expression evaluates to 1 for for a point lying on the ellipse with major axis length, a:

[(x-xc) * cos(t) - (y-yc) * sin*(t)]^2/a^2 + [(x-xc) * cos(t) - (y-yc) * sin*(t)]^2/(a/r)^2

(see other threads by Roger Stafford)

If we let P = [(x-xc) * cos(t) - (y-yc) * sin*(t)] then this simplifies (in appearance) to:
P^2 / a^2 + P^2 / (a/r)^2 = 1

My question is, how can I solve this equation to find a?

(Please feel free to point out any other mistakes!!)

Best wishes
Steven

Subject: How to find the major and minor axes of an ellipse with known centre and a single point?

From: Matt J

Date: 23 Oct, 2012 10:52:08

Message: 2 of 4

"Steven " <steven_ew@hotmail.com> wrote in message <k65nv7$7rk$1@newscl01ah.mathworks.com>...
>
> If we let P = [(x-xc) * cos(t) - (y-yc) * sin*(t)] then this simplifies (in appearance) to:
> P^2 / a^2 + P^2 / (a/r)^2 = 1
>
> My question is, how can I solve this equation to find a?

rearrange as

 a^2=P^2*(1+1/r^2)

Subject: How to find the major and minor axes of an ellipse with known centre and a single point?

From: Roger Stafford

Date: 23 Oct, 2012 17:17:08

Message: 3 of 4

"Steven " <steven_ew@hotmail.com> wrote in message <k65nv7$7rk$1@newscl01ah.mathworks.com>...
> .......
> [(x-xc) * cos(t) - (y-yc) * sin*(t)]^2/a^2 + [(x-xc) * cos(t) - (y-yc) * sin*(t)]^2/(a/r)^2
>
> (see other threads by Roger Stafford)
> .......
- - - - - - - - - -
  I sincerely hope I never gave that as the equation of an ellipse! What you wrote is actually the equation of two parallel straight lines. What I think you want is this:

 ((x-xc)*cos(t)-(y-yc)*sin(t))^2/a^2+((x-xc)*sin(t)+(y-yc)*cos(t))^2/b^2 = 1

which is a very different equation.

Roger Stafford

Subject: How to find the major and minor axes of an ellipse with known centre and a single point?

From: Roger Stafford

Date: 23 Oct, 2012 18:59:08

Message: 4 of 4

"Roger Stafford" wrote in message <k66jek$n8i$1@newscl01ah.mathworks.com>...
> ((x-xc)*cos(t)-(y-yc)*sin(t))^2/a^2+((x-xc)*sin(t)+(y-yc)*cos(t))^2/b^2 = 1
- - - - - - - - - -
  Let me correct that. If 't' is the angle measured counterclockwise from the positive x-axis to your semi-major axis of length a, the equation of the ellipse is:

 ((x-xc)*cos(t)+(y-yc)*sin(t))^2/a^2+(-(x-xc)*sin(t)+(y-yc)*cos(t))^2/b^2 = 1

Roger Stafford

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us