1 Reply Latest reply on Oct 25, 2007 3:26 PM by kglad

    Animation inaccurancies.


      I have written an application which lets a user experiment with generating spur gear profiles based on a few input variables. The user selects the number of teeth for both a wheel and pinion gear train, plus a couple of other variable values. The program then calculates the profiles for each gear and displays them graphically. Part of the application allows the user to simulate the 2 gears meshed and rotating. The problem I'm seeing is that as the animation progresses it goes slightly out of sync. At the beginning the teeth are perfectly meshed but as it progresses they slowly go out of sync and then slowly return. This cycle continues for as long as the animation plays. I'm using a single onEnterFrame event listener to update the rotation of both gears. I can't figure out whats causing this. Initial I though it might be being caused by slight error build ups from fractional gear ratios. However, the out of sync problem would grow worse the longer the animation ran. I'm not seeing that. Also, I see the same results even with integer gear ratios. I've seen some other inaccuracies with Flash actionscript math. Could this be the issue? There is also some other graphical weirdness I'm seeing, but for now I'll take any help I can get on this issue.