Help! Sines and Lines

1 PM January 18, 2004

For a few months now, I’ve been dabbling in the maths of some simple 2D motion. Around November, I derived an equation expressing x-position (x) as a function of time (t). It is of the form:

x = i + jt + k cos(lt + m)

where i, j, k, l and m are constants. For maths newbies like myself, I point out that the equation is of a cosine (the k cos(lt+m) bit) added to a line (i + jt), giving a wiggly line that is trending up or down. It looks like the red line in this plot:

plot of the above function, described in red

Here is my problem. In order to determine if (and when) the object will hit a left or right wall, I need to find the values of t where x is 1 or -1 – shown in blue on the above picture.

I’ve spent quite some time on this, and I have some interesting equations that give limits to the solution(s) I am interested in, but nothing precise enough to work with.

Despite many hours spent on this, my high school maths is not enough, Google has been no help and the books in Dymocks don’t seem to be of any use either.

Can anybody out there show me how to solve the equation for t, or point me to some useful resource?

By alang | # | Comments (6)
(Posted to Software Development and javablogs)
© 2003-2006 Alan Green