Values and Slope of Splines
mkraska edited this page Sep 17, 2023
·
9 revisions
[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 correspondingtans
from thenames
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.
stack_include("https://raw.githubusercontent.com/mkraska/meclib/main/Maxima/fb_spline.mac");
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);
Test for identity of the curves:
AlgebraicEquivalence(isOK, true)
.
Use this in both branches of the node.
\(Q \) für \(x /L\) {@text@}
In order to try code snippets in jsfiddle,
- copy the code from the wiki page to the clipboard
- follow the link for the JSXGraph version you want to try
- Replace the code in the HTML section (contents of
<p hidden id="init">
) with the content of the clipboard