# NAME

anim_fly - make animation table to simulate flying motion

# SYNOPSIS

anim_fly [-f factor] [-r] [-p integer] [-b max_bank_angle] [-s step] < in.table > out.table

# DESCRIPTION

This filter is designed to simulate the motion of an airplane. Given a four-column table specifying the desired 3D position of the airplane at each time step, anim_fly produces a seven-column file which also includes the orientation of the plane in terms of yaw, pitch, and roll. The yaw and pitch are adjusted so that the plane faces the direction of motion, while the roll is used to bank the vehicle.

# OPTIONS

-f#
  This option specifies a factor to control the severity of the banking. Choosing the best banking factor for a given animation is a subjective decision, although a good starting point can be obtained with the -b option. Animations representing aircraft on different scales will need different factors. If the slightest curve throws the plane into a 90 degree bank, the factor is too large; if the plane doesn't bank enough, the factor is too small. The size of the best factor varies inversely with the size of the imagined aircraft plane. A factor of 0 means that there will be no banking, while a negative factor causes the vehicle to bank in the opposite direction, like a cart almost overturning as it rounds a curve.
-b#
  This option is used to estimate a good value for the -f option. The parameter is the maximum desired banking angle. Anim_fly then computes the factor necessary to keep the banking below the specified angle. This value is returned instead of anim_fly's usual output.
-r
  Suppress vertical smoothing. Anim_fly likes to keep the aircraft right-side up, but such a strategy is unstable when the airplane flies straight up or down. To counter this there is a smoothing capability which prevents sudden rolls during vertical flight and allows the vehicle to fly upside-down if necessary (during a vertical loop, for example). This feature can be suppressed with the -r flag.
-p#
  Specify the ratio of input rows to output rows, which must be an integer. The default, of course, is one. The accuracy and smoothness of the banking algorithm are best when the frame rate of the input table is high. This can lead to a degradation of performance when creating a preview animation with a small frame rate. In this case, the user should still use a high frame rate table as input to anim_fly, and decrease the frame rate of the output with the -p option. For example, if in.table contains 30 rows for each second of the animation, then the command:

  anim_fly -f0.001 -p10 < in.table > out.table

  would produce an animation table containing only 3 rows for each second of the animation.

-s
  Specify the minimum step size for the discrete-time differentiation. At any given point on the flight path, the yaw, pitch, and roll are calculated based on a past point, the current point, and a future point. Normally, these are consecutive points from the input table. If the time difference between the points falls below a certain threshold, then non-consecutive points are used to avoid numerical instability. The default time threshhold is 0.1 seconds - this can be raised or lowered using the -s option. If a vehicle's orientation semms jumpy or jerky, then the threshold may need to be increased.

# AUTHOR

Carl J. Nuzman

# "BUG REPORTS"

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