Values and Slope of Splines - mkraska/meclib GitHub Wiki

[text, isOK]: fb_spline(sans, tans, x1, x2, fx)

  • text Feedback text, consists of the range indication in the first line and eventual messages in the subsequent lines.
  • isOK (boolean), test result
  • sans, tans (expression) polynomial representation of the spline. The polynomials are in unscaled grid coordinates. For static (non-randomized) tasks you can set the curves to the correct state and get the corresponding tans from the names response in the question preview (response history). The polynomials are in unscaled grid coordinates.
  • x1, x2 (numbers) boundaries of the x-range in local coordinates (offset and scale as set by "spline")
  • fx scale factor for x direction, for internal conversion of local min/max coordinates to grid coordinates

The test consists of checking the value and the slope at the boundaries with tolerance of 0.02 in grid coordinates.

Note that standard grid snap is 0.1 times the grid spacing. So it might be necessary to round teacher's answer accordingly.

Question Variables

stack_include("https://raw.githubusercontent.com/mkraska/meclib/main/Maxima/fb_spline.mac");

Feedback Variables

Provide a PRT for each "spline" object. Student's answer is obtained from the names field of the corresponding "spline" object.

S_Q1: names[i_Q1];
[text, isOK]: fb_spline(S_Q1,Q1,0,0.5, 0.25);

PRT Node

Test for identity of the curves:

AlgebraicEquivalence(isOK, true).

Use this in both branches of the node.

\(Q \) für  \(x /L\) {@text@}

Example: TM1 09 05

image