|
-
Sep 28th, 2007, 12:38 PM
#2
Re: Time and Decay problem
You have a choice to make. Namely, how many times do you want the object to rotate completely before it stops?
Let's say your object has been spinning and is at exactly xo when you hit "Stop". You want it to finish rotating in n time units at an angle of ao.
So, to stop on this very turn, you would need to do the following:
1) Check to see if x is bigger than a.
If it is not, then you know that the angle you have left is (a - x)o
If it is, then you have to go around through zero, so the angle you have left is (360 - (a - x))o.
Let us call the angle you have left Ao.
2) You want to turn through Ao in n time units, therefore the angle per time unit is just:
A/n
If you want to rotate w extra times around, you need (A + (360 x w))o
Or do you mean that you want to reduce the rate of spin linearly, rather than the actual spin step? i.e. smoothly decelerate to a standstill and finish at the desired angle?
zaza
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|