Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: rotated ellipse in cartesian coordinates
Replies: 4   Last Post: Dec 10, 2008 8:05 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Fabian

Posts: 22
Registered: 8/4/08
Re: rotated ellipse in cartesian coordinates
Posted: Dec 9, 2008 7:26 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Adam" <not.real@email.com> wrote in message <ghlr2i$mi9$1@fred.mathworks.com>...
> "Fabian" <fabian.conrad@gmx.de> wrote in message <ghl5o5$29q$1@fred.mathworks.com>...
> > I've got a matlab procedure that fits an ellipse to a set of points, my problem is that I only need a certain x range and x-step in cartesian coordinate system. Can somebody help me with a formula for y as a function of x and my ellipse (defined by [z, a, b, alpha] returned by fitellipse:)
> > %parameterised by 0 <= theta < 2*pi is:
> > X = Z + Q(alpha) * [a * cos(theta);b * sin(theta)]

>
> Does it have to be x and y? That would be awkward.
>
> http://en.wikipedia.org/wiki/Ellipse
>
> Parametric form of an ellipse rotated counterclockwise by an angle k
>
> x = h + a * cos(t) * cos(k) - b * sin(t) * sin(k)
> y = k + b * sin(t) * cos(k) + a * cos(t) * sin(k)
>
> ~Adam

I need y for a certain range of x-values so it has to be x and y, is there a way?



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.