The Explore function provides an easy-to-use tool for creating interactive applications within the current document or worksheet. Maple 2015 introduces significant updates and additions, including:
Customizable interactive marker controls on 2-D plots
Images on Play/Pause/Loop animation controls
2-D Math for parameters with sliding controls
Support for vertical orientation of Slider controls
CheckBox controllers for parameters taking values true and false
Startup Code assignments when launching as a new document
Document Properties when launching as a new document
For additional details and illustrative examples, see the Explore Example Worksheet.
Images on animation controls, 2D Math for parameter names
Orientation of controls
Customizable markers on 2-D plots
Startup Code definitions in new Documents
The Play/Pause button and the Loop checkbox now have images. Parameter names beside sliding controls are now displayed using 2-D Math.
Explore plotalpha⋅sinx,x= −2⋅Pi .. 2⋅Pi, view=−1..1, parameters= alpha=−1.0 .. 1.0 , placement=left, animate, loop, size=300,300
The orientation of Slider controls is now respected and can be specified similarly to other control characteristics. A separate orientation option can be used for all Slider controls, which can be overridden in each parameter's individual specification. The orientation also affects the layout of the control's name, current value label, and animation checkbox.
Explore plotmagnitude*sinscale*x+shift,x=−2*Pi..2*Pi,view=−1..1, parameters= scale=1.0..5, shift=−Pi..Pi, placement=bottom, orientation=horizontal, magnitude=−1..1.0, placement=right , placement=left, orientation=vertical, size=300,300 ;
When several controls are placed together, they are grouped according to orientation. For example, when placement is to the left of the plotting component then vertically oriented Sliders are stacked horizontally and appear above horizontally oriented Sliders which are stacked vertically.
Explore plotmagnitude*sinscale*x+shift⋅Pi2,x=−2*Pi..2*Pi,view=−1..1, parameters= scale=1.0..5, shift= 0.. 4, orientation=horizontal, magnitude=−1..1.0 , placement=left, orientation=vertical ;
You can now customize the appearance of markers in a 2-D plot exploration as well as fix one of the coordinates of a marker.
To customize the appearance of a marker, use the plot options color, symbol, and symbolsize in the markers options sequence. By default, all markers have the same customizations, but you can override the default customization by setting customizations for individual markers. For example, in the following Explore command call, all of the markers have their appearance set to color=blue, symbol=solidcircle, and symbolsize=25, except for the first and nth markers (where the color=red option overrides the color=blue option).
To fix one of the coordinates of a marker, specify a fixed numeric value for that coordinate. In the following example, all of the markers have fixed horizontal positions (specified by the list xini). Their vertical positions, however, are set to variable parameters. In the exploration, you can change the vertical position of any of the markers but you cannot change their horizontal positions.
Note: To try this or any other example on this page, select View > Open Page as Worksheet, and then execute the commands.
F ≔ procdata∷list, n∷posint local S,x; S ≔ CurveFitting:-Splinedata,x,degree=n; plots:-display plot S, x = −1.0 .. 0.0, color=red , plot S, x = 0.0 .. 3.5, color=blue , plot S, x = 3.5 .. 4.5, color=red , view=−2..5;end proc: xini,yini ≔ 0.0,0.5,1.1,1.7,2.4,3.5, 2.0,1.5,0.1, −0.5,2.6,2.2:N ≔ numelemsxini:prng ≔ −1.0..4.0: Explore F0,y1,0.5,y2,1.1,y3,1.7,y4,2.4,y5,3.5,y6, n, parameters = n=1..7, label=degree, seq y∥i=prng, i=1..N , markers = xini1,y1,color=red , seq xinii,y∥i , i=2.. N−1 , xiniN,y∥N,color=red , color=blue, symbol=solidcircle, symbolsize=25, initialvalues = seq y∥i=yinii, i=1.. N , n=5 , title=Spline Interpolation :
A parameter which takes on values of true and false can now have its controller be a CheckBox. This is the default for a parameter whose values are specified by a two-element list containing entries true and false.
In the following example, the parameter tf with label gridlines is controlled by a CheckBox component. Notice that you can select and clear gridlines while the exploration's animation is running.
Explore plotsina*x,x=−Pi..Pi,view=−1..1, gridlines=tf, parameters= tf=true,false, label=gridlines , a=1.0..10, placement=left, size=400,300, loop, numframes=20
Although the same example can be constructed by setting controller=combobox for parameter tf, you cannot change the value of gridlines while the animation is playing as you can with CheckBox component.
Explore plotcosa*x,x=−Pi..Pi,view=−1..1, gridlines=tf, parameters= tf=true,false, label=gridlines, controller=combobox , a=1.0..10, placement=left, size=400,300, loop, numframes=20
Finally, it is not necessary to give a list of values when you specify the controller as checkbox.
Explore plottana*x,x=−Pi..Pi,view=−8..8, gridlines=tf, parameters= tf, label=gridlines, controller=checkbox , a=1.0..10, placement=left, size=400,300, loop, numframes=20
The newsheet option for Explore opens your exploration in a new Document instead of the current document. This is convenient for creating applications or assignments. However, in previous versions of Maple, if your exploration depended on names not defined in Maple (for example, a procedure or a module that you wrote), you needed to copy the code for these names into the new Document and then execute the code before running the exploration. This process has been simplified with the new startupdefinitions option.
The startupdefinitions option inserts assignment statements into the Startup Code region of the new Document. When the new Document opens, these assignment statements are executed automatically and your exploration is ready to run. The following sections give two examples to illustrate how this works. The first example shows how to insert a procedure into the Startup Code region of a new Document. The second example shows how to insert an unevaluated module into the Startup Code region.
Inserting a procedure
In the following example, the Cobweb procedure produces a cobweb plot for the logistic map, r$x$(1-x).
The newsheet option causes the exploration to start in a new Document. The startupdefinitions option inserts the code that assigns the Cobweb procedure to the Cobweb name into the Startup Code region of the new Document. This allows the exploration to function directly after opening.
Cobweb ≔ proc r, x0, numpoints∷posint≔1 local f,i,M,N,x; N≔2⋅numpoints;