| Aerospace Blockset™ | ![]() |
Create six–degrees-of-freedom multibody custom geometry block
Animation/MATLAB-Based Animation

The MATLAB Animation block creates a six-degrees-of-freedom multibody custom geometry block based on the Aero.Animation object. This block animates one or more vehicle geometries with x-y-z position and Euler angles through the specified bounding box, camera offset, and field of view. This block expects the rotation order z-y-x (psi, theta, phi).
To update the camera parameters in the animation, first set the parameters then close and double-click the block to reopen the MATLAB® Animation window.
To access the dialog box for this block, right-click the block, then select Mask Parameters. Alternatively, double-click the block to display the MATLAB Animation window, then click the Block Parameters icon.
Note The underlying graphics system stores values in single precision. As a result, you might notice that motion at coordinate positions greater than approximately 1e6 appear unstable. This is because a single-precision number has approximately six digits of precision. The instability is due to quantization at the local value of the eps MATLAB function. To visualize more stable motion for coordinates beyond 1e6, either offset the input data to a local zero, or scale down the coordinate values feeding the visualization. |

Specifies the vehicle to animate. From the list, select from 1 to 10. The block mask inputs change to reflect the number of vehicles you select. Each vehicle has its own set of inputs, denoted by the number at the beginning of the input label.
Specifies the vehicle geometries. You can specify these geometries using one of the following:
Variable name, for example geomVar
Cell array of variable names, for example {geomVar, AltGeomVar}
String with single quotes, for example, 'astredwedge.mat'
Mixed cell array of variable names and strings, for example {'file1.mat', 'file2.mat', 'file3.ac', geomVar}
Note All specified geometries specified must exist in the MATLAB workspace and file names must exist in the current directory or be on the MATLAB path. |
Specifies the boundary coordinates for the vehicle.
This parameter is not tunable during simulation. A change to this parameter takes effect after simulation stops.
Specifies the distance from the camera aim point to the camera itself.
This parameter is not tunable during simulation. A change to this parameter takes effect after simulation stops.
Specifies the camera view angle. By default, the camera aim point is the position of the first body lagged dynamically to indicate motion.
This parameter is not tunable during simulation. A change to this parameter takes effect after simulation stops.
Specify the sample time (-1 for inherited).
| Input | Dimension Type | Description |
|---|---|---|
First | Vector | Contains the altitude, the crossrange position, and the downrange position of the vehicle in Earth coordinates. |
| Output | Dimension Type | Description |
|---|---|---|
First | Vectors | Contains the Euler angles (roll, pitch, and yaw) of the vehicle. |
Aero.Animation in the Aerospace Toolbox documentation
![]() | Mass Conversion | Moments About CG Due to Forces | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |