Application Center - Maplesoft

# Using the New Fly-through Feature in Maple 13

You can switch back to the summary page by clicking here.

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

• Determine the 3D plot for which you will be constructing a fly-through animation

Tip: The viewpoint command can be added to most 3-D plotting commands in Maple. In this example, the 3-D plot command tubeplot is used. For more information on the viewpoint command, see the help page.

• Using this 3D plot, choose a standard named path and write the plot3d command that includes the viewpoint option.

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

Step

Result

• Determine the 3D plot for which you will be constructing a fly-through animation

 (2.2.1.1)

• To start constructing the fly-through animation, we choose the list of points for the camera to fly through.

• Here, the list of points is plotted as a path to help visualize the camera movement in the final fly-through.

Tip: Finding just the right path for your camera is often the most difficult task associated with fly-through animations. Check out the section below for tips on creating effective camera paths.

• The fly-through is constructed by using the viewpoint command and the location suboption. To tweak the visuals of the plot, the fieldofview and upvector suboptions are also used.

Tip: The fieldofview and upvector suboptions are effective commands to easily tweak your fly-through animation. The fieldofview command specifies how large of an area the camera's view is able to take in, and the upvector command dictates the rotation of the camera at the specified points. See the Options to the fly-through Command section below for more information on fly-through options.

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

Step

Result

• Determine the 3D plot for which you will be constructing a fly-through animation

 (2.3.1.1)

• To start constructing the fly-through animation, we define a parametric function for the camera to follow.

• Here, the parametric function is plotted to help visualize the camera movement in the final fly-through.

 (2.3.1.2)

• The fly-through is constructed by using the viewpoint command and the location suboption. To tweak the visuals of the plot, the fieldofview and upvector suboptions are also used.

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:

• Don't fly too close! If you keep your points at least several units away from your surface, you won't run the risk of flying too close and confusing the viewer.

• Keep it smooth. Make sure that the next point in your fly-through animation is closely related to the previous point. This will ensure a smooth fly-through path.

• Start from a distance. If you plan on flying close to your surface, or flying through in an intricate path, start your animation from a distance to give your viewer a feel for what they are looking at.

Tip: Don't forget to use the additional options described in the section below to get your fly-through just right.

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 #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.