That expression is horribly transcendental, you are not going to be able to solve for t in terms of t… however all is not lost.
Indeed, for t close to zero a pretty good approximation for sin(t) is t…
For t large, i.e. like bigger than 100 or so, the sin(t) term has less than a 1% effect on the value for d, so a reasonable approximation for t is just d.
The ugly though is likely what you worry about where sin(t) is too different from t and sin(t) make a dent in t… your best be is typically to find a way so that you do not need to isolate t in terms of d or a numerical iterative approach.
Thanks very much for your help with this everyone. I had a feeling I was going to run into a problem with this.
Just to give a better idea about what I’m trying to do, my application is a machine controller and onscreen simulation in which I am using openGL to simulate the movements of the machine in real time.
I need to apply an acceleration profile when a move begins and a deceleration profile to end the motion. A linear increase in velocity (constant acceleration) profile is straightforward, as the integration of velocity is
d = 1/2at^2
so I can rearrange to solve for ‘t’
t = sqrt(2ad)
with this formula, I can predict exactly at what time the machine position should be advanced to location ‘d’ to follow the acceleration profile perfectly.
However, machines experience less wear and tear when they are accelerated using a smooth acceleration profile, such as a cosine acceleration, parabolic, sigmoid, or other non-linear function.
Unfortunately, as you have pointed out, the circular function cannot be mathematically combined with the square or exponential function in order to isolate ‘t’.
I need to avoid iterative approximations and for the algorithm to be as quick and as accurate as possible, because it will eventually be used in an embedded application with far lower computing speed and fewer memory resources.
I am now working on a parabolic profile, hopefully this or another non-circular function will allow a solution. Of course if I have some success with that I’ll come back and share the solution.
Even if this article is talking about constant acceleration (ie, not smooth), I think there is some smoothing done on top of that, but my memory may be wrong.