Use of Canvas Elements in Maple Library Commands
In this page we will highlight a few of the commands that generate a Canvas suitable for use in both Maple and Maple Learn.
|
Steps
|
|
Maple has many algorithms for showing step-by-step methods explaining how to simplify, solve, integrate, etc. These solution steps can be generated as a canvas.
>
|
Student:-LinearAlgebra:-DeterminantSteps( <1,2,4; 3, 4, 5; 5,6,7> );
|
>
|
Student:-LinearAlgebra:-DeterminantSteps( <1,2,4; 3, 4, 5; 5,6,7>, 'output'='link' );
|
https://learn.maplesoft.com/#/?d=MSEOMPIUNLBQLSANIOCMKJIGCNLSGRPLJKBGMTCNGOCSGLHTNQFKKPJPMULFORMJPQATEGPRATDSNGJTLNKRJLDOIRHNLSEJCJOJ
|
Create Your Own Steps Output
|
|
All of the Steps routines generate a series of records with math and annotations, and possibly one level of sub-steps. These are processed by the OutputStepsRecord command. Here is an example of a record with math, annotations, and substeps:
>
|
steps := [
Record(math=<2*x+5*y=19,x-2*y=-4>,annotation="solve system"),
Record(math=(x=2*y-4),annotation="solve equation 2 for x",
substeps=[
Record(math=(x-2*y=-4),annotation="equation 2"),
Record(math=(x=-4+2*y),annotation=_MTEXT("add %1 to both sides",2*y))
]
),
Record(math=(y=3),annotation="substitute value of x into equation 1 and solve",
substeps=[
Record(math=(2*x+5*y=19),annotation="equation 1"),
Record(math=(2 %* (2*y-4)+5*y=19),annotation="sub in value for x"),
Record(math=(4 %* y-8+5 %* y=19),annotation="expand"),
Record(math=(9*y-8=19),annotation="collect"),
Record(math=(9*y=27),annotation="add 8 to both sides"),
Record(math=(y=3),annotation="divide both sides by 9")
]
),
Record(math=(x=2 %* (3)-4),annotation=_MTEXT("substitute %1 into %2",y=3,x=2*y-4)),
Record(math=(x=2),annotation="simplify"),
Record(math=<x=2,y=3>,annotation="solution")
]:
|
>
|
Student:-Basics:-OutputStepsRecord(steps);
|
>
|
cv := Student:-Basics:-OutputStepsRecord(steps,output=canvas):
|
>
|
DocumentTools:-Canvas:-ShareCanvas(cv);
|
The OutputStepsRecord command allows for different 'displaystyle' options.
>
|
rec := Student:-Calculus1:-ShowSolution( Int( x*sin(x), x ), output=record ):
|
>
|
Student:-Basics:-OutputStepsRecord( rec, displaystyle=columns );
|
This example generates a link to Maple Learn with animated steps:
>
|
Student:-Basics:-OutputStepsRecord( rec, displaystyle=columns, animated=true, output=link );
|
https://learn.maplesoft.com/#/?d=OIBPKQNPNFARDJCMIQOMFLCPIJAKHTFTBQNSEJEQAJEKFFGRDIHGKRBFIJLTGSFLIFLREOELJSMGJNFGBULOCFEILKMGOHOHHGPM
|
|
|
Quiz
|
|
The Quiz command lets you create a variety of question types with options for custom grading procedures, feedback, and try-another generation. Here are some samples:
|
Multiple Choice and Multiple Select
|
|
>
|
cv := Quiz("Which of the following could be portions of the plot of sin(x)?", {1, 2}, [plot(sin(x), x = 0 .. rand(2 .. 3)()), plot(sin(x), x = rand(2 .. 3)() .. 5), plot(2*sin(x), x = rand(2 .. 3)() .. rand(4 .. 7)())], style = multipleselect, gradebyindex = true, size = [250, 150], output=canvas):
|
>
|
ShowCanvas(cv, entrybox=false);
|
https://learn.maplesoft.com/#/?d=ESMLJOEIKSPGKFPKOJDNJNJRFOFIDTINCJLPMKKLESNUCOFMMNKLKUGHMQDIOTPUBPMUNRGKBRPFCPJOEQOMHGOOHMBPNHNONLNO
|
See the BinomialQuiz example for a more in-depth sample with feedback and algorithmic variables.
|
|