Explore Command Updates - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : System : Information : Updates : Maple 2015 : Explore Command Updates

Explore


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

CheckBox controllers

Startup Code definitions in new Documents

Document Properties

Images on animation controls, 2D Math for parameter names

The Play/Pause button and the Loop checkbox now have images. Parameter names beside sliding controls are now displayed using 2-D Math.

Explore plotalphasinx,x= 2Pi .. 2Pi, view=1..1,                 parameters= alpha=1.0 .. 1.0 ,                placement=left, animate, loop, size=300,300 

α

Orientation of controls

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 ;

scale

magnitude

shift


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+shiftPi2,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 ; 

scale

magnitude

shift

Customizable markers on 2-D plots

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  procdatalist, nposint   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 yi=prng, i=1..N  ,               markers =   xini1,y1,color=red ,                                     seq xinii,yi ,  i=2.. N1 ,                                      xiniN,yN,color=red  , color=blue, symbol=solidcircle,  symbolsize=25,              initialvalues =  seq yi=yinii,  i=1.. N , n=5 ,              title=Spline Interpolation  :

Spline Interpolation


 


 


 


 


 


 

 

CheckBox controllers

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 

 

a


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 

 

a

 

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 

 

a

Startup Code definitions in new Documents

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, numpointsposint1  local f,i,M,N,x;    N2numpoints;    fx,rrx1x;    MMatrixN,2,datatype=float8;    M1,1,M1,2x0,0;    M2,1,M2,2M1,1,fM1,1,r;    for i from 3 to N1 by 2 do       Mi,1,Mi,2Mi1,1,fMi1,1,r;       Mi+1,1,Mi+1,2Mi,2,Mi,2;    end do;    plots:-displayplotx,x=0..1.1,color=black,linestyle=dot,                          plot'f'x,r,x=0..1,color=black,                          plotM,style=line,color=red,                          view=0..1.1,0..1.1; end proc:

 Explore Cobweb r, x0, numpoints=n ,                parameters= r=2.0..4.1, n=1..200, animate=false,                                       x0=0.0..1.0, animate=false ,                initialvalues= r=2.8, x0=0.1, n=100,                animate, loop, placement=left,                startupdefinitions=Cobweb,                newsheet, showbanner=true, title=Cobweb plot for r*x*(1-x) ;

Inserting a module with source

In the following example, the assignment in the current worksheet to the name RGBoverlap involves the definition of a module.

This particular module has a local member, R, which acts as a workspace. When this appliable module is first called with arguments, that workspace is initialized and a large Array is assigned to R. The module thus modifies itself upon its first invocation.

However, the original statement below that creates the much smaller, unmodified, and uninitialized module can still be placed into the Startup Code region of the new Document opened with the exploration. This is accomplished by using unevaluation quotes around the right-hand side in the original assignment statement. Note the presence of the single right-quotes around the right-hand side in the following assignment, and the subsequent equation form used for specifying name RGBoverlap within the startupdefinitions option to Explore.

 RGBoverlap&apos;module   local ModuleApply&comma;init&comma;f&comma;sr&comma;sg&comma;sb&comma;n&comma;n1&comma;n2&comma;c&comma;tc&comma;R&semi;   initproc      n200&semi; n1&comma;n2truncn&sol;4&comma;truncn&sol;2&semi;      cMatrixn&comma;&apos;datatype&apos;&equals;&apos;float8&apos;&comma;                subsd2&equals;n2&comma;                     i&comma;j`if`d2i&Hat;2&plus;d2j&Hat;2<d2&Hat;2&comma;1&comma;0&semi;      tcMatrixn&comma;&apos;datatype&apos;&equals;&apos;float8&apos;&semi;      RArray1..2&ast;n&comma;1..2&ast;n&comma;1..3&comma;&apos;datatype&apos;&equals;&apos;float8&apos;&semi;   end proc&semi;   fprocx      LinearAlgebra:-MatrixAddtc&comma;c&comma;.0&comma;x&comma;&apos;inplace&apos;&semi;      NULL&semi;   end proc&semi;   ModuleApplyproctr&comma;tg&comma;tb      if not nposint then init&semi; end if&semi;      if srtr then         ftr&semi;         sr&comma;Rn1..n1&plus;n&comma;n1..n1&plus;n&comma;1tr&comma;tc&semi;      end if&semi;      if sgtg then         ftg&semi;         sg&comma;Rn1..n1&plus;n&comma;2&ast;n5&ast;n1..2&ast;nn1&comma;2tg&comma;tc&semi;      end if&semi;      if sbtb then         ftb&semi;         sb&comma;R2&ast;n5&ast;n1..2&ast;nn1&comma;1&plus;n2..n&plus;n2&comma;3tb&comma;tc&semi;      end if&semi;      R&semi;   end proc&semi;end module&apos;&colon;

Explore RGBoverlap Red&comma; Green&comma; Blue &comma;                parameters &equals;  Red&equals;0.0..1&comma; Green&equals;0.0..1&comma; Blue&equals;0.0..1&comma;                initialvalues &equals;  Red&equals;.7&comma; Green&equals;.7&comma; Blue&equals;.7 &comma;                placement &equals; right&comma;                startupdefinitions&equals;RGBoverlap&equals;evalRGBoverlap&comma;1&comma;                newsheet&comma; title&equals;The additive RGB color space &semi;

Document Properties

When using the newsheet option to open the exploration in a new Document, the documentproperties option sets Document Properties metadata for the Document.

To see the Document Properties for the new Document, select File > Document Properties.

For example, the following command opens the exploration in a new Document. The documentproperties option sets the metadata values for the Author and Subject attributes in the new Document to "John Smith" and "Fractal explorations", respectively.

 ExploreFractals:-EscapeTime:-Mandelbrot300&comma;1.78&plus;11.5I&ExponentialE;zoom&comma;1.78&plus;2.2&plus;1.5I&ExponentialE;zoom&comma;                                                                       iterationlimit&equals;a&comma;output&equals;layer1&comma;                   parameters&equals;a&equals;50..300&comma;zoom&equals;0.0..8.0&comma;                  documentproperties&equals; Author&equals;John Smith&comma; Subject&equals;Fractal explorations &comma;                  newsheet&comma; animate&comma; placement&equals;left