Thinned trajectory to 10% of the points. Replaced #defines by const variables.