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:
Draw major and minor axes on ellipse

Subject: Draw major and minor axes on ellipse

From: Conrad

Date: 9 Apr, 2010 10:15:08

Message: 1 of 5

Hi, I'm having trouble drawing the major and minor axes on an ellipse that I've drawn with ellipse.m. Does anyone know how I can do this?

On another issue, how do I determine the polar coordinates (eccentric points?) of the ellipse drawn?

Thanks very much for your help.
Conrad

Subject: Determine eccentric points on a rotated ellipse?

From: Conrad

Date: 10 Apr, 2010 04:27:03

Message: 2 of 5

Hmm.. no replies? Ok well I'm having serious problems with the second question so I'll reformulate it in case it wasn't clear. I've drawn an ellipse(x0,y0,semimajor,semiminor,phi), phi being the angle of rotation. I would like to find out what equation or function that can get me the positions of the points where the ellipse is the most eccentric (so 2 points). Because the ellipse is at an angle of rotation, it's not a simple matter of getting the lowest and highest y value.

If anyone can help, i'd greatly appreciate it. Thanks

Subject: Determine eccentric points on a rotated ellipse?

From: Roger Stafford

Date: 10 Apr, 2010 18:18:05

Message: 3 of 5

"Conrad " <conrad7@gmx.net> wrote in message <hpoumm$m55$1@fred.mathworks.com>...
> ...... I've drawn an ellipse(x0,y0,semimajor,semiminor,phi), phi being the angle of rotation. I would like to find out what equation or function that can get me the positions of the points where the ellipse is the most eccentric (so 2 points). Because the ellipse is at an angle of rotation, it's not a simple matter of getting the lowest and highest y value.
> ......

  I don't understand what the difficulty is in your first question about drawing the major and minor axes. In the versions of ellipse.m that I know about, the entered values are major and minor axes lengths, center position, and rotation angle, and therefore you must have known these quantities if you called on 'ellipse'. What else would you need to draw these axes?

  In the second question about the "most eccentric points" I'm afraid I don't know what you mean by this. My understanding is that eccentricity in an ellipse is a property possessed by the ellipse as a whole and not a property of its individual points. If one takes the literal dictionary definition of 'eccentric' as being off center, then perhaps you mean the points at the ends of the major axes which are the greatest distance from the center of the ellipse. In that case, these again should be very easy to determine from your known 'ellipse' arguments.

  In any case, if it is something you could have determined just from y values if there had been no rotation, then all you would have to do in this case is make a rotational transformation of variables to produce such a transformed "y".

Roger Stafford

Subject: Determine eccentric points on a rotated ellipse?

From: Image Analyst

Date: 10 Apr, 2010 18:43:05

Message: 4 of 5

"Conrad " <conrad7@gmx.net> wrote in message <hpoumm$m55$1@fred.mathworks.com>...
> Hmm.. no replies? Ok well I'm having serious problems with the second question so I'll reformulate it in case it wasn't clear. I've drawn an ellipse(x0,y0,semimajor,semiminor,phi), phi being the angle of rotation. I would like to find out what equation or function that can get me the positions of the points where the ellipse is the most eccentric (so 2 points). Because the ellipse is at an angle of rotation, it's not a simple matter of getting the lowest and highest y value.
>
> If anyone can help, i'd greatly appreciate it. Thanks
-------------------------------------------------------------
Can't you just use simple trigonometry?
xMajor1 = x0 + semimajor * cos(phi)
xMajor2 = x0 - semimajor * cos(phi)
yMajor1 = y0 + semimajor * sin(phi)
yMajor2 = y0 - semimajor * sin(phi)
that sort of thing? I'm not sure why this is that complicated or why you'd have serious problems (unless you don't know trig).

Subject: Determine eccentric points on a rotated ellipse?

From: Conrad

Date: 11 Apr, 2010 18:40:04

Message: 5 of 5

Thank you for the replies. I guess my problem was really trig rather than a programming one. I got it solved.

Tags for this Thread

No tags are associated with 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