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:
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:
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:
The first partially random walk $R1$ starts at $(0,0)$ and finishes at $(1,1)$
The second random walk $R2$ starts at $(0,1)$ and finishes at $(1,0)$
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.
In the same fashion we will generate points for $R2$ but the intervals will approach on each iteration to $(1,0)$.
Now we will create segments joining the sequential points of $R1$ and same for $R2$.
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.
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:
And another one with two dancers:
Some facts and trivia:
Due to the way that the segments are generated, the lengths of them are not totally random, see the square line picking problem.
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).
The algorithm works for any square, not only the unit square, it is just an example. They can be any desired width and height.
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:
How can I simulate this kind of objects with a more realistic approach? What's the maths behind it?
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!