## [stella] Angular movement

 Subject: [stella] Angular movement From: Glenn Saunders Date: Tue, 13 Jan 2004 20:55:31 -0800
At 10:30 AM 1/13/2004, you wrote:
```The easy way:
First you decide how many angles you want and what should be the ball
speed.```

```For each angle you need two values, one for the x- and one for the
y-speed. Each values consists out of two bytes to store fractional speeds.```

```E.g. the ball speed should be 3 pixel/frame, for an angle of 30° you
get a speed of 1.5/2.6 (x/y) pixels/frame. Converted into fractional
values you get 1/128 and 2/153.
```

This is what you mean by a sine wave? I already have these two tables but while I can get an accurate angle of movement, the speed is not consistent from angle to angle.

Is there a mathematical formula I can use to precisely calculate the numbers because something as simple as "45' angle up means .5/.5" isn't working. I could manually tweak the numbers and eyeball it but I'm sure there has to be a formula.

Is this in any way related to the polar coordinate thread from way back?

```----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/```