The Math Forum



Search All of the Math Forum:

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


Math Forum » Discussions » sci.math.* » sci.math.num-analysis

Topic: Dividing an ellipse into equal parts
Replies: 9   Last Post: Mar 6, 2006 7:40 AM

Advanced Search

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

Posts: 213
Registered: 12/6/04
Re: Dividing an ellipse into equal parts
Posted: Mar 2, 2006 7:49 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Thu, 02 Mar 2006 14:25:29 -0800, tallsteve wrote:

> I'm trying to move items around an ellipse as part of an animation. If
> I move round the ellipse in constant angular movements from the centre,
> then the item moves faster when near to the centre of the ellipse and
> slower round the ends.
>
> (If my ellipse is 2w wide and 2h high, and the angle from the centre is
> a, then I get the co-ordinates by x = w sin a and y = h cos a).


If this is just for an animation, you'll probably be happy with an
approximate solution, which you can get with calculus.

You want sqrt(dx^2 + dy^2) to be a constant C. Taking derivatives,
dx = w cos a da
dy = -h sin a da
C^2 = dx^2 + dy^2 = (w^2 cos^2 a + h^2 sin^2 a) da^2

da = sqrt(C^2 / (w^2 cos^2 a + h^2 sin^2 a))

So plug in C, w, h, and a, and you'll get approximately the amount by
which you should increment a to move a distance C around the circumference.

If you're animating infrequently but need more accuracy, then separate
each animation step into multiple approximation steps - if the error you
get using 30 steps is too high, for example, you can get about 1% of that
error by taking 300 steps and only plotting every tenth.
---
Roy Stogner



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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2017. All Rights Reserved.