New Features in Maple 17: One-Step App Creation
 

Next Feature

The Explore command gives you a quick and easy way to create interactive applications and demonstrations. With a single command, you can create a fully interactive application to explore arbitrary mathematical expressions and plots.  These applications let you use sliders to change the parameters of your expression and immediately see the results. The resulting application can be saved and shared with others, including through The Möbius Project.

The Explore command has been updated in Maple 17 to provide new and enhanced functionality, allowing you to:

  • Specify the exploration parameters programmatically as well as through the Exploration Assistant.
  • Include references to other variables and data.
  • Insert the exploration components into either the current document or a new one.

Details and Examples

Parameters and initial values

The new parameters option of the Explore command allows you to specify which of the unknown names in an expression of plot are the parameters to be explored via sliders. In addition, the initialvalues option allows you to specify the parameter values to be used in the first evaluation. These two new options give the Explore command more programmatic usefulness, as they allow you to circumvent the pop-up dialog that normally asks for this information.

>

Embedded component

Previously assigned data

The following example illustrates the use of data that has previously been assigned to a name earlier in the session. This ability is new in Maple 17, and broadens the range and complexity of applications you can create with the Explore command.

> data := [[0, 2], [`/`(1, 2), 1.5], [.8, 2.5], [1.4, 2.6], [1.8, 1.5], [2.2, 3.1], [2.6, 2.4], [3.1, 2.2], [3.5, 2.2]]; -1

> with(CurveFitting); -1

>




Embedded component

Exploring a function call

One powerful way to use the Explore command is to pass it a call to a previously assigned function.

The key here is that the procedure must return the kind of object to be visualized, in this case, a plot.

> f := proc (a) local b; b := `*`(`^`(a, 2)); return plot(sin(`*`(b, `*`(x))), x = `+`(`-`(`*`(2, `*`(Pi)))) .. `+`(`*`(2, `*`(Pi)))) end proc; -1

> Explore(f(p), parameters = [p = -2.0 .. 2.0])

Embedded component

Ordinary differential equations with parameters

Suppose that you have an Initial Value Problem (IVP) with unassigned symbolic parameters. The interactive functionality of dsolve,numeric provides an efficient mechanism for numerically solving the solution at multiple values of the parameters.

You can use the Explore command to interact with such a solution space.

>






>

>



You can now produce a plot of the solution at parameter values alpha=0.1 and beta=0.2.

> F(.1, .2)

Plot_2d

You can also explore the family of such plots as the parameter values change. This is accomplished by calling Explore on a function call.

> Explore(F(a, b), 'parameters' = [a = .5 .. 2.0, b = 1.0 .. 10.0])

Embedded component

Exploring an animation

After executing the Explore command below, select the plot with the pointer and run the animation using the top menu. By default, the embedded component will show the animation in continuous loop mode. While the animation is playing, you can move the slider and see a changing instance of the animation.

Note that the animations are created on-the-fly for each new slider value.

>

Embedded component

Interactive plots and the Plot Builder

Interactive plots produced by the Plot Builder Assistant and the plots:-interactive command now make use of new Explore functionality. The result is a plot controlled by one or more sliders, embedded directly into your document.

You can access the Plot Builder via the context-sensitive menu, the Tools>Assistants menu, or the plots:-interactive command. To create an interactive plot, set the plot type to Interactive Plot with Parameters, selecting the number of parameters you wish to control through sliders.   This example uses the plots:-interactive command, setting z to be the variable controlled by the slider.

> plots:-interactive({cos(w), tan(`+`(w, z))}, variables = [w, z])

Embedded component