In the video associated with the demo here:
There was a teaser posed in the video asking why the 747 in the animation did a 360 flip at certain points in the trajectory. The answer was: We were not using quaternions.
This demo uses the quaternion functions from the Aerospace Toolbox to resolve this paradox.
Also, to add realism to the scene, the terrain was modeled in Blender, a free 3D tool for authoring powerful 3D scenes:
The tutorial that was referenced for creating the mountains is available here:
Use the Export to VRML feature to bring into VRML format and add the aircraft from the Objects library in VRealm Builder editor.
The sky was modeled as a half-hemisphere with texturing.
The trajectory tracing was done by creating spheres dynamically using the PROTO declarations.
Design Talk: Enhancing Simulation Studies with 3D Animation Article
Nice article to read on creating realistic scenes in VRML and use it with Simulink 3D Animation/Virtual Reality Toolbox;
Other enhancements for this demo:
Fly a 747 with MATLAB: Multiple Views in a GUI, Dynamic Lighting:
Fly a 747 with MATLAB: Shaky Camera Effect, Sound Effect:
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.