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
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 ;
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+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
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
truefalse
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; f≔x,r→r⋅x⋅1−x; M≔MatrixN,2,datatype=float8; M1,1,M1,2≔x0,0; M2,1,M2,2≔M1,1,fM1,1,r; for i from 3 to N−1 by 2 do Mi,1,Mi,2≔Mi−1,1,fMi−1,1,r; Mi+1,1,Mi+1,2≔Mi,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≔'module local ModuleApply,init,f,sr,sg,sb,n,n1,n2,c,tc,R; init≔proc n≔200; n1,n2≔truncn/4,truncn/2; c≔Matrixn,'datatype'='float8', subsd2=n2, i,j→`if`d2−i^2+d2−j^2<d2^2,1,0; tc≔Matrixn,'datatype'='float8'; R≔Array1..2*n,1..2*n,1..3,'datatype'='float8'; end proc; f≔procx LinearAlgebra:-MatrixAddtc,c,.0,x,'inplace'; NULL; end proc; ModuleApply≔proctr,tg,tb if not n∷posint then init; end if; if sr≠tr then ftr; sr,Rn1..n1+n,n1..n1+n,1≔tr,tc; end if; if sg≠tg then ftg; sg,Rn1..n1+n,2*n−5*n1..2*n−n1,2≔tg,tc; end if; if sb≠tb then ftb; sb,R2*n−5*n1..2*n−n1,1+n2..n+n2,3≔tb,tc; end if; R; end proc;end module':
Explore RGBoverlap Red, Green, Blue , parameters = Red=0.0..1, Green=0.0..1, Blue=0.0..1, initialvalues = Red=.7, Green=.7, Blue=.7 , placement = right, startupdefinitions=RGBoverlap=evalRGBoverlap,1, newsheet, title=The additive RGB color space ;
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,−1.78+−1−1.5⁢Iⅇzoom,−1.78+2.2+1.5⁢Iⅇzoom, iterationlimit=a,output=layer1, parameters=a=50..300,zoom=0.0..8.0, documentproperties= Author=John Smith, Subject=Fractal explorations , newsheet, animate, placement=left
Download Help Document