How can I describe the vertical component of a juggling ball's path with a sine wave?

297 Views Asked by At

I juggle, and then track the juggling balls.

juggling graph

I want to describe this juggling trick using sine waves. A metronome was used to keep the throws periodic. The video is 120fps, so there are 120 observations per second. The Y-values correspond to the location of the ball in the image. The video is 800 pixles tall, so the Y-values range from about 200 to 600. This is a graph of (the data):

423 graph

Using this Python/OpenCV script, was able to manually fit a sine wave to the data. The thick blue line is the source data. The thick green line is the manually fitted sine wave, which is composed of the two thinnest sine curves:

manually fitting a sine wave

From manually fitting the sine wave, I know that this function is the sum of two sine waves. The period of the longer wave is 2x the period of the shorter wave. A FFT seems to confirm this:

fft

In conclusion, I can describe this data by manually (visually) fitting a sine curve. I would like to use a mathematical and statistical methods to fit a sine curve to this data.

The data that I used in this example was pretty simple, but the juggling tricks can get more complicated:

complicated trick

1

There are 1 best solutions below

0
On

While the ball is in free motion its orbit is a parabola: the horizontal component is linear in time, and the vertical component quadratic during each free flying interval separately. But during the time you hold the ball in your hands we have no mathematical control of the happenings. At any rate a periodic process results whose period $T$ you define by your actions. Such a process can be Fourier analyzed, and you obtain expansions of the form
$$x(t)={a_0\over2}+\sum_{k=1}^\infty \left(a_k\cos{2k\pi t\over T}+b_k\sin{2k\pi t\over T}\right)\ ,\tag{1}$$ and similarly for $t\mapsto y(t)$. As an experienced juggler you try to make the process as "harmonic" as possible, and this results in a fast decrease of the coefficients $|a_k|$ and $|b_k|$, so that in $(1)$ only the first two or three terms really play a rôle.