From: Conrad on 10 Apr 2010 00:27 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
From: Roger Stafford on 10 Apr 2010 14:18 "Conrad " <conrad7(a)gmx.net> wrote in message <hpoumm$m55$1(a)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
From: Image Analyst on 10 Apr 2010 14:43 "Conrad " <conrad7(a)gmx.net> wrote in message <hpoumm$m55$1(a)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).
From: Conrad on 11 Apr 2010 14:40 Thank you for the replies. I guess my problem was really trig rather than a programming one. I got it solved.
|
Pages: 1 Prev: OFDM and MIMO-OFDM transmit and receive block Next: Speed up this for loop! |