Explore - Maple Programming Help

 Explore

The Explore command provides an easy-to-use tool for creating interactive applications within the current document or worksheet. Maple 18 introduces many significant updates and additions, including:

 • Custom placement of controls
 • Choice of controller types for range parameters including dials, gauges and more
 • Support for a list of parameters choices using ComboBox controls
 • Customization of the size of the display component
 • Multi-parameter animation
 • Interactive marker controls on 2-D plots
 • Interactive exploration of images

In addition to the list above, the interactive pop-up dialog window of the Explore command has also been enhanced. The dialog window appears when the parameters option is not supplied in the calling sequence of the Explore command. This includes the case of invoking Explore by using the context-sensitive menu after right-clicking on an expression or unevaluated function call.

For additional details and illustrative examples, see the Explore Example Worksheet.

Placement of Controls

The controls for parameters can now be placed either below, to the left, or to the right of the display component. All parameter controls can be placed via a single optional argument, placement, to the Explore command, as a customized default.

The parameter controls placement can also be specified individually as an override of any default setting.

 >

Controller Types for Range Parameters

Parameters whose values are specified as a range can now be one of several types of variable controller.

The variable controller choices are: slider, dial, volumegauge, meter, and rotarygauge.

The size of the plotting component can be optionally specified. By default, its size is determined by the size of the initial plot.

 >

ComboBox Controls

Parameters whose values are specified as lists are incorporated as ComboBox controls.

 >

 redbluegreen linepoint

Animation

The display of the generated frames at each set of parameter values can be animated. Each parameter control can have its own check box which determines whether it will play with the animation. These check boxes can be unselected while the animation is playing.

Note that any parameters whose animation check box is unselected during play can still be interactively controlled.

The animation check boxes can be specified as a single new default option, and this in turn can be overridden on any parameter's individual specification. The animation check boxes can be specified as present and initially selected, present and initially unselected, or absent altogether.

By default, any combo box control of a discrete valued parameter does not get an animation check box unless this is supplied in that parameter's individual specification.

 >

Loop Animation

The loop option allows for looped play of the animated sequence.

The loop control checkbox can be omitted altogether (default), initially selected, or initially unselected.

 >

Interactive Markers

Pairs of range controls (e.g. sliding controls) can be coupled as interactive marker controls on 2-D plots. Each marker is displayed as a cross in the plot, which may be dragged interactively using the mouse pointer.

By default, the individual sliding controls associated with marker parameters are hidden, but these can be optionally shown either all together or individually.

DEplot and Initial Conditions

 > $\mathrm{deS}:=\frac{ⅆ}{ⅆt}x\left(t\right)=-0.5x\left(t\right)y\left(t\right)$
 ${\mathrm{deS}}{:=}\frac{{ⅆ}}{{ⅆ}{t}}{}{x}{}\left({t}\right){=}{-}{0.5}{}{x}{}\left({t}\right){}{y}{}\left({t}\right)$ (5.1.1)
 > $\mathrm{deI}:=\frac{ⅆ}{ⅆt}y\left(t\right)=0.5x\left(t\right)y\left(t\right)-0.15y\left(t\right)$
 ${\mathrm{deI}}{:=}\frac{{ⅆ}}{{ⅆ}{t}}{}{y}{}\left({t}\right){=}{0.5}{}{x}{}\left({t}\right){}{y}{}\left({t}\right){-}{0.15}{}{y}{}\left({t}\right)$ (5.1.2)
 >



Images

In Maple 18, procedures which return images can be explored interactively.

Basic example: float[8] Array

Arrays which are supported by the ImageTools package can be interpreted as images.

The following is a basic example involving a function call which evaluates to a 2-dimensional datatype=float[8] Array. This is interpreted as a grayscale image.

 >

Procedures Returning an Image

A function call to a command or procedure, which returns an image, can also be explored.

 > $\mathrm{img}:=\mathrm{ImageTools}:-\mathrm{Read}\left(\mathrm{cat}\left(\mathrm{kernelopts}\left(\mathrm{datadir}\right),"/images/excavator.jpg"\right)\right):$
 >

Animation

Exploration of images can also be animated.

 > $\mathrm{with}\left(\mathrm{Fractals}:-\mathrm{EscapeTime}\right):$
 >

RGB Color Space: An Application

The next example uses a self-initializing module to perform efficient in-place updates of an image Array as the parameter values change. Right click the code edit region and choose 'Execute Code' in order to initialize the procedure.

A single call to F will produce a color image as output, which can be visualized by embedding it in the current worksheet.

 > $\mathrm{ImageTools}:-\mathrm{Embed}\left(F\left(0.7,0.3,0.9\right)\right)$

An interactive application can now be easily constructed.

 >