Spline Example Question - mkraska/meclib GitHub Wiki

We want to create a question with a given a(t) graph. The user has to interactively build the according v(t) graph.

The question has two jsxgraph widgets in the question text and another one in the general feedback (correct solution).

We start with an empty STACK question.

Question Variables

The question variables specify the piecewise constant acceleration and the initial velocity. We will later randomize these values.

ti: [0,1,2,4];
ai: [-2,0,2];
v0: 2;

They also specify the reference solution. v(t) is piecewise linear, so we provide the polygon vertices

vi[1]: v0;
vi[2]: v0 + (ti[2]-ti[1])*ai[1];
vi[3]: vi[2] + (ti[3]-ti[2])*ai[2];
vi[4]: vi[3] + (ti[4]-ti[3])*ai[3];

minv: min(vi);
maxv: max(vi);
maxt: max(ti);

Question Text

We copy the standard JSXGraph block from the wiki MecLib-Question-Setup.

Input fields

Then press Check question text and update the fields and provide settings as given in the above wiki page.

Import the feedback function for splines as specified in Values-and-Slope-of-Splines.