 Explore Command Updates - Maple Help

 Explore

The Explore function provides an easy-to-use tool for creating interactive applications within the current document or worksheet. Maple 2016 introduces significant updates and additions: Simplified calling sequence

Parameters which take on values from a numeric range or a list can now be specified more simply, without using the $\mathrm{parameters}$ option of the $\mathrm{Explore}$ command. This makes $\mathrm{Explore}$ easier to use, in the simplest cases.

For example, in previous versions the following example would require a more verbose argument, such as .

$\mathbf{n}$  $\mathbf{a}$  Parameters with a list of values can also be used with this shorter calling sequence. This calling sequence also works in the mixed case of some additional parameters being specified in more detail using the $\mathrm{parameters}$ option.

$\mathbf{a}$  $\mathbf{Linestyle}$ dashdotdotdashsolid $\mathbf{Color}$ goldbluered Name resolution

The $\mathrm{Explore}$ command has special evaluation rules, and its first argument $\mathrm{expr}$ is not evaluated before the $\mathrm{Explore}$ command has the opportunity to examine it. This is an important mechanism, and is central to how $\mathrm{Explore}$ can accept, for example, a plotting command containing unassigned parameters.

In the following example, the standalone call to $\mathrm{plot}$ fails to produce a meaningful plot since the parameter $a$ has no assigned numeric value. As expected, an empty plot is produced, along with a warning about the presence of the unassigned name $a.$ The $\mathrm{Explore}$ command accommodates this by not evaluating the explored command until it has numeric values for $a$.

$\mathbf{a}$  In versions previous to Maple 2016, all exploration parameters had to be explicitly given in $\mathrm{expr}$ in order for the exploration to work as expected. That is, if you had assigned $w$ to $\mathrm{sin}\left(a\cdot x\right)$ in the preceding example and then tried to explore $w$, you would have received unintended results or a warning about the unexpected presence of the name $w$. Therefore, in order to explore an expression that depended on a previously assigned name, it was necessary to use a more involved process, such as using a custom procedure that accepted $a$ as its parameter and would resolve $w$ during its execution.

$\mathrm{restart};$

$w≔\mathrm{sin}\left(a\cdot x\right)$

 ${\mathrm{sin}}\left({a}{x}\right)$ (2.1)

$\mathbf{a}$  (Note that this embedded exploration will not continue to work after a restart, unless $F$ is also reassigned with the intended procedure and $w$ is also assigned with its intended value.)

In Maple 2016 the name $w$ is resolved to its assigned value by $\mathrm{Explore}$, while the plotting command is still usefully left evaluated until parameter name $a$ gets its numeric values. This eliminates the need for a custom procedure. Also note that the following exploration will continue to operate as intended after a restart.

$\mathbf{a}$  Names are resolved, recursively, to algebraic expressions involving other names. However, resolution of a name is not done if the value of the name is a Matrix/Vector/Array with hardware datatype or something of type last_name_eval, such as a procedure. Hence in the previous example the assigned name $F$ is not resolved and replaced, since its value is a procedure. TextArea controllers for evaluating at custom values of a parameter

With a TextArea controller the value for a parameter can be any custom value or expression. In the following exploration, type a value in the embedded TextArea component for parameter $A$, and then press the Enter key to update the plot.

For example, the supplied value could be sqrt(2), or an expression in x such as x^2.

 $\mathbf{A}$ Controller customization

Parameters given using the $\mathrm{parameters}$ option can be further specified with optional arguments that are valid for the constructor of the relevant controller.

In the following example, the $\mathbit{continuous}$ option of the Slider component is used. The effect is that when the Slider is moved manually using the mouse pointer, the plot will not recompute and update until the sliding movement is finished.

$\mathbf{a}$  In the following example the options $\mathbit{starta}\mathbit{ngle}$, $\mathbit{anglerange}$, $\mathbit{majorticks}$, height, and width are passed through to the Dial programmatic constructor.   $\mathbf{shift}$   In the next example the $\mathbit{tooltip}$ option is passed to the programmatic constructor of the controller component, which by default is a Slider.

In the following exploration, hovering over the Slider component with the mouse pointer will reveal the tooltip string.

$\mathbf{A}$  The component identity and the action code for the controllers cannot be specified in this way, and are set internally by the $\mathrm{Explore}$ command. Optional Controller placement on top

$\mathbf{a}$   Recording plots

The new recordto and autorecord options provide the ability to assign plots generated by the exploration into a named table. The entries of the table can then be played in sequence as an animation outside of the exploration using the animation toolbar.

The recording state can be toggled on or off, or the name of the table can be unassigned, using two new buttons which appear in the exploration whenever the recordto option is supplied. The round button toggles recording on an off. The square button unassigns the name to which the table is assigned.

The saved plots are indexed in the table in the order they are generated.

None of the Explore parameters have to be specified with the animate option, in order to record. Manually adjusting any of the controllers which causes a new plot to be generated will also cause that plot to be saved if the record button is toggled on (solid red).    $\mathbf{a}$     Color customization

The new $\mathbit{fillcolor}$, $\mathbit{fontcolor}$, and $\mathbit{componentbackground}$ options provide the ability to customize the colors in the exploration. The values of these options can be any named color known to the plot command, or a list of three positive integers representing a color in the RGB color space.

${\mathbf{a}}$   Exploration alignment and width

The new option \mathbit{tablealignment} specifies the horizontal placement in the document of the Table containing the exploration. By default, the exploration is centered horizontally.

$\mathbf{a}$  The new options $\mathbit{width}$ and $\mathbit{widthmode}$ specify the horizontal size of the exploration in the document.

The $\mathbit{widthmode}$ option denotes how the $\mathbit{width}$ option is interpreted. With $\mathbit{widthmode}\mathbf{=}\mathbit{pixels}$ the $\mathbit{width}$ option specifies the number of pixels wide the exploration is, at default 100% zoom level. In this case the exploration Table will not automatically resize horizontally when the document's window is manually resized using the mouse pointer. With $\mathbit{widthmode}\mathbf{=}\mathbit{percentage}$ the $\mathbit{width}$ option specifies the percentage of the current document window's width that the exploration will occupy horizontally. In this case the exploration's Table will automatically resize when the document's window is manually resized using the mouse pointer.

$\mathbf{a}$  $\mathbf{a}$   Table and component borders

Several qualities of the borders in the exploration can be specified in Maple 2016.

The exterior border of the outermost Table can be displayed, or not, using the new $\mathbit{t}\mathbit{ableborders}$ option.

$\mathbf{a}$  The borders surrounding the PlotComponent (or MathContainer) can be displayed, or not, using the new $\mathbit{componentborders}$ option.

$\mathbf{a}$  Interior borders of a Table that are not displayed have three modes of behavior when the mouse cursor temporarily hovers over the Table. They can be revealed in light gray by respecting the property of the worksheet, never revealed, or always revealed. These choices can now be specified using the new $\mathbit{showhiddenborders}$ option. The default for an exploration embedded into the current worksheet is to never reveal these interior Table borders.

When the mouse cursor hovers over the Tables of the following exploration the interior borders will be revealed in light gray.

$\mathbf{a}$  