Description
Displays introductory text accompanied by
a blank set of axes. The student draws a graph on the axes by
clicking at points to be used as interpolation nodes.
Notes
- Use the sketch
environment to configure the sketching applet, declaring
the ranges of the axes, a sample correct response, and a
list of criteria that the student's answer must meet.
- The following commands must appear within
the sketch
environment:
\example{point-list}
defines a
sample correct answer, to be displayed if the student
gives an incorrect response. The sketch is given as
point-list
, a
space-delimited set of coordinates of the form
x,y
. The resulting sketch comprises a
single curve interpolated from these points.
\check{criterion}
sets a
criterion that the student's sketch must satisfy. Refer
to the documentation for \check
for a complete list of
available criteria. More than one \check
statement may be used, in which
case the student's response must satisfy every
criterion.
Examples
\begin{question}{Sketch}
\qutext{Sketch the graph of the function $y=x+1$.}
\begin{sketch}[4]{-2}{2}{-2}{2}
\example{-2,1 1,2}
\check{linear}
\check{goes_through(0,1)}
\end{sketch}
\end{question}
\begin{question}{Sketch}
\code{$a = range(2,5);
$xmax = int(2*$a);
$x = sqrt(2)*$a;}
\qutext{Sketch the graph of the function $y=x^2/\var{$a*$a}$.}
\begin{sketch}[4]{-\var{xmax}}{\var{xmax}}{-2}{2}
\example{-\var{x},2 -\var{a},1 0,0 \var{a},1 \var{x},2}
\check{goes_through(0,0) && goes_through(-\var{a},1)
&& goes_through(\var{a},1)}
\check{slope_at(0) == 0}
\check[-\var{x},0]{decreasing}
\check[0,\var{x}]{increasing}
\check{concave_up}
\end{sketch}
\end{question}