Name

anim_time — estimate appropriate time parameters for path

Synopsis

anim_time [-s start_speed_absolute] [-e end_speed_absolute] [-i initial_speed_relative] [-f final_speed_relative] [-m max_len] [ -v | q ] < in.table > out.table

DESCRIPTION

This filter is designed to estimate appropriate time parameters for an animation curve in 3D space. Given a four-column table specifying time and 3D position for an object, anim_time ignores all but the first and last time specifications and calculates reasonable time values for each intermediate point in the table. The output time values are based on the distances between points and the calculated speed of the object. Various options allow the user to control the assumptions on the object's initial and final speeds, and the form of the output.

anim_time is intended to be used in situations where the user knows what key points an object should pass through and how long the entire motion should take, but doesn't care exactly when the object reaches each point. It is also useful for getting objects to accelerate smoothly to and from rest.

OPTIONS

-m#

Specify the maximum number of points to be read. This default to 64, so you must use this option if you want to use tables with more than 64 points.

-s#

Specify the starting speed of the object. If this option is not specified, then the object is assumed to be initially travelling on a pace to negotiate the entire path in the given time at a constant rate. The argument must be positive and no greater than three times the speed needed to traverse the path at a constant rate.

-e#

Specify the final speed of the object. If this option is not specified, then the object is assumed to end up travelling on a pace to negotiate the entire path in the given time at a constant rate. The argument must be positive and no greater than three times the speed needed to traverse the path at a constant rate.

-i#

Specify the initial speed of the object, relative to the speed that would negotiate the given path at a constant rate. For example, an argument of 2.0 means twice the speed needed to traverse the path at a constant rate. Must lie between 0.0 and 3.0.

-f#

Specify the final speed of the object, relative to the speed that would negotiate the given path at a constant rate. Must lie between 0.0 and 3.0.

-v

Verbose option. The output table will contain a time column and three position columns. If this option is not specified, only the new time column will be printed.

-q

Query the total distance. If this option is specified, the only output will be a number representing the total length of the input path.

BUGS

The algorithm fits a cubic polynomial to the distance vs time graph, and then uses Newton's method to find the times corresponding to each given distance. If for some reason convergence is not reached, anim_time will print a warning on standard error. If the -d option is specified, the results of each iteration will be printed.

AUTHOR

Carl J. Nuzman

COPYRIGHT

This software is Copyright (c) 1996-2016 by the United States Government as represented by U.S. Army Research Laboratory.

BUG REPORTS

Reports of bugs or problems should be submitted via electronic mail to <devs@brlcad.org>.