# How to measure trajectory regularity?

I have two animal running trajectories. A regular one with repeated back and forth running between point A and B, like the one on top in the figure. The other one is very irregular, animal paused and turned around a lot in the middle. Is there any algorithm to measure the regularity of a trajectory, like repeated activity on the top? And compare the extend of regularity between the two trajectories? Thanks in advance.

• Whatever algorithm you use or come up with, I think the first part must necessarily be to describe in words -- and then in conceptual terms that can be implemented -- what exactly it is that you mean by "regular" and "irregular". These are broad words that mean many different things in different contexts, and it is an important part of science to define what exactly one means if you call a path "regular" or "irregular". This is also important because, once you describe what the characteristics of such paths are, you already have something that you can measure. – Wolfgang Bangerth Aug 1 '14 at 8:54
• I think this is part of the question itself! If the asker already had "conceptual terms that can be implemented" then we could just tell them to google those terms or to read about them on Wikipedia. – k20 Aug 1 '14 at 15:32
• Cross posted at math.stackexchange.com/questions/884039/…, biology.stackexchange.com/questions/20114/…, and physics.stackexchange.com/questions/128968/…. (Please don't do that: People can give much better answers if they can see what other users have already suggested and whether that helped you.) – Christian Clason Aug 1 '14 at 17:31

change_in_slope = 0.0