What's the maths behind the movements of a two-legged air dancer (aka skydancer, tube man)? How can I simulate its behavior?

486 Views Asked by At

I am trying to understand the maths behind the movements of a two-legged air dancer, aka skydancer aka tube man. Well, I mean these cheery friends here:

enter image description here

The following discrete time algorithm is my devised solution, but I am sure that other much better approaches are possible. Indeed it is not very realistic and I am not very happy. I would like to learn other solutions more closer to reality and related with dynamical systems, complex dynamics or fluid dynamics:

  1. Take for instance a unit square, same width and height. Then generate two partially (explanation of the "partially" wording is done below) random walks with these rules:

  2. The first partially random walk $R1$ starts at $(0,0)$ and finishes at $(1,1)$

  3. The second random walk $R2$ starts at $(0,1)$ and finishes at $(1,0)$

  4. We will generate $n$ random points sequentially for $R1$ as follows. The first point is $(x_0,y_0)=(0,0)$, then we will take a random point from the intervals $([0,1],[0,1])$, it will be $(x_1,y_1)$. Then $(x_2,y_2)$ will be a random point from the intervals $([x_2,1],[y_2,1])$, then next point $([x_3,1],[y_3,1])$, etc. So we are approaching $(1,1)$ on each iteration. Usually $n=20$ iterations is good enough to be visually very close to $(1,1)$ so the simulation is good enough. The reason of the "partially" wording is that on every iteration we reduce the intervals, so it is not always a random point of the square unit, so it is not totally random.

  5. In the same fashion we will generate points for $R2$ but the intervals will approach on each iteration to $(1,0)$.

  6. Now we will create segments joining the sequential points of $R1$ and same for $R2$.

  7. As both paths are crossing completely each diagonal of the square unit, there is an intersection point between them. Mark with a disk the intersection of both random paths and display the unit square including the segments and the intersection.

  8. Execution: the algorithm can be looped for an infinite time of $t$ units in a loop, and each iteration $t$ will generate the aspect of the air dancer for that unit of time. So in my case the algorithm makes a kind of discrete system.

And this is how looks my air dancer simulation:

enter image description here

And another one with two dancers:

enter image description here

Some facts and trivia:

  1. Due to the way that the segments are generated, the lengths of them are not totally random, see the square line picking problem.

  2. The above solution might be defined as a kind of discrete map where each unit of time $t$ is independent of the status of the previous unit of time (but this can be modified to make movements depend on the previous unit of time at some extent so it would be a standard discrete-time map).

  3. The algorithm works for any square, not only the unit square, it is just an example. They can be any desired width and height.

  4. The legs of the air dancers are usually fixed to the ground, but not the arms, and that is a part of my simulation that is not very realistic (apart from others) although I think that it would be more or less easy to enhance this point specifically.

My questions are:

  1. How can I simulate this kind of objects with a more realistic approach? What's the maths behind it?

  2. Initially I did not find a reference on internet, but this must be very related to dynamical systems and more specifically to fluid dynamics. Is it possible to express the movement by a discrete (map) or continuous (based on derivatives) dynamical-system? I appreciate any insights, thank you!

P.S.: if somebody is interested in the Python code please let me know and I will add it to the question.

Update 2017/11/16: finally I have uploaded the code to my repl.it account (link here). It cannot be run online because it requires the pygame library, but it will work in, for instance, a personal computer using Python Anaconda if the pygame library is downloaded as usual. Feel free to use and modify it and enjoy!