# Elliptical Motion

**URL:** <https://forum.kirupa.com/t/elliptical-motion/236481>\
**Category:** flash\
**Created:** [August 21, 2007, 10:33am UTC](https://forum.kirupa.com/t/elliptical-motion/236481 "2007-08-21T10:33:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthewjumps](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@matthewjumps](https://forum.kirupa.com/u/matthewjumps)\
**Post date:** [August 21, 2007, 10:33am UTC](https://forum.kirupa.com/t/elliptical-motion/236481/1 "2007-08-21T10:33:41Z")

</div>

Finally basic trig stuff is starting to make sense to me…after going through the excellent carousel tutorial on [http://www.gotoandlearn.com/download.php](http://www.gotoandlearn.com/download.php) i really understand the basics of using a radiusX, radiusY, centreX and centreY coupled with and angle and cos for \_x, sin for \_y - its all so clear now…

but - if i use this method to animate anything, the motion naturally slows down as it approaches the tighter ends of the ellipse…obviously if i set the radiusX and radiusY to identical values, the speed will be uniform…but i was wondering:

is there a way to move objects in an elliptical fashion while keeping a constant speed, no matter the dimensions of the ellipse or the radius difference?

in case anyone was wondering, heres the current code im using to move stuff - based around incrementing the value of the variable “angle”

```auto

t.onEnterFrame = function():Void {
        this._x = this.radiusX*(Math.cos(this.angle))+this.centreX;
        this._y = (this.radiusY*(Math.sin(this.angle)))+this.centreY;
        this.angle -= 0.035;
}

```
