Generate trajectories with same tangent in a specific point
4 views (last 30 days)
I want to simulate the movements of 3 robots/agents in space and I would like to generate 3 different trajectories which have one constraint: in a certain time T the all the trajectories must have the same tangent.
I want something like in the following picture:
Could you please help me figuring out how to do that? I can use MATLAB and also SIMULINK.
Thanks a lot.
John D'Errico on 28 Feb 2017
Edited: John D'Errico on 28 Feb 2017
I'm not going to do your homework, as this probably is a piece of your student project.
But if your goal is simply to generate three random trajectories with the desired property, then it is trivial to do.
1. Generate three completely random trajectories.
2. Compute the desired tangent at time t for each trajectory.
3. Rotate trajectories 2 and 3 in the plane so the tangent lines line up with tangent 1.
Will the result be a completely "uniform" sampling of all possible trajectories, subject to the constraint? By the word uniform, I mean that of all possible trajectories that fit your constraint, they will not all be equally likely.
So the set I've shown you how to generate will not be truly uniform. But then you did not ask for that, and this solution will not be a poor one at all in terms of sampling, nor difficult to do.
A truly uniformly sampled set of trajectories would be fairly difficult to generate. If you insisted on that, I'd suggest that you might start from time t, and then work forwards and backwards. To rigorously ensure uniformity in probability even then would be quite difficult, and I'd suggest not worth the extra effort.