Using the New Fly-through Feature in Maple 13
? Maplesoft, a division of Waterloo Maple Inc., 2009
Introduction
As part of its new 3-D plotting facilities, Maple 13 provides fly-through animations. These animations help you to gain additional insight from your 3-D plots as a virtual camera flies through, over, under, into, and around your surface, letting you focus on points of interest from any angle to understand the trends and behavior of surfaces. In this Tips & Techniques, you will learn how to create fly-through animations using built-in and user-defined camera paths, how to select effective camera paths, and how to a variety of options to further customize the animation.
The Fly-through Command
The fly-through animation is entered by using the viewpoint option to the plot3d command. This option controls the path that the virtual camera takes during the fly-through animation. There are three different ways in which the viewpoint can be specified. The named form uses built-in camera paths, the location form lets you specify points in space, and the path form lets you specify a curve to follow.
The Named Form
Using the named form of the fly-through command, you are able to easily specify one of four standard paths to follow. These paths are circleleft, circleright, halfcircleleft, and halfcircleright.
Constructing a Fly-through Example Using the Named Form
Step
Result
The Location Form
The location form of the fly-through command gives you much greater flexibility to create exactly the camera path you require. Using the location form, you specify a list of points in space that the camera will follow in order. In addition to the list of points, you can specify suboptions to change the camera's angle, field of view, and more.
Constructing a Fly-through Example Using the Location Form
The Path Form
The path form of the fly-through command allows you to define a parametric function in three dimensions, and the fly-through camera will follow the path of the function for a specified range.The path form is just as robust as the location form, allowing you to specify many different suboptions.
Constructing a Fly-through Example Using the Path Form
Choosing Which Form to Use
Fly-through animations present a unique opportunity to explore your 3D plots in ways never available before. The first step is choosing which form of the command to use. Different forms offer different advantages.
When to Choose the Named Form
The named form of the fly-through command provides the most basic information about your 3D plot, and it is also the easiest to implement. For example, if you needed to see details from all sides of your 3D plot, you could set the fly-through to circleleft for a simple rotation of your 3D plot.
When to Choose the Location Form
For greater flexibility in your fly-through camera path, choose the location form. With prior knowledge of the mathematical function you wish to fly through, you can construct a list of points around your function. Creating this list of points is often the most difficult aspect of creating your fly-through animation. Some tips on creating an effective list of points are:
When to Choose the Path Form
The path form of the fly-through command is especially useful if you have a prior understanding of your mathematical function, and if your fly-through is intended to generally follow along a part of your surface. Since you define your path by a parametric function, you are able to use the power of Maple to determine a function that will follow your surface. Perhaps you wanted to follow along a certain plane of your surface - you could enter the parametric function at the plane, and add several units to the height, raising the camera above the surface for a better view. It is techniques like this that allow for simple and effective fly-through commands using the path form.
Options to the Fly-through Command
There are a range of options available to append to the fly-through command, allowing you to tweak every aspect of the fly-through. Some of the more important commands are listed below:
Option
Description
look
The look option specifies where the camera is pointing as it travels through a fly-through animation. For example, the camera could always be pointed at the origin, or it could be pointed to the next point that it will travel to - essentially pointing forward.
upvector
Using the look command tells the camera at where to look, but we can still specify at what angle the camera will be rotated. This is accomplished with the upvector command. Using this command, you can specify a vector that will be the "up" direction of the camera. For example, specifying a [0,0,1] vector would result in a camera that is aligned parallel with the xy plane, and is perpendicular with the z axis.
fieldofview
The fieldofview command allows you to tweak the perspective of your camera to get your fly-through looking just right. You can increase the field of view to take in more of the image around the camera, or you can decrease the field of view to create more of a tunnel effect. Either way, the fieldofview option provides a great method to add the finishing touches to your fly-through.
Tip: For a complete list of the suboptions to the fly-through command, see the help page . Note that Maple refers to fly-through animations as the viewpoint command, which is the technical term used for the animation option.
Fly-through Command Examples
With a bit of practice, the fly-through command can be used to create intricate animations. The two examples below illustrate some of the possibilities. Click on the code edit buttons to execute the plot commands and view the animations.
The Tube Slide
Riding the Curve
#Click to Display
Legal Notice: ? Maplesoft, a division of Waterloo Maple Inc. 2009. Maplesoft and Maple are trademarks of Waterloo Maple Inc. This application may contain errors and Maplesoft is not liable for any damages resulting from the use of this material. This application is intended for non-commercial, non-profit use only. Contact Maplesoft for permission if you wish to use this application in for-profit activities.